Merge lp:~jfb-tempo-consulting/unifield-server/US-8866 into lp:unifield-server

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~jfb-tempo-consulting/unifield-server/US-8866
Merge into: lp:unifield-server
Diff against target: 49 lines (+15/-7)
2 files modified
bin/addons/sync_client/wizard/view_entity_id.py (+9/-4)
bin/addons/sync_client/wizard/view_entity_id.xml (+6/-3)
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-server/US-8866
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+406016@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/sync_client/wizard/view_entity_id.py'
--- bin/addons/sync_client/wizard/view_entity_id.py 2017-10-27 08:05:28 +0000
+++ bin/addons/sync_client/wizard/view_entity_id.py 2021-07-21 13:24:22 +0000
@@ -39,12 +39,17 @@
39 def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):39 def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
40 res = super(view_entity_id, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)40 res = super(view_entity_id, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
41 if view_type == 'form':41 if view_type == 'form':
42 hw_id = self.pool.get("sync.client.entity")._hardware_id or ''42 entity = self.pool.get("sync.client.entity").get_entity(cr, uid, context=context)
43 hw_id = entity._hardware_id or ''
44 last_seq = entity.update_last or ''
4345
44 doc = etree.XML(res['arch'])46 doc = etree.XML(res['arch'])
45 nodes = doc.xpath("//label[@string]")47 nodes = doc.xpath("//label[@string='name']")
46 if nodes:48 if nodes:
47 nodes[0].set('string', hw_id)49 nodes[0].set('string', 'Hardware ID: %s' % hw_id)
50 nodes = doc.xpath("//label[@string='sequence']")
51 if nodes:
52 nodes[0].set('string', 'Last update: %s'%last_seq)
48 res['arch'] = etree.tostring(doc)53 res['arch'] = etree.tostring(doc)
4954
50 return res55 return res
5156
=== modified file 'bin/addons/sync_client/wizard/view_entity_id.xml'
--- bin/addons/sync_client/wizard/view_entity_id.xml 2016-11-21 15:03:19 +0000
+++ bin/addons/sync_client/wizard/view_entity_id.xml 2021-07-21 13:24:22 +0000
@@ -7,13 +7,16 @@
7 <field name="type">form</field>7 <field name="type">form</field>
8 <field name="arch" type="xml">8 <field name="arch" type="xml">
9 <form string="Entity Id" col="4">9 <form string="Entity Id" col="4">
10 <label string="name" align="0.0"/>10 <html>
11 <h1><label string="name" align="0.0" colspan="4"/></h1>
12 <h1><label string="sequence" align="0.0" colspan="4"/></h1>
13 </html>
11 </form>14 </form>
12 </field>15 </field>
13 </record>16 </record>
1417
15 18
16 <record model="ir.actions.act_window" id="view_entity_id_action" >19 <record model="ir.actions.act_window" id="view_entity_id_action" >
17 <field name="name">Entity Id</field>20 <field name="name">Entity Id</field>
18 <field name="res_model">sync.client.view_entity_id</field>21 <field name="res_model">sync.client.view_entity_id</field>
19 <field name="view_type">form</field>22 <field name="view_type">form</field>

Subscribers

People subscribed via source and target branches