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
1=== modified file 'bin/addons/sync_client/wizard/view_entity_id.py'
2--- bin/addons/sync_client/wizard/view_entity_id.py 2017-10-27 08:05:28 +0000
3+++ bin/addons/sync_client/wizard/view_entity_id.py 2021-07-21 13:24:22 +0000
4@@ -39,12 +39,17 @@
5 def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
6 res = super(view_entity_id, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
7 if view_type == 'form':
8- hw_id = self.pool.get("sync.client.entity")._hardware_id or ''
9+ entity = self.pool.get("sync.client.entity").get_entity(cr, uid, context=context)
10+ hw_id = entity._hardware_id or ''
11+ last_seq = entity.update_last or ''
12
13 doc = etree.XML(res['arch'])
14- nodes = doc.xpath("//label[@string]")
15- if nodes:
16- nodes[0].set('string', hw_id)
17+ nodes = doc.xpath("//label[@string='name']")
18+ if nodes:
19+ nodes[0].set('string', 'Hardware ID: %s' % hw_id)
20+ nodes = doc.xpath("//label[@string='sequence']")
21+ if nodes:
22+ nodes[0].set('string', 'Last update: %s'%last_seq)
23 res['arch'] = etree.tostring(doc)
24
25 return res
26
27=== modified file 'bin/addons/sync_client/wizard/view_entity_id.xml'
28--- bin/addons/sync_client/wizard/view_entity_id.xml 2016-11-21 15:03:19 +0000
29+++ bin/addons/sync_client/wizard/view_entity_id.xml 2021-07-21 13:24:22 +0000
30@@ -7,13 +7,16 @@
31 <field name="type">form</field>
32 <field name="arch" type="xml">
33 <form string="Entity Id" col="4">
34- <label string="name" align="0.0"/>
35+ <html>
36+ <h1><label string="name" align="0.0" colspan="4"/></h1>
37+ <h1><label string="sequence" align="0.0" colspan="4"/></h1>
38+ </html>
39 </form>
40 </field>
41 </record>
42
43-
44- <record model="ir.actions.act_window" id="view_entity_id_action" >
45+
46+ <record model="ir.actions.act_window" id="view_entity_id_action" >
47 <field name="name">Entity Id</field>
48 <field name="res_model">sync.client.view_entity_id</field>
49 <field name="view_type">form</field>

Subscribers

People subscribed via source and target branches