Merge lp:~julie-w/unifield-server/US-5443 into lp:unifield-server
- US-5443
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 5404 |
Proposed branch: | lp:~julie-w/unifield-server/US-5443 |
Merge into: | lp:unifield-server |
Diff against target: |
210 lines (+87/-18) 7 files modified
bin/addons/account_journal/project/project.py (+4/-0) bin/addons/msf_audittrail/__openerp__.py (+2/-0) bin/addons/msf_audittrail/data/audittrail_account_analytic_journal.yml (+27/-0) bin/addons/msf_audittrail/data/audittrail_account_journal.yml (+28/-0) bin/addons/msf_instance/add_instance.py (+7/-8) bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv (+1/-1) bin/addons/msf_tools/msf_tools.py (+18/-9) |
To merge this branch: | bzr merge lp:~julie-w/unifield-server/US-5443 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+368719@code.launchpad.net |
Commit message
Description of the change
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/account_journal/project/project.py' | |||
2 | --- bin/addons/account_journal/project/project.py 2017-09-18 12:35:40 +0000 | |||
3 | +++ bin/addons/account_journal/project/project.py 2019-06-12 15:18:02 +0000 | |||
4 | @@ -120,7 +120,11 @@ | |||
5 | 120 | def create(self, cr, uid, vals, context=None): | 120 | def create(self, cr, uid, vals, context=None): |
6 | 121 | if context is None: | 121 | if context is None: |
7 | 122 | context = {} | 122 | context = {} |
8 | 123 | user_obj = self.pool.get('res.users') | ||
9 | 123 | self._check_code_duplication(cr, uid, vals, context=context) | 124 | self._check_code_duplication(cr, uid, vals, context=context) |
10 | 125 | if 'instance_id' not in vals: | ||
11 | 126 | # Prop. instance by default at creation time is the current one: add it in vals to make it appear in the Track Changes | ||
12 | 127 | vals['instance_id'] = user_obj.browse(cr, uid, uid, fields_to_fetch=['company_id'], context=context).company_id.instance_id.id | ||
13 | 124 | return super(account_analytic_journal, self).create(cr, uid, vals, context=context) | 128 | return super(account_analytic_journal, self).create(cr, uid, vals, context=context) |
14 | 125 | 129 | ||
15 | 126 | def write(self, cr, uid, ids, vals, context=None): | 130 | def write(self, cr, uid, ids, vals, context=None): |
16 | 127 | 131 | ||
17 | === modified file 'bin/addons/msf_audittrail/__openerp__.py' | |||
18 | --- bin/addons/msf_audittrail/__openerp__.py 2019-05-14 07:28:06 +0000 | |||
19 | +++ bin/addons/msf_audittrail/__openerp__.py 2019-06-12 15:18:02 +0000 | |||
20 | @@ -51,6 +51,8 @@ | |||
21 | 51 | 'data/audittrail_res_users.yml', | 51 | 'data/audittrail_res_users.yml', |
22 | 52 | 'data/audittrail_hr_employee.yml', | 52 | 'data/audittrail_hr_employee.yml', |
23 | 53 | 'data/audittrail_res_partner.yml', | 53 | 'data/audittrail_res_partner.yml', |
24 | 54 | 'data/audittrail_account_analytic_journal.yml', | ||
25 | 55 | 'data/audittrail_account_journal.yml', | ||
26 | 54 | 'data/audittrail_account_account.yml', | 56 | 'data/audittrail_account_account.yml', |
27 | 55 | 'audittrail_report.xml', | 57 | 'audittrail_report.xml', |
28 | 56 | 'audittrail_invoice_data.yml', | 58 | 'audittrail_invoice_data.yml', |
29 | 57 | 59 | ||
30 | === added file 'bin/addons/msf_audittrail/data/audittrail_account_analytic_journal.yml' | |||
31 | --- bin/addons/msf_audittrail/data/audittrail_account_analytic_journal.yml 1970-01-01 00:00:00 +0000 | |||
32 | +++ bin/addons/msf_audittrail/data/audittrail_account_analytic_journal.yml 2019-06-12 15:18:02 +0000 | |||
33 | @@ -0,0 +1,27 @@ | |||
34 | 1 | - | ||
35 | 2 | For Analytic Journals (account.analytic.journal), track the creation, modification, and deletion | ||
36 | 3 | - | ||
37 | 4 | !python {model: audittrail.rule}: | | ||
38 | 5 | name = 'Analytic Journals' | ||
39 | 6 | object_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'account.analytic.journal')], context=context) | ||
40 | 7 | rule_id = self.search(cr, uid, [('object_id', 'in', object_ids)], context=context) | ||
41 | 8 | if object_ids: | ||
42 | 9 | fields = ['name', 'code', 'instance_id', 'type', 'active'] | ||
43 | 10 | |||
44 | 11 | fields_ids = self.pool.get('ir.model.fields').search(cr, uid, [('model', '=', 'account.analytic.journal'), ('name', 'in', fields)], context=context) | ||
45 | 12 | |||
46 | 13 | vals = { | ||
47 | 14 | 'name': name, | ||
48 | 15 | 'object_id': object_ids[0], | ||
49 | 16 | 'log_write': True, | ||
50 | 17 | 'log_unlink': True, | ||
51 | 18 | 'log_create': True, | ||
52 | 19 | 'field_ids': [(6, 0, fields_ids)], | ||
53 | 20 | } | ||
54 | 21 | |||
55 | 22 | if not rule_id: | ||
56 | 23 | rule_id = self.create(cr, uid, vals, context=context) | ||
57 | 24 | elif rule_id: | ||
58 | 25 | self.write(cr, uid, rule_id, vals, context=context) | ||
59 | 26 | # Subscribe to the rule | ||
60 | 27 | self.subscribe(cr, uid, rule_id) | ||
61 | 0 | 28 | ||
62 | === added file 'bin/addons/msf_audittrail/data/audittrail_account_journal.yml' | |||
63 | --- bin/addons/msf_audittrail/data/audittrail_account_journal.yml 1970-01-01 00:00:00 +0000 | |||
64 | +++ bin/addons/msf_audittrail/data/audittrail_account_journal.yml 2019-06-12 15:18:02 +0000 | |||
65 | @@ -0,0 +1,28 @@ | |||
66 | 1 | - | ||
67 | 2 | For Journals (account.journal), track the creation, modification, and deletion | ||
68 | 3 | - | ||
69 | 4 | !python {model: audittrail.rule}: | | ||
70 | 5 | name = 'Journals' | ||
71 | 6 | object_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'account.journal')], context=context) | ||
72 | 7 | rule_id = self.search(cr, uid, [('object_id', 'in', object_ids)], context=context) | ||
73 | 8 | if object_ids: | ||
74 | 9 | fields = ['name', 'code', 'type', 'default_debit_account_id', 'default_credit_account_id', 'instance_id', 'currency', | ||
75 | 10 | 'analytic_journal_id', 'bank_account_name', 'bank_account_number', 'bank_swift_code', 'bank_address', 'bank_journal_id'] | ||
76 | 11 | |||
77 | 12 | fields_ids = self.pool.get('ir.model.fields').search(cr, uid, [('model', '=', 'account.journal'), ('name', 'in', fields)], context=context) | ||
78 | 13 | |||
79 | 14 | vals = { | ||
80 | 15 | 'name': name, | ||
81 | 16 | 'object_id': object_ids[0], | ||
82 | 17 | 'log_write': True, | ||
83 | 18 | 'log_unlink': True, | ||
84 | 19 | 'log_create': True, | ||
85 | 20 | 'field_ids': [(6, 0, fields_ids)], | ||
86 | 21 | } | ||
87 | 22 | |||
88 | 23 | if not rule_id: | ||
89 | 24 | rule_id = self.create(cr, uid, vals, context=context) | ||
90 | 25 | elif rule_id: | ||
91 | 26 | self.write(cr, uid, rule_id, vals, context=context) | ||
92 | 27 | # Subscribe to the rule | ||
93 | 28 | self.subscribe(cr, uid, rule_id) | ||
94 | 0 | 29 | ||
95 | === modified file 'bin/addons/msf_instance/add_instance.py' | |||
96 | --- bin/addons/msf_instance/add_instance.py 2019-05-02 09:38:25 +0000 | |||
97 | +++ bin/addons/msf_instance/add_instance.py 2019-06-12 15:18:02 +0000 | |||
98 | @@ -25,6 +25,7 @@ | |||
99 | 25 | class account_analytic_journal(osv.osv): | 25 | class account_analytic_journal(osv.osv): |
100 | 26 | _name = 'account.analytic.journal' | 26 | _name = 'account.analytic.journal' |
101 | 27 | _inherit = 'account.analytic.journal' | 27 | _inherit = 'account.analytic.journal' |
102 | 28 | _trace = True | ||
103 | 28 | 29 | ||
104 | 29 | def _get_current_instance(self, cr, uid, ids, name, args, context=None): | 30 | def _get_current_instance(self, cr, uid, ids, name, args, context=None): |
105 | 30 | """ | 31 | """ |
106 | @@ -70,6 +71,7 @@ | |||
107 | 70 | class account_journal(osv.osv): | 71 | class account_journal(osv.osv): |
108 | 71 | _name = 'account.journal' | 72 | _name = 'account.journal' |
109 | 72 | _inherit = 'account.journal' | 73 | _inherit = 'account.journal' |
110 | 74 | _trace = True | ||
111 | 73 | 75 | ||
112 | 74 | def name_get(self, cr, uid, ids, context=None): | 76 | def name_get(self, cr, uid, ids, context=None): |
113 | 75 | if context is None: | 77 | if context is None: |
114 | @@ -114,22 +116,19 @@ | |||
115 | 114 | # the create and write check and replace with the "good" journal if necessary. | 116 | # the create and write check and replace with the "good" journal if necessary. |
116 | 115 | def create(self, cr, uid, vals, context=None): | 117 | def create(self, cr, uid, vals, context=None): |
117 | 116 | analytic_obj = self.pool.get('account.analytic.journal') | 118 | analytic_obj = self.pool.get('account.analytic.journal') |
118 | 119 | user_obj = self.pool.get('res.users') | ||
119 | 120 | if 'instance_id' not in vals: # ensure that the instance_id always exists, in particular for the Track Changes | ||
120 | 121 | vals['instance_id'] = user_obj.browse(cr, uid, uid, fields_to_fetch=['company_id'], context=context).company_id.instance_id.id | ||
121 | 117 | if vals.get('type') and vals.get('type') not in ['situation', 'stock'] and vals.get('analytic_journal_id'): | 122 | if vals.get('type') and vals.get('type') not in ['situation', 'stock'] and vals.get('analytic_journal_id'): |
122 | 118 | analytic_journal = analytic_obj.browse(cr, uid, vals['analytic_journal_id'], context=context) | 123 | analytic_journal = analytic_obj.browse(cr, uid, vals['analytic_journal_id'], context=context) |
123 | 119 | 124 | ||
124 | 120 | instance_id = False | ||
125 | 121 | if 'instance_id' in vals: | ||
126 | 122 | instance_id = vals['instance_id'] | ||
127 | 123 | else: | ||
128 | 124 | instance_id = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.instance_id.id | ||
129 | 125 | |||
130 | 126 | if analytic_journal and \ | 125 | if analytic_journal and \ |
131 | 127 | analytic_journal.name and \ | 126 | analytic_journal.name and \ |
132 | 128 | analytic_journal.instance_id and \ | 127 | analytic_journal.instance_id and \ |
134 | 129 | analytic_journal.instance_id.id != instance_id: | 128 | analytic_journal.instance_id.id != vals['instance_id']: |
135 | 130 | # replace the journal with the one with the same name, and the wanted instance | 129 | # replace the journal with the one with the same name, and the wanted instance |
136 | 131 | new_journal_ids = analytic_obj.search(cr, uid, [('name','=', analytic_journal.name), | 130 | new_journal_ids = analytic_obj.search(cr, uid, [('name','=', analytic_journal.name), |
138 | 132 | ('instance_id','=',instance_id)], context=context) | 131 | ('instance_id', '=', vals['instance_id'])], context=context) |
139 | 133 | if len(new_journal_ids) > 0: | 132 | if len(new_journal_ids) > 0: |
140 | 134 | vals['analytic_journal_id'] = new_journal_ids[0] | 133 | vals['analytic_journal_id'] = new_journal_ids[0] |
141 | 135 | return super(account_journal, self).create(cr, uid, vals, context=context) | 134 | return super(account_journal, self).create(cr, uid, vals, context=context) |
142 | 136 | 135 | ||
143 | === modified file 'bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv' | |||
144 | --- bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2019-05-14 15:12:35 +0000 | |||
145 | +++ bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2019-06-12 15:18:02 +0000 | |||
146 | @@ -150,7 +150,7 @@ | |||
147 | 150 | msf_sync_data_server.trigger_something,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Down,"[]","['name']",OC,sync.trigger.something,,Trigger Something,Valid,,11 | 150 | msf_sync_data_server.trigger_something,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Down,"[]","['name']",OC,sync.trigger.something,,Trigger Something,Valid,,11 |
148 | 151 | msf_sync_data.msf_instance_cloud,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,[],"['cloud_url', 'cloud_login', 'cloud_password', 'cloud_schedule_time', 'instance', 'cloud_retry_from', 'cloud_retry_to']",OC,msf.instance.cloud,instance,Cloud backup config,Valid,,728 | 151 | msf_sync_data.msf_instance_cloud,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,[],"['cloud_url', 'cloud_login', 'cloud_password', 'cloud_schedule_time', 'instance', 'cloud_retry_from', 'cloud_retry_to']",OC,msf.instance.cloud,instance,Cloud backup config,Valid,,728 |
149 | 152 | msf_sync_data_server.ir_translation,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Down,"[('res_id', '!=', 0), ('src', '!=', False), ('xml_id', '!=', False), ('lang', '!=', 'en_US'), ('type', '=', 'model'), ('name', 'in', ['res.partner.category,name','product.uom,name','product.template,description_purchase','product.template,description','product.template,description_sale','product.uom.categ,name','product.pricelist,name','product.category,name','product.nomenclature,name','product.product,form_value','product.product,function_value','product.product,fit_value','res.currency,currency_name','res.country,name','product.ul,name','product.price.type,name','product.pricelist.type,name','product.pricelist.version,name','account.analytic.account,name','account.fiscal.position,note','hr.employee.marital.status,name','account.period,name','account.tax.code,name','account.journal,name','account.tax,name','account.analytic.journal,name','account.account,name','stock.reason.type,name','product.template,name','product.justification.code,code'])]","['lang', 'src', 'name', 'value', 'type', 'xml_id']",OC,ir.translation,,Translations,Valid,,730 | 152 | msf_sync_data_server.ir_translation,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Down,"[('res_id', '!=', 0), ('src', '!=', False), ('xml_id', '!=', False), ('lang', '!=', 'en_US'), ('type', '=', 'model'), ('name', 'in', ['res.partner.category,name','product.uom,name','product.template,description_purchase','product.template,description','product.template,description_sale','product.uom.categ,name','product.pricelist,name','product.category,name','product.nomenclature,name','product.product,form_value','product.product,function_value','product.product,fit_value','res.currency,currency_name','res.country,name','product.ul,name','product.price.type,name','product.pricelist.type,name','product.pricelist.version,name','account.analytic.account,name','account.fiscal.position,note','hr.employee.marital.status,name','account.period,name','account.tax.code,name','account.journal,name','account.tax,name','account.analytic.journal,name','account.account,name','stock.reason.type,name','product.template,name','product.justification.code,code'])]","['lang', 'src', 'name', 'value', 'type', 'xml_id']",OC,ir.translation,,Translations,Valid,,730 |
151 | 153 | msf_sync_data_server.ir_translation_journal_up,TRUE,TRUE,FALSE,TRUE,bidirectional,Bidirectional,"[('res_id', '!=', 0), ('src', '!=', False), ('xml_id', '!=', False), ('lang', '!=', 'en_US'), ('type', '=', 'model'), ('name', 'in', ['account.journal,name'])]","['lang', 'src', 'name', 'value', 'type', 'xml_id']",HQ + MISSION,ir.translation,,Translations,Valid,,731 | 153 | msf_sync_data_server.ir_translation_journal_up,TRUE,TRUE,FALSE,TRUE,bidirectional,Bidirectional,"[('res_id', '!=', 0), ('src', '!=', False), ('xml_id', '!=', False), ('lang', '!=', 'en_US'), ('type', '=', 'model'), ('name', 'in', ['account.journal,name', 'account.analytic.journal,name'])]","['lang', 'src', 'name', 'value', 'type', 'xml_id']",HQ + MISSION,ir.translation,,Translations,Valid,,731 |
152 | 154 | msf_sync_data_server.cash_request,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,"[('state', '!=', 'draft')]","['name', 'prop_instance_id/id', 'month_period_id/id', 'request_date', 'consolidation_currency_id/id', 'transfer_account_id/id', 'bank_journal_id/id', 'state', 'instance_ids/id', 'transfer_to_come', 'security_envelope', 'buffer', 'total_to_transfer', 'past_transfer_ids/id']",HQ + MISSION,cash.request,,Cash Request,Valid,,740 | 154 | msf_sync_data_server.cash_request,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,"[('state', '!=', 'draft')]","['name', 'prop_instance_id/id', 'month_period_id/id', 'request_date', 'consolidation_currency_id/id', 'transfer_account_id/id', 'bank_journal_id/id', 'state', 'instance_ids/id', 'transfer_to_come', 'security_envelope', 'buffer', 'total_to_transfer', 'past_transfer_ids/id']",HQ + MISSION,cash.request,,Cash Request,Valid,,740 |
153 | 155 | msf_sync_data_server.cash_request_transfer_currency,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,"[('cash_request_id.state', '!=', 'draft')]","['currency_id/id', 'percentage', 'cash_request_id/id']",HQ + MISSION,cash.request.transfer.currency,,Cash Request Transfer Currency,Valid,,741 | 155 | msf_sync_data_server.cash_request_transfer_currency,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,"[('cash_request_id.state', '!=', 'draft')]","['currency_id/id', 'percentage', 'cash_request_id/id']",HQ + MISSION,cash.request.transfer.currency,,Cash Request Transfer Currency,Valid,,741 |
154 | 156 | msf_sync_data_server.cash_request_commitment,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,"[('cash_request_id.state', '!=', 'draft')]","['instance_id/id', 'instance_level', 'period_id/id', 'cash_request_id/id', 'total_commitment']",HQ + MISSION,cash.request.commitment,,Cash Request Commitment,Valid,,742 | 156 | msf_sync_data_server.cash_request_commitment,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,"[('cash_request_id.state', '!=', 'draft')]","['instance_id/id', 'instance_level', 'period_id/id', 'cash_request_id/id', 'total_commitment']",HQ + MISSION,cash.request.commitment,,Cash Request Commitment,Valid,,742 |
155 | 157 | 157 | ||
156 | === modified file 'bin/addons/msf_tools/msf_tools.py' | |||
157 | --- bin/addons/msf_tools/msf_tools.py 2019-05-06 09:49:19 +0000 | |||
158 | +++ bin/addons/msf_tools/msf_tools.py 2019-06-12 15:18:02 +0000 | |||
159 | @@ -667,10 +667,19 @@ | |||
160 | 667 | return prod[0]['product_tmpl_id'][0] | 667 | return prod[0]['product_tmpl_id'][0] |
161 | 668 | return res_id | 668 | return res_id |
162 | 669 | 669 | ||
167 | 670 | def _audit_product_name(self, cr, uid, ids, vals, context=None): | 670 | def _audit_translatable_fields(self, cr, uid, ids, vals, context=None): |
168 | 671 | if context.get('sync_update_execution') and vals.get('name') == 'product.template,name' and vals.get('lang'): | 671 | """ |
169 | 672 | templ_obj = self.pool.get('product.template') | 672 | Fills in the Track Changes for translatable fields at synchro time, |
170 | 673 | audit_rule_ids = templ_obj.check_audit(cr, uid, 'write') | 673 | e.g. track the updates received on journal name in the Track Changes of the Journal object |
171 | 674 | """ | ||
172 | 675 | fields = ['product.template,name', 'account.account,name', 'account.analytic.account,name', | ||
173 | 676 | 'account.journal,name', 'account.analytic.journal,name'] | ||
174 | 677 | if context is None: | ||
175 | 678 | context = {} | ||
176 | 679 | if context.get('sync_update_execution') and vals.get('name') in fields and vals.get('lang'): | ||
177 | 680 | obj_name = vals['name'].split(',')[0] | ||
178 | 681 | obj = self.pool.get(obj_name) | ||
179 | 682 | audit_rule_ids = obj.check_audit(cr, uid, 'write') | ||
180 | 674 | if audit_rule_ids: | 683 | if audit_rule_ids: |
181 | 675 | new_ctx = context.copy() | 684 | new_ctx = context.copy() |
182 | 676 | new_ctx['lang'] = vals['lang'] | 685 | new_ctx['lang'] = vals['lang'] |
183 | @@ -678,14 +687,14 @@ | |||
184 | 678 | if not template_id and ids: | 687 | if not template_id and ids: |
185 | 679 | template_id = self.browse(cr, uid, ids[0], fields_to_fetch=['res_id'], context=new_ctx).res_id | 688 | template_id = self.browse(cr, uid, ids[0], fields_to_fetch=['res_id'], context=new_ctx).res_id |
186 | 680 | if template_id: | 689 | if template_id: |
188 | 681 | previous = templ_obj.read(cr, uid, [template_id], ['name'], context=new_ctx)[0] | 690 | previous = obj.read(cr, uid, [template_id], ['name'], context=new_ctx)[0] |
189 | 682 | audit_obj = self.pool.get('audittrail.rule') | 691 | audit_obj = self.pool.get('audittrail.rule') |
191 | 683 | audit_obj.audit_log(cr, uid, audit_rule_ids, templ_obj, template_id, 'write', previous, {template_id: {'name': vals['value']}} , context=context) | 692 | audit_obj.audit_log(cr, uid, audit_rule_ids, obj, template_id, 'write', previous, {template_id: {'name': vals['value']}} , context=context) |
192 | 684 | 693 | ||
193 | 685 | 694 | ||
194 | 686 | 695 | ||
195 | 687 | def write(self, cr, uid, ids, vals, clear=False, context=None): | 696 | def write(self, cr, uid, ids, vals, clear=False, context=None): |
197 | 688 | self._audit_product_name(cr, uid, ids, vals, context=context) | 697 | self._audit_translatable_fields(cr, uid, ids, vals, context=context) |
198 | 689 | return super(ir_translation, self).write(cr, uid, ids, vals, clear=clear, context=context) | 698 | return super(ir_translation, self).write(cr, uid, ids, vals, clear=clear, context=context) |
199 | 690 | 699 | ||
200 | 691 | 700 | ||
201 | @@ -731,8 +740,8 @@ | |||
202 | 731 | self.write(cr, uid, ids, vals, context=context) | 740 | self.write(cr, uid, ids, vals, context=context) |
203 | 732 | return ids[0] | 741 | return ids[0] |
204 | 733 | 742 | ||
207 | 734 | if context.get('sync_update_execution') and vals.get('res_id') and vals.get('name') == 'product.template,name' and vals.get('lang'): | 743 | if context.get('sync_update_execution') and vals.get('res_id') and vals.get('lang'): |
208 | 735 | self._audit_product_name(cr, uid, False, vals, context=context) | 744 | self._audit_translatable_fields(cr, uid, False, vals, context=context) |
209 | 736 | 745 | ||
210 | 737 | return super(ir_translation, self).create(cr, uid, vals, clear=clear, context=context) | 746 | return super(ir_translation, self).create(cr, uid, vals, clear=clear, context=context) |
211 | 738 | 747 |