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

Proposed by jftempo
Status: Merged
Merged at revision: 6471
Proposed branch: lp:~jfb-tempo-consulting/unifield-server/US-10835
Merge into: lp:unifield-server
Diff against target: 2911 lines (+1839/-65) (has conflicts)
35 files modified
bin/addons/account_hq_entries/__init__.py (+2/-22)
bin/addons/account_hq_entries/__openerp__.py (+3/-0)
bin/addons/account_hq_entries/account_view.xml (+156/-1)
bin/addons/account_hq_entries/esc_invoice.py (+203/-0)
bin/addons/account_hq_entries/esc_line_installer.xml (+48/-0)
bin/addons/account_hq_entries/esc_line_report.xml (+42/-0)
bin/addons/account_hq_entries/hq_entries.py (+0/-1)
bin/addons/account_hq_entries/report/__init__.py (+2/-0)
bin/addons/account_hq_entries/report/esc_line_import_report.py (+45/-0)
bin/addons/account_hq_entries/report/esc_line_import_template.mako (+111/-0)
bin/addons/account_hq_entries/report/finance_cost_price.py (+104/-0)
bin/addons/account_hq_entries/wizard/__init__.py (+1/-0)
bin/addons/account_hq_entries/wizard/esc_lines_import.py (+351/-0)
bin/addons/account_hq_entries/wizard/esc_lines_import_view.xml (+89/-0)
bin/addons/delivery_mechanism/delivery_mechanism.py (+80/-5)
bin/addons/msf_audittrail/data/audittrail_hq_entry.yml (+28/-0)
bin/addons/msf_printed_documents/printed_report.xml (+1/-0)
bin/addons/msf_profile/data/patches.xml (+7/-0)
bin/addons/msf_profile/i18n/fr_MF.po (+501/-30)
bin/addons/msf_profile/msf_profile.py (+11/-0)
bin/addons/msf_sync_data_server/data/sync_server.message_rule.csv (+1/-1)
bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv (+2/-0)
bin/addons/product/product.py (+10/-0)
bin/addons/product_attributes/product_attributes.py (+6/-0)
bin/addons/product_attributes/product_attributes_view.xml (+2/-0)
bin/addons/purchase/purchase_order_line.py (+1/-0)
bin/addons/stock/stock_move.py (+8/-2)
bin/addons/sync_client/update.py (+6/-1)
bin/addons/sync_common/common.py (+1/-0)
bin/addons/sync_server/rules.py (+7/-1)
bin/addons/sync_server/rules_view.xml (+1/-1)
bin/addons/sync_server/sync_server.py (+3/-0)
bin/addons/sync_server/update.py (+3/-0)
bin/addons/sync_so/purchase.py (+1/-0)
bin/addons/unifield_setup/setup_configuration.py (+2/-0)
Text conflict in bin/addons/msf_profile/data/patches.xml
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
Text conflict in bin/addons/msf_profile/msf_profile.py
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-server/US-10835
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+440711@code.launchpad.net
To post a comment you must log in.
6441. By jftempo

Delete draft entries

6442. By jftempo

Ignore duplicates / report with errors / unicity constraint on all fields

6443. By jftempo

Import: unicity constraint with NULL, button to reset or keep wizard

6444. By jftempo

import error if qty <= 0

6445. By jftempo

French translations

6446. By jftempo

French translations

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/account_hq_entries/__init__.py'
2--- bin/addons/account_hq_entries/__init__.py 2012-08-14 09:25:23 +0000
3+++ bin/addons/account_hq_entries/__init__.py 2023-05-05 12:01:38 +0000
4@@ -1,29 +1,9 @@
5 #!/usr/bin/env python
6 # -*- coding: utf-8 -*-
7-##############################################################################
8-#
9-# OpenERP, Open Source Management Solution
10-# Copyright (C) 2011 TeMPO Consulting, MSF. All Rights Reserved
11-# Developer: Olivier DOSSMANN
12-#
13-# This program is free software: you can redistribute it and/or modify
14-# it under the terms of the GNU Affero General Public License as
15-# published by the Free Software Foundation, either version 3 of the
16-# License, or (at your option) any later version.
17-#
18-# This program is distributed in the hope that it will be useful,
19-# but WITHOUT ANY WARRANTY; without even the implied warranty of
20-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21-# GNU Affero General Public License for more details.
22-#
23-# You should have received a copy of the GNU Affero General Public License
24-# along with this program. If not, see <http://www.gnu.org/licenses/>.
25-#
26-##############################################################################
27
28 import res_company
29 import hq_entries
30 import wizard
31 import account
32-
33-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
34+import esc_invoice
35+import report
36
37=== modified file 'bin/addons/account_hq_entries/__openerp__.py'
38--- bin/addons/account_hq_entries/__openerp__.py 2017-09-28 14:05:02 +0000
39+++ bin/addons/account_hq_entries/__openerp__.py 2023-05-05 12:01:38 +0000
40@@ -33,6 +33,9 @@
41 'security/ir.model.access.csv',
42 'wizard/wizard_view.xml',
43 'account_view.xml',
44+ 'esc_line_installer.xml',
45+ 'wizard/esc_lines_import_view.xml',
46+ 'esc_line_report.xml',
47 ],
48 "demo_xml" : [],
49 "test": [
50
51=== modified file 'bin/addons/account_hq_entries/account_view.xml'
52--- bin/addons/account_hq_entries/account_view.xml 2022-10-13 12:32:09 +0000
53+++ bin/addons/account_hq_entries/account_view.xml 2023-05-05 12:01:38 +0000
54@@ -329,7 +329,162 @@
55 <menuitem id="menu_hq" name="HQ" parent="account.menu_finance" sequence="6"/>
56 <menuitem name="HQ Import" action="action_hq_entries_import_wizard" type="server" id="menu_hq_entries_import" parent="menu_hq" sequence="1"/>
57 <menuitem name="HQ Entries" action="action_hq_entries_tree" id="menu_hq_entries" parent="menu_hq" sequence="2"/>
58-
59+
60+
61+ <record id="esc_invoice_line_filter" model="ir.ui.view">
62+ <field name="name">International Invoices Lines</field>
63+ <field name="model">esc.invoice.line</field>
64+ <field name="type">search</field>
65+ <field name="arch" type="xml">
66+ <search string="International Invoices Lines">
67+ <filter icon="gtk-new" string="Not Done" domain="[('state', '!=', 'done')]" />
68+ <filter icon="gtk-apply" string="Done" domain="[('state', '=', 'done')]" />
69+ <separator orientation="vertical"/>
70+ <field name="po_name" />
71+ <field name="product_id" />
72+ <field name="requestor_cc_id" />
73+ <field name="consignee_cc_id"/>
74+ <field name="shipment_ref"/>
75+ <newline/>
76+ <group expand="0" string="Group By..." colspan="12" col="10">
77+ <filter string="PO Reference" icon="terp-partner" domain="[]" context="{'group_by':'po_name'}"/>
78+ <separator orientation="vertical"/>
79+ <filter string="Product" icon="terp-folder-green" context="{'group_by':'product_id'}"/>
80+ <separator orientation="vertical"/>
81+ <filter string="Requestor" icon="terp-go-month" domain="[]" context="{'group_by':'requestor_cc_id'}"/>
82+ <separator orientation="vertical"/>
83+ <filter string="Consignee" icon="gtk-about" domain="[]" context="{'group_by': 'consignee_cc_id'}"/>
84+ </group>
85+ <newline/>
86+ </search>
87+ </field>
88+ </record>
89+
90+ <record id="esc_invoice_line_tree" model="ir.ui.view">
91+ <field name="name">International Invoices Lines</field>
92+ <field name="model">esc.invoice.line</field>
93+ <field name="type">tree</field>
94+ <field name="arch" type="xml">
95+ <tree string="International Invoices Line" editable="top" hide_new_button="1" hide_delete_button="1" hide_edit_button="1" noteditable="1">
96+ <field name="po_name" readonly="1"/>
97+ <field name="product_id" readonly="1" />
98+ <field name="requestor_cc_id" readonly="1" />
99+ <field name="consignee_cc_id" readonly="1" />
100+ <field name="shipment_ref" readonly="1" />
101+ <field name="price_unit" readonly="1" />
102+ <field name="currency_id" readonly="1" />
103+ <field name="product_qty" readonly="1" />
104+ <field name="remaining_qty" readonly="1" />
105+ <field name="in_number" />
106+ <field name="state" readonly="1" />
107+ <button name="delete" string="Delete" icon="gtk-del" type="object" states='1_draft' confirm="Do you want to delete this line ?" />
108+ </tree>
109+ </field>
110+ </record>
111+
112+ <record id="esc_invoice_line_form" model="ir.ui.view">
113+ <field name="name">International Invoices Lines</field>
114+ <field name="model">esc.invoice.line</field>
115+ <field name="type">form</field>
116+ <field name="arch" type="xml">
117+ <form string="International Invoices Line" hide_new_button="1" hide_duplicate_button="1">
118+ <field name="po_name" readonly="1" />
119+ <field name="product_id" readonly="1" />
120+ <field name="requestor_cc_id" readonly="1" />
121+ <field name="consignee_cc_id" readonly="1" />
122+ <field name="shipment_ref" readonly="1" />
123+ <field name="price_unit" readonly="1" />
124+ <field name="product_qty" readonly="1" />
125+ <field name="remaining_qty" readonly="1" />
126+ <field name="uom_id" readonly="1" />
127+ <field name="currency_id" readonly="1" />
128+ <field name="in_number" />
129+ <field name="state" readonly="1" />
130+ </form>
131+ </field>
132+ </record>
133+
134+ <record model="ir.actions.act_window" id="esc_invoice_line_action">
135+ <field name="name">International Invoices Lines</field>
136+ <field name="res_model">esc.invoice.line</field>
137+ <field name="view_type">form</field>
138+ <field name="view_mode">tree,form</field>
139+ <field name="view_id" ref="esc_invoice_line_tree"/>
140+ </record>
141+ <menuitem name="International Invoices Lines" action="esc_invoice_line_action" id="esc_invoice_line_menu" parent="menu_hq" sequence="20"/>
142+
143+
144+
145+ <record id="finance_price_track_changes_filter" model="ir.ui.view">
146+ <field name="name">Line Matching</field>
147+ <field name="model">finance_price.track_changes</field>
148+ <field name="type">search</field>
149+ <field name="arch" type="xml">
150+ <search string="Line Matching">
151+ <field name="product_id" />
152+ <field name="stock_picking_id" />
153+ <field name="matching_type" />
154+ <field name="esc_invoice_line_id"/>
155+ <newline/>
156+ </search>
157+ </field>
158+ </record>
159+
160+ <record id="finance_price_track_changes_tree" model="ir.ui.view">
161+ <field name="name">Line Matching</field>
162+ <field name="model">finance_price.track_changes</field>
163+ <field name="type">tree</field>
164+ <field name="arch" type="xml">
165+ <tree string="Line Matching" editable="top" hide_new_button="1" hide_delete_button="1" hide_edit_button="1" noteditable="1">
166+ <field name="product_id" />
167+ <field name="old_price" />
168+ <field name="new_price" />
169+ <field name="qty_processed" />
170+ <field name="price_unit" />
171+ <field name="stock_before" />
172+ <field name="stock_picking_id" />
173+ <field name="stock_move_id" />
174+ <field name="purchase_oder_line_id" />
175+ <field name="esc_invoice_line_id" />
176+ <field name="matching_type" />
177+ </tree>
178+ </field>
179+ </record>
180+
181+ <record model="ir.actions.act_window" id="finance_price_track_changes_action">
182+ <field name="name">Line Matching</field>
183+ <field name="res_model">finance_price.track_changes</field>
184+ <field name="view_type">form</field>
185+ <field name="view_mode">tree,form</field>
186+ <field name="context">{'display_move_line': True}</field>
187+ </record>
188+ <menuitem name="Line Matching" action="finance_price_track_changes_action" id="finance_price_track_changes_menu" parent="menu_hq" sequence="30"/>
189+
190+ <act_window
191+ id="esc_line_to_finance_price_tc"
192+ name="Matching"
193+ src_model="esc.invoice.line"
194+ res_model="finance_price.track_changes"
195+ target="current"
196+ view_type="form"
197+ view_mode="tree"
198+ context="{'display_move_line': True}"
199+ domain="[('esc_invoice_line_id', 'in', active_ids)]" />
200+
201+ <record id="esc_line_delete_action" model="ir.actions.server">
202+ <field name="name">Delete Selected draft entries</field>
203+ <field name="model_id" ref="model_esc_invoice_line"/>
204+ <field name="state">code</field>
205+ <field name="code">action = obj.delete_action(context=context)</field>
206+ </record>
207+
208+ <record id="esc_line_delete_menu" model="ir.values">
209+ <field name="key2">client_action_multi</field>
210+ <field name="model">esc.invoice.line</field>
211+ <field name="name">Delete Selected draft entries</field>
212+ <field eval="'ir.actions.server,%d'%esc_line_delete_action" name="value"/>
213+ <field eval="True" name="object"/>
214+ </record>
215
216 </data>
217 </openerp>
218
219=== added file 'bin/addons/account_hq_entries/esc_invoice.py'
220--- bin/addons/account_hq_entries/esc_invoice.py 1970-01-01 00:00:00 +0000
221+++ bin/addons/account_hq_entries/esc_invoice.py 2023-05-05 12:01:38 +0000
222@@ -0,0 +1,203 @@
223+#!/usr/bin/env python
224+# -*- coding: utf-8 -*-
225+
226+from osv import osv
227+from osv import fields
228+import decimal_precision as dp
229+from tools.translate import _
230+
231+
232+class esc_invoice_line(osv.osv):
233+ _name = 'esc.invoice.line'
234+ _description = 'International Invoices Line'
235+ _rec_name = 'po_name'
236+ _order = 'id desc'
237+ _sync_order = 'id'
238+ _trace = True
239+
240+ def _auto_init(self, cr, context=None):
241+ super(esc_invoice_line, self)._auto_init(cr, context)
242+ if not cr.index_exists('esc_invoice_line', 'esc_invoice_line_line_unique_all_field_idx'):
243+ cr.execute("CREATE UNIQUE INDEX esc_invoice_line_line_unique_all_field_idx ON esc_invoice_line (po_name,requestor_cc_id,coalesce(consignee_cc_id, 0),product_id,product_qty,price_unit,coalesce(shipment_ref,''),currency_id)")
244+
245+
246+ def _get_dest_instance_id(self, cr, uid, ids, field_name, args, context=None):
247+ res = {}
248+ cur_instance = self.pool.get('res.company')._get_instance_record(cr, uid)
249+ if cur_instance.level != 'section':
250+ hq_id = cur_instance.parent_id.parent_id and cur_instance.parent_id.parent_id.id or cur_instance.parent_id.id or False
251+ for _id in ids:
252+ res[_id] = hq_id
253+ return res
254+
255+ for esc_line in self.browse(cr, uid, ids, fields_to_fetch=['requestor_cc_id', 'consignee_cc_id'], context=context):
256+ cc = esc_line.consignee_cc_id or esc_line.requestor_cc_id
257+ res[esc_line.id] = cc.po_fo_cc_instance_ids and cc.po_fo_cc_instance_ids[0].id or False
258+ return res
259+
260+ def _get_in_number(self, cr, uid, ids, field_name, args, context=None):
261+ res = {}
262+ if not ids:
263+ return {}
264+
265+ for _id in ids:
266+ res[_id] = False
267+
268+ cr.execute('''
269+ select
270+ tc.esc_invoice_line_id, string_agg(distinct(pick.name),' ' order by pick.name)
271+ from
272+ finance_price_track_changes tc, stock_move m, stock_picking pick
273+ where
274+ m.id = tc.stock_move_id
275+ and m.picking_id = pick.id
276+ and tc.esc_invoice_line_id in %s
277+ group by
278+ tc.esc_invoice_line_id
279+ ''', (tuple(ids), ))
280+ for x in cr.fetchall():
281+ res[x[0]] = x[1]
282+ return res
283+
284+ _columns = {
285+ 'po_name': fields.char('PO Reference', size=64, required=1, select=1),
286+ 'requestor_cc_id': fields.many2one('account.analytic.account', 'Requestor Cost Center', required=1, domain="[('category','=', 'OC'), ('type', '!=', 'view')]"),
287+ 'consignee_cc_id': fields.many2one('account.analytic.account', 'Consignee Cost Center', domain="[('category','=', 'OC'), ('type', '!=', 'view')]"),
288+ 'imported_consignee_instance': fields.char('Consignee Instance', size=128),
289+ 'dest_instance_id': fields.function(_get_dest_instance_id, method=1, type='many2one', relation='msf.instance', string='Destination Instance'),
290+ 'product_id': fields.many2one('product.product', 'Product', required=1, select=1),
291+ 'price_unit': fields.float('Unit Price', required=1, digits_compute=dp.get_precision('Purchase Price Computation')),
292+ 'product_qty': fields.float('Quantity', required=True, digits=(16, 2), related_uom='uom_id'),
293+ 'remaining_qty': fields.float('Remaining Quantity', digits=(16, 2), readonly=1, related_uom='uom_id'),
294+ 'uom_id': fields.many2one('product.uom', 'UoM'),
295+ 'currency_id': fields.many2one('res.currency', 'Currency', required=1),
296+ 'shipment_ref': fields.char('Field mapping with IN', size=128),
297+
298+ 'in_number': fields.function(_get_in_number, type='char', method=True, string='IN Number'),
299+ 'state': fields.selection([('1_draft', 'Draft'), ('0_open', 'Open'), ('done', 'Done')], 'State', readonly=1),
300+
301+ }
302+
303+ _defaults = {
304+ 'state': '1_draft',
305+ }
306+
307+
308+ _sql_constraints = [
309+ ('product_qty', 'check(product_qty>0)', 'Quantity must be greater than 0.'),
310+ ]
311+
312+
313+ def _update_remaining(self, cr, uid, ids, vals, context=None):
314+ if not ids:
315+ return
316+ if isinstance(ids, (int, long)):
317+ ids = [ids]
318+ if 'product_qty' in vals and vals.get('state', '1_draft') == '1_draft':
319+ cr.execute("update esc_invoice_line set remaining_qty=product_qty where state='1_draft' and id in %s", (tuple(ids), ))
320+
321+
322+ def write(self, cr, uid, ids, vals, context=None):
323+ ret = super(esc_invoice_line, self).write(cr, uid, ids, vals, context)
324+ self._update_remaining(cr, uid, ids, vals, context)
325+ return ret
326+
327+ def create(self, cr, uid, vals, context=None):
328+ new_id = super(esc_invoice_line, self).create(cr, uid, vals, context)
329+ self._update_remaining(cr, uid, [new_id], vals, context)
330+ return new_id
331+
332+ def delete_action(self, cr, uid, ids, context=None):
333+ if not context:
334+ context = {}
335+ active_ids = context.get('active_ids')
336+ self.delete(cr, uid, active_ids, context=context)
337+ return {'type': 'ir.actions.refresh_o2m', 'o2m_refresh': '_terp_list'}
338+
339+ def delete(self, cr, uid, ids, context=None):
340+ to_del_ids = self.search(cr, uid, [('id', 'in', ids), ('state', '=', '1_draft')], context=context)
341+ if to_del_ids:
342+ self.unlink(cr, uid, to_del_ids, context=context)
343+ return True
344+
345+
346+
347+esc_invoice_line()
348+
349+class finance_price_track_changes(osv.osv):
350+ _name = 'finance_price.track_changes'
351+ _rec_name = 'product_id'
352+ _description = 'International Invoices Lines Matching'
353+ _order = 'id desc'
354+
355+ _columns = {
356+ 'product_id': fields.many2one('product.product', string='Product', required=True, readonly=True, ondelete='cascade', select=1),
357+ 'old_price': fields.float(string='Previous Finance Price', digits_compute=dp.get_precision('Purchase Price Computation'), required=False, readonly=True),
358+ 'new_price': fields.float(string='New Finance Price', digits_compute=dp.get_precision('Purchase Price Computation'), required=False, readonly=True),
359+ 'user_id': fields.many2one('res.users', 'User', readonly=True),
360+ 'date': fields.datetime('Date', readonly=True),
361+ 'qty_processed': fields.float('Quantity Processed', readonly=True, digits=(16, 2)),
362+ 'price_unit': fields.float('Unit Price', required=1, digits_compute=dp.get_precision('Purchase Price Computation'), readonly=True),
363+ 'stock_before': fields.float('Qty in Stock Before', readonly=True, digits=(16, 2)),
364+ 'matching_type': fields.selection([('iil', 'International Lines'), ('po', 'PO'), ('invoice', 'Invoice')], 'Matching Type', readonly=True),
365+
366+ 'stock_move_id': fields.many2one('stock.move', 'Move line', readonly=True),
367+ 'stock_picking_id': fields.related('stock_move_id', 'picking_id', string='IN', type='many2one', relation='stock.picking', readonly=True, domain="[('type', '=', 'in'), ('state', '=', 'done')]"),
368+
369+ 'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True),
370+ 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
371+
372+ 'purchase_oder_line_id': fields.many2one('purchase.order.line', 'PO line', readonly=True),
373+
374+ 'esc_invoice_line_id': fields.many2one('esc.invoice.line', 'International Line', readonly=True),
375+ 'comment': fields.char('Comment', size=256),
376+ }
377+
378+ _defaults = {
379+ 'user_id': lambda self, cr, uid, *a, **b: hasattr(uid, 'realUid') and uid.realUid or uid,
380+ 'date': lambda *a: fields.datetime.now(),
381+ }
382+
383+finance_price_track_changes()
384+
385+class esc_line_setup(osv.osv_memory):
386+ _name = 'esc_line.setup'
387+ _inherit = 'res.config'
388+
389+ _columns = {
390+ 'esc_line': fields.boolean(string='Activate International Invoices Lines ?'),
391+ }
392+
393+ def default_get(self, cr, uid, fields, context=None, from_web=False):
394+ """
395+ """
396+ if context is None:
397+ context = {}
398+ setup = self.pool.get('unifield.setup.configuration').get_config(cr, uid)
399+ res = super(esc_line_setup, self).default_get(cr, uid, fields, context=context, from_web=from_web)
400+ res['esc_line'] = setup.esc_line
401+ return res
402+
403+ def execute(self, cr, uid, ids, context=None):
404+ if context is None:
405+ context = {}
406+ if not isinstance(ids, list) or len(ids) != 1:
407+ raise osv.except_osv(_('Error'), _('An error has occurred with the item retrieved from the form. Please contact an administrator if the problem persists.'))
408+ wiz = self.browse(cr, uid, ids[0], fields_to_fetch=['esc_line'], context=context)
409+ setup_obj = self.pool.get('unifield.setup.configuration')
410+ setup = setup_obj.get_config(cr, uid)
411+ if setup:
412+ for module, xmlid in [('account_hq_entries', 'finance_price_track_changes_menu'), ('account_hq_entries', 'esc_invoice_line_menu'), ('account_hq_entries', 'esc_line_import_menu')]:
413+ menu_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, module, xmlid)[1]
414+ self.pool.get('ir.ui.menu').write(cr, uid, menu_id, {'active': wiz.esc_line}, context=context)
415+ report_fin_price_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_hq_entries', 'report_finance_cost_price')[1]
416+ ir_value_id = self.pool.get('ir.values').search(cr, uid, [('key', '=', 'action'), ('key2', '=', 'client_print_multi'), ('model', '=', 'product.product'), ('value', '=', 'ir.actions.report.xml,%d'%report_fin_price_id)], context=context)
417+ if ir_value_id:
418+ user_id = False
419+ if not wiz.esc_line:
420+ user_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'user_sync')[1]
421+ self.pool.get('ir.values').write(cr, uid, ir_value_id, {'user_id': user_id}, context=context)
422+
423+ setup_obj.write(cr, uid, [setup.id], {'esc_line': wiz.esc_line}, context=context)
424+
425+esc_line_setup()
426
427=== added file 'bin/addons/account_hq_entries/esc_line_installer.xml'
428--- bin/addons/account_hq_entries/esc_line_installer.xml 1970-01-01 00:00:00 +0000
429+++ bin/addons/account_hq_entries/esc_line_installer.xml 2023-05-05 12:01:38 +0000
430@@ -0,0 +1,48 @@
431+<openerp>
432+ <data>
433+ <record id="view_esc_line_setup" model="ir.ui.view">
434+ <field name="name">International Invoices Lines</field>
435+ <field name="model">esc_line.setup</field>
436+ <field name="type">form</field>
437+ <field name="inherit_id" ref="base.res_config_view_base"/>
438+ <field name="arch" type="xml">
439+ <data>
440+ <form position="attributes">
441+ <attribute name="string">Activate International Invoices Lines</attribute>
442+ </form>
443+ <xpath expr="//label[@string='description']" position="attributes">
444+ <attribute name="string"></attribute>
445+ </xpath>
446+ <xpath expr='//separator[@string="title"]' position='attributes'>
447+ <attribute name='string'>Activate International Invoices Lines</attribute>
448+ </xpath>
449+ <xpath expr='//separator[@string="vsep"]' position='attributes'>
450+ <attribute name='rowspan'>25</attribute>
451+ <attribute name='string'></attribute>
452+ </xpath>
453+ <group string="res_config_contents" position="replace">
454+ <group colspan="5">
455+ <field name="esc_line" />
456+ </group>
457+ </group>
458+ </data>
459+ </field>
460+ </record>
461+
462+ <record id="action_esc_line_setup" model="ir.actions.act_window">
463+ <field name="name">Activate International Invoices Lines</field>
464+ <field name="type">ir.actions.act_window</field>
465+ <field name="res_model">esc_line.setup</field>
466+ <field name="view_id" ref="view_esc_line_setup"/>
467+ <field name="view_type">form</field>
468+ <field name="view_mode">form</field>
469+ <field name="target">new</field>
470+ </record>
471+
472+ <record id="esc_line_setup_todo" model="ir.actions.todo">
473+ <field name="action_id" ref="action_esc_line_setup"/>
474+ <field name="sequence">16</field>
475+ <field name="restart">always</field>
476+ </record>
477+ </data>
478+</openerp>
479
480=== added file 'bin/addons/account_hq_entries/esc_line_report.xml'
481--- bin/addons/account_hq_entries/esc_line_report.xml 1970-01-01 00:00:00 +0000
482+++ bin/addons/account_hq_entries/esc_line_report.xml 2023-05-05 12:01:38 +0000
483@@ -0,0 +1,42 @@
484+<?xml version="1.0" encoding="utf-8" ?>
485+<openerp>
486+ <data>
487+
488+ <report
489+ id="report_finance_cost_price"
490+ string="Track Changes Finance Price"
491+ model="product.product"
492+ name="report_finance_cost_price"
493+ report_type="openpyxl"
494+ header="False"
495+ auto="False"
496+ menu="True"
497+ sequence="110"
498+ />
499+
500+
501+ <report
502+ id="esc_line_import_template"
503+ string="International Invoices Lines Template"
504+ model="esc.line.import"
505+ name="esc_line_import_template"
506+ file="account_hq_entries/report/esc_line_import_template.mako"
507+ report_type="webkit"
508+ header="False"
509+ auto="False"
510+ menu="False"
511+ />
512+
513+ <report
514+ id="esc_line_import_rejected"
515+ string="International Invoices Rejected Lines"
516+ model="esc.line.import"
517+ name="esc_line_import_rejected"
518+ file="account_hq_entries/report/esc_line_import_template.mako"
519+ report_type="webkit"
520+ header="False"
521+ auto="False"
522+ menu="False"
523+ />
524+ </data>
525+</openerp>
526
527=== modified file 'bin/addons/account_hq_entries/hq_entries.py'
528--- bin/addons/account_hq_entries/hq_entries.py 2022-10-13 08:11:44 +0000
529+++ bin/addons/account_hq_entries/hq_entries.py 2023-05-05 12:01:38 +0000
530@@ -4,7 +4,6 @@
531 #
532 # OpenERP, Open Source Management Solution
533 # Copyright (C) 2011 TeMPO Consulting, MSF. All Rights Reserved
534-# Developer: Olivier DOSSMANN
535 #
536 # This program is free software: you can redistribute it and/or modify
537 # it under the terms of the GNU Affero General Public License as
538
539=== added directory 'bin/addons/account_hq_entries/report'
540=== added file 'bin/addons/account_hq_entries/report/__init__.py'
541--- bin/addons/account_hq_entries/report/__init__.py 1970-01-01 00:00:00 +0000
542+++ bin/addons/account_hq_entries/report/__init__.py 2023-05-05 12:01:38 +0000
543@@ -0,0 +1,2 @@
544+import finance_cost_price
545+import esc_line_import_report
546
547=== added file 'bin/addons/account_hq_entries/report/esc_line_import_report.py'
548--- bin/addons/account_hq_entries/report/esc_line_import_report.py 1970-01-01 00:00:00 +0000
549+++ bin/addons/account_hq_entries/report/esc_line_import_report.py 2023-05-05 12:01:38 +0000
550@@ -0,0 +1,45 @@
551+# -*- coding: utf-8 -*-
552+from report import report_sxw
553+from spreadsheet_xml.spreadsheet_xml_write import SpreadsheetReport
554+from tools.safe_eval import safe_eval
555+
556+class ErrorLine(report_sxw.rml_parse):
557+
558+ def __init__(self, cr, uid, name, context):
559+ super(ErrorLine, self).__init__(cr, uid, name, context=context)
560+ self.localcontext.update({
561+ 'get_row': self.get_row,
562+ 'with_error': lambda *a: True,
563+ })
564+
565+ def get_row(self, obj_id):
566+ rej_obj = self.pool.get('esc.line.import.rejected')
567+
568+ limit = 500
569+ offset = 0
570+ while True:
571+ ids = rej_obj.search(self.cr, self.uid, [('wiz_id', '=', obj_id)], offset=offset, limit=limit)
572+ offset += limit
573+ if not ids:
574+ raise StopIteration
575+
576+ for x in rej_obj.browse(self.cr, self.uid, ids):
577+ rows = safe_eval(x.xls_row)
578+ yield rows, x.error
579+
580+ if len(ids) < limit:
581+ raise StopIteration
582+
583+SpreadsheetReport('report.esc_line_import_rejected', 'esc.line.import', 'account_hq_entries/report/esc_line_import_template.mako', parser=ErrorLine)
584+
585+
586+class Template(report_sxw.rml_parse):
587+ def __init__(self, cr, uid, name, context):
588+ super(Template, self).__init__(cr, uid, name, context=context)
589+ self.localcontext.update({
590+ 'get_row': lambda *a, **b: [],
591+ 'with_error': lambda *a: False,
592+ })
593+
594+SpreadsheetReport('report.esc_line_import_template', 'esc.line.import', 'account_hq_entries/report/esc_line_import_template.mako', parser=Template)
595+
596
597=== added file 'bin/addons/account_hq_entries/report/esc_line_import_template.mako'
598--- bin/addons/account_hq_entries/report/esc_line_import_template.mako 1970-01-01 00:00:00 +0000
599+++ bin/addons/account_hq_entries/report/esc_line_import_template.mako 2023-05-05 12:01:38 +0000
600@@ -0,0 +1,111 @@
601+<?xml version="1.0"?>
602+<?mso-application progid="Excel.Sheet"?>
603+<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
604+ xmlns:o="urn:schemas-microsoft-com:office:office"
605+ xmlns:x="urn:schemas-microsoft-com:office:excel"
606+ xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
607+ xmlns:html="http://www.w3.org/TR/REC-html40">
608+ <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
609+ <Author>MSFUser</Author>
610+ <LastAuthor>Loic MANGERET</LastAuthor>
611+ <Created>2012-06-18T15:46:09Z</Created>
612+ <LastSaved>2023-03-24T14:45:03Z</LastSaved>
613+ <Company>Medecins Sans Frontieres</Company>
614+ <Version>16.00</Version>
615+ </DocumentProperties>
616+ <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
617+ <AllowPNG/>
618+ </OfficeDocumentSettings>
619+ <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
620+ <WindowHeight>7910</WindowHeight>
621+ <WindowWidth>19200</WindowWidth>
622+ <WindowTopX>32767</WindowTopX>
623+ <WindowTopY>32767</WindowTopY>
624+ <ProtectStructure>False</ProtectStructure>
625+ <ProtectWindows>False</ProtectWindows>
626+ </ExcelWorkbook>
627+ <Styles>
628+ <Style ss:ID="Default" ss:Name="Normal">
629+ <Alignment ss:Vertical="Bottom"/>
630+ <Borders/>
631+ <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
632+ <Interior/>
633+ <NumberFormat/>
634+ <Protection/>
635+ </Style>
636+ <Style ss:ID="s62">
637+ <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
638+ <Borders/>
639+ <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
640+ <Interior/>
641+ <NumberFormat/>
642+ <Protection ss:Protected="0"/>
643+ </Style>
644+ <Style ss:ID="s63">
645+ <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
646+ <Borders/>
647+ <Font ss:FontName="Arial" ss:Color="#000000" ss:Bold="1"/>
648+ <Interior ss:Color="#FFCC99" ss:Pattern="Solid"/>
649+ <NumberFormat/>
650+ <Protection/>
651+ </Style>
652+ </Styles>
653+ <Worksheet ss:Name="Sheet 1">
654+ <Table x:FullColumns="1"
655+ x:FullRows="1" ss:DefaultRowHeight="14.5">
656+ <Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="149"/>
657+ <Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="145" ss:Span="1"/>
658+ <Column ss:Index="4" ss:StyleID="s62" ss:Width="173" ss:Span="1"/>
659+ <Column ss:Index="6" ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="216.5"/>
660+ <Column ss:StyleID="s62" ss:Width="73"/>
661+ <Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="120"/>
662+ % if with_error():
663+ <Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="216"/>
664+ % endif
665+ <Row ss:AutoFitHeight="0" ss:Height="26.5">
666+ <Cell ss:StyleID="s63"><Data ss:Type="String">Order Reference</Data></Cell>
667+ <Cell ss:StyleID="s63"><Data ss:Type="String">Requestor instance reference/Cost Center</Data></Cell>
668+ <Cell ss:StyleID="s63"><Data ss:Type="String">Consignee UF instance/reference</Data></Cell>
669+ <Cell ss:StyleID="s63"><Data ss:Type="String">Product Code / Item code</Data></Cell>
670+ <Cell ss:StyleID="s63"><Data ss:Type="String">Quantities</Data></Cell>
671+ <Cell ss:StyleID="s63"><Data ss:Type="String">Unit Price</Data></Cell>
672+ <Cell ss:StyleID="s63"><Data ss:Type="String">Currency</Data></Cell>
673+ <Cell ss:StyleID="s63"><Data ss:Type="String">Field mapping with IN</Data></Cell>
674+ % if with_error():
675+ <Cell ss:StyleID="s63"><Data ss:Type="String">Error</Data></Cell>
676+ % endif
677+ </Row>
678+ % for rows in get_row(objects[0].id):
679+ <Row>
680+ % for cell in rows[0]:
681+ <Cell>
682+ % if cell['type'] in ('float', 'int') and cell['data']:
683+ <Data ss:Type="Number">${cell['data'] or ''}</Data>
684+ % else:
685+ <Data ss:Type="String">${cell['data'] or ''}</Data>
686+ % endif
687+ </Cell>
688+ % endfor
689+ % for num in range(len(rows[0]), 8):
690+ <Cell />
691+ % endfor
692+ <Cell><Data ss:Type="String">${rows[1]}</Data></Cell>
693+ </Row>
694+ % endfor
695+ </Table>
696+ <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
697+ <Unsynced/>
698+ <Selected/>
699+ <Panes>
700+ <Pane>
701+ <Number>3</Number>
702+ <ActiveCol>4</ActiveCol>
703+ </Pane>
704+ </Panes>
705+ <ProtectObjects>False</ProtectObjects>
706+ <ProtectScenarios>False</ProtectScenarios>
707+ <EnableSelection>UnlockedCells</EnableSelection>
708+ <AllowInsertRows/>
709+ </WorksheetOptions>
710+ </Worksheet>
711+</Workbook>
712
713=== added file 'bin/addons/account_hq_entries/report/finance_cost_price.py'
714--- bin/addons/account_hq_entries/report/finance_cost_price.py 1970-01-01 00:00:00 +0000
715+++ bin/addons/account_hq_entries/report/finance_cost_price.py 2023-05-05 12:01:38 +0000
716@@ -0,0 +1,104 @@
717+# -*- coding: utf-8 -*-
718+from spreadsheet_xml.xlsx_write import XlsxReport
719+from spreadsheet_xml.xlsx_write import XlsxReportParser
720+from datetime import datetime
721+from tools.translate import _
722+
723+
724+class finance_cost_price(XlsxReportParser):
725+
726+ def generate(self, context=None):
727+ if context is None:
728+ context = {}
729+
730+ sheet = self.workbook.active
731+
732+ self.create_style_from_template('head_title', 'A1')
733+ self.create_style_from_template('head_content', 'C1')
734+ self.create_style_from_template('date_content', 'C5')
735+
736+ self.create_style_from_template('row_title', 'A7')
737+
738+ date_st = [
739+ self.create_style_from_template('date_odd', 'A8'),
740+ self.create_style_from_template('date_even', 'A9')
741+ ]
742+
743+ txt_st = [
744+ self.create_style_from_template('txt_odd', 'B8'),
745+ self.create_style_from_template('txt_even', 'B9')
746+ ]
747+
748+ float_st = [
749+ self.create_style_from_template('float_odd', 'G8'),
750+ self.create_style_from_template('float_even', 'G9')
751+ ]
752+
753+
754+ self.duplicate_column_dimensions(default_width=20.43)
755+ sheet.freeze_panes = 'A8'
756+
757+
758+ prod = self.pool.get('product.product').browse(self.cr, self.uid, self.ids[0], fields_to_fetch=['default_code', 'name', 'company_id'], context=context)
759+ sheet.title = prod.default_code
760+
761+ sheet.merged_cells.ranges.append("A1:B1")
762+ sheet.merged_cells.ranges.append("C1:F1")
763+ sheet.append([self.cell_ro(_('Instance'), 'head_title'), self.cell_ro('', 'head_title'), self.cell_ro(prod.company_id.instance_id.instance, 'head_content')] + [self.cell_ro('', 'head_content')]*3)
764+
765+ sheet.merged_cells.ranges.append("A2:B2")
766+ sheet.merged_cells.ranges.append("C2:F2")
767+ sheet.append([self.cell_ro(_('Product code'), 'head_title'), self.cell_ro('', 'head_title'), self.cell_ro(prod.default_code, 'head_content')] + [self.cell_ro('', 'head_content')]*3)
768+
769+ sheet.merged_cells.ranges.append("A3:B3")
770+ sheet.merged_cells.ranges.append("C3:F3")
771+ sheet.append([self.cell_ro(_('Product Description'), 'head_title'), self.cell_ro('', 'head_title'), self.cell_ro(prod.name, 'head_content')] + [self.cell_ro('', 'head_content')]*3)
772+
773+ sheet.merged_cells.ranges.append("A4:B4")
774+ sheet.merged_cells.ranges.append("C4:F4")
775+ sheet.append([self.cell_ro(_('Currency'), 'head_title'), self.cell_ro('', 'head_title'), self.cell_ro(prod.company_id.currency_id.name, 'head_content')] + [self.cell_ro('', 'head_content')]*3)
776+
777+ sheet.merged_cells.ranges.append("A5:B5")
778+ sheet.merged_cells.ranges.append("C5:F5")
779+ sheet.append([self.cell_ro(_('Generation Date'), 'head_title'), self.cell_ro('', 'head_title'), self.cell_ro(datetime.now(), 'date_content')] + [self.cell_ro('', 'head_content')]*3)
780+
781+ sheet.append([])
782+
783+ sheet.append([
784+ self.cell_ro(_('Date'), 'row_title'),
785+ self.cell_ro(_('User'), 'row_title'),
786+ self.cell_ro(_('Old Finance Price'), 'row_title'),
787+ self.cell_ro(_('New Finance Price'), 'row_title'),
788+ self.cell_ro(_('Transaction'), 'row_title'),
789+ self.cell_ro(_('Stock Level Before'), 'row_title'),
790+ self.cell_ro(_('Qty Processed'), 'row_title'),
791+ self.cell_ro(_('Unit Price'), 'row_title'),
792+ self.cell_ro(_('Matching Type'), 'row_title'),
793+ ])
794+
795+ matching_obj = self.pool.get('finance_price.track_changes')
796+ matching_ids = matching_obj.search(self.cr, self.uid, [('product_id', '=', prod.id)], order='id desc', context=context)
797+
798+ color = 1
799+ previous_in = 0
800+ for tc in matching_obj.browse(self.cr, self.uid, matching_ids, context=context):
801+ if abs(tc.new_price - tc.old_price) < 0.0001:
802+ continue
803+
804+ if previous_in != tc.stock_move_id.id:
805+ previous_in = tc.stock_move_id.id
806+ color = 1 - color
807+ sheet.append([
808+ self.cell_ro(tc.date and datetime.strptime(tc.date, '%Y-%m-%d %H:%M:%S') or '', date_st[color]),
809+ self.cell_ro(tc.user_id.name, txt_st[color]),
810+ self.cell_ro(round(tc.old_price, 5), float_st[color]),
811+ self.cell_ro(round(tc.new_price, 5), float_st[color]),
812+ self.cell_ro(tc.stock_picking_id and tc.stock_picking_id.name or tc.invoice_id and tc.invoice_id.name or tc.comment or '', txt_st[color]),
813+ self.cell_ro(tc.stock_before, float_st[color]),
814+ self.cell_ro(tc.qty_processed, float_st[color]),
815+ self.cell_ro(round(tc.price_unit, 5), float_st[color]),
816+ self.cell_ro(self.getSel(tc, 'matching_type'), txt_st[color]),
817+ ])
818+
819+XlsxReport('report.report_finance_cost_price', parser=finance_cost_price, template='addons/account_hq_entries/report/finance_cost_price.xlsx')
820+
821
822=== added file 'bin/addons/account_hq_entries/report/finance_cost_price.xlsx'
823Binary files bin/addons/account_hq_entries/report/finance_cost_price.xlsx and bin/addons/account_hq_entries/report/finance_cost_price.xlsx differ
824=== modified file 'bin/addons/account_hq_entries/wizard/__init__.py'
825--- bin/addons/account_hq_entries/wizard/__init__.py 2013-11-19 10:37:31 +0000
826+++ bin/addons/account_hq_entries/wizard/__init__.py 2023-05-05 12:01:38 +0000
827@@ -26,4 +26,5 @@
828 import hq_entries_validation
829 import hq_entries_split
830 import hq_entries_unsplit
831+import esc_lines_import
832 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
833
834=== added file 'bin/addons/account_hq_entries/wizard/esc_lines_import.py'
835--- bin/addons/account_hq_entries/wizard/esc_lines_import.py 1970-01-01 00:00:00 +0000
836+++ bin/addons/account_hq_entries/wizard/esc_lines_import.py 2023-05-05 12:01:38 +0000
837@@ -0,0 +1,351 @@
838+#!/usr/bin/env python
839+# -*- coding: utf-8 -*-
840+from osv import osv
841+from osv import fields
842+from spreadsheet_xml.spreadsheet_xml import SpreadsheetXML
843+import threading
844+import pooler
845+import tools
846+from tools.translate import _
847+import time
848+import base64
849+import re
850+from psycopg2 import IntegrityError
851+
852+
853+class esc_line_import_rejected(osv.osv):
854+ _name = 'esc.line.import.rejected'
855+ _description = 'Rejected Lines'
856+ _rec_name = 'wiz_id'
857+ _order = 'wiz_id desc, id asc'
858+
859+ _columns = {
860+ 'wiz_id': fields.many2one('esc.line.import', 'Import', required=1),
861+ 'error': fields.text('Reason'),
862+ 'xls_row': fields.text('Row'),
863+ }
864+
865+esc_line_import_rejected()
866+
867+class esc_line_import_wizard(osv.osv):
868+ _name = 'esc.line.import'
869+ _description = 'Import International Invoices Lines'
870+ _rec_name = 'start_date'
871+
872+ _columns = {
873+ 'file': fields.binary(string="File"),
874+ 'filename': fields.char(string="Imported filename", size=256),
875+ 'progress': fields.integer(string="Progression", readonly=True),
876+ 'state': fields.selection([('draft', 'Draft'), ('inprogress', 'In-progress'), ('error', 'Error'), ('done', 'Done'), ('ack', 'ack')],'State', readonly=1),
877+ 'created': fields.integer('Processed', readonly=1),
878+ 'total': fields.integer('Total', readonly=1),
879+ 'nberrors': fields.integer('Errors', readonly=1),
880+ 'error': fields.text('Error', readonly=1),
881+ 'start_date': fields.datetime('Start Date', readonly=1),
882+ 'end_date': fields.datetime('End Date', readonly=1),
883+ }
884+
885+ _defaults = {
886+ 'state': 'draft',
887+ }
888+
889+ def __init__(self, pool, cr):
890+ super(esc_line_import_wizard, self).__init__(pool, cr)
891+ if cr.column_exists('esc_line_import_wizard', 'state'):
892+ cr.execute("update esc_line_import_wizard set state='error' where state='inprogress'")
893+ if cr.column_exists('esc_line_import_wizard', 'file'):
894+ cr.execute("update esc_line_import_wizard set file=null where file is not null")
895+
896+ def write(self, cr, uid, ids, vals, context=None):
897+ if context is None:
898+ context = {}
899+ # remove concurrency warning on refresh
900+ if self.CONCURRENCY_CHECK_FIELD in context:
901+ del context[self.CONCURRENCY_CHECK_FIELD]
902+ return super(esc_line_import_wizard, self).write(cr, uid, ids, vals, context)
903+
904+ def open_wizard(self, cr, uid, ids, context=None):
905+ """
906+ on click on menutim: display the running hq import
907+ """
908+ if self.pool.get('res.company')._get_instance_level(cr, uid) != 'section':
909+ raise osv.except_osv(_('Warning'), ('This object can only be imported at HQ level'))
910+
911+ ids = self.search(cr, uid, [('state', 'in', ['inprogress', 'error', 'done'])], context=context)
912+ if ids:
913+ res_id = ids[0]
914+ view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_hq_entries', 'esc_line_import_progress_wizard')[1]
915+ else:
916+ res_id = False
917+ view_id = False
918+ return {
919+ 'name': _('Import International Invoices Lines'),
920+ 'type': 'ir.actions.act_window',
921+ 'res_model': 'esc.line.import',
922+ 'view_mode': 'form',
923+ 'view_type': 'form',
924+ 'view_id': [view_id],
925+ 'res_id': res_id,
926+ 'target': 'new',
927+ 'context': context,
928+ }
929+
930+ def get_template_file(self, cr, uid, ids, context=None):
931+ if context is None:
932+ context = {}
933+
934+ return {
935+ 'type': 'ir.actions.report.xml',
936+ 'report_name': 'esc_line_import_template',
937+ 'datas': {'target_filename': _('International Invoices Lines Template'), 'keep_open': 1},
938+ 'context': context,
939+ }
940+
941+ def get_error_file(self, cr, uid, ids, context=None):
942+ if context is None:
943+ context = {}
944+
945+ return {
946+ 'type': 'ir.actions.report.xml',
947+ 'report_name': 'esc_line_import_rejected',
948+ 'datas': {'target_filename': _('International Invoices Rejected Lines'), 'keep_open': 1, 'active_id': ids[0]},
949+ 'context': context,
950+ }
951+
952+ def button_validate(self, cr, uid, ids, context=None):
953+ """
954+ Take a CSV file and fetch some informations for HQ Entries
955+ """
956+ # Do verifications
957+ if not context:
958+ context = {}
959+
960+ if isinstance(ids, (int, long)):
961+ ids = [ids]
962+
963+ if not self.browse(cr, uid, ids[0], context=context).file:
964+ raise osv.except_osv(_('Warning'), _('No file to import'))
965+
966+ threading.Thread(target=self.load_bg, args=(cr.dbname, uid, ids[0], context)).start()
967+ self.write(cr, uid, ids[0], {'state': 'inprogress', 'progress': 0}, context=context)
968+
969+ view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_hq_entries', 'esc_line_import_progress_wizard')[1]
970+ return {
971+ 'name': _('Import International Invoices Lines'),
972+ 'type': 'ir.actions.act_window',
973+ 'res_model': 'esc.line.import',
974+ 'view_mode': 'form',
975+ 'view_type': 'form',
976+ 'view_id': [view_id],
977+ 'res_id': ids[0],
978+ 'target': 'new',
979+ 'context': context,
980+ }
981+
982+
983+ def load_bg(self, dbname, uid, wiz_id, context=None):
984+ def manage_error(line_index, msg, row):
985+ errors.append(_('Line %s, %s') % (line_index, _(msg)))
986+ line_data = []
987+ len_cell = len(row.cells)
988+ for x in range(0, min(len_cell, 8)):
989+ line_data.append({'type': row.cells[x].type, 'data': row.cells[x].data})
990+ self.pool.get('esc.line.import.rejected').create(cr, uid, {'wiz_id': wiz_id, 'error': msg, 'xls_row': tools.ustr(line_data)}, context=context)
991+
992+ errors = []
993+ curr_cache = {}
994+ product_cache = {}
995+ cost_center = {}
996+
997+ created = 0
998+ processed = 0
999+
1000+ created_ids = {}
1001+ consignee_instances = {}
1002+ try:
1003+ cr = pooler.get_db(dbname).cursor()
1004+
1005+ target_cc_ids = self.pool.get('account.target.costcenter').search(cr, uid, [('instance_id.state', '!=', 'inactive'), ('is_po_fo_cost_center', '=', True)], context=context)
1006+ for target in self.pool.get('account.target.costcenter').browse(cr, uid, target_cc_ids, fields_to_fetch=['cost_center_id', 'instance_id'], context=context):
1007+ cost_center[target.cost_center_id.code.lower()] = target.cost_center_id.id
1008+ consignee_instances[target.instance_id.instance.lower()] = target.cost_center_id.id
1009+
1010+ wiz = self.browse(cr, uid, wiz_id, context=None)
1011+ file_data = SpreadsheetXML(xmlstring=base64.decodestring(wiz.file))
1012+ nb_lines = file_data.getRows()
1013+
1014+ line = 0
1015+ for row in file_data.getRows():
1016+ line += 1
1017+ if line == 1:
1018+ # header
1019+ continue
1020+ if not len(row.cells):
1021+ # empty line
1022+ continue
1023+ processed += 1
1024+ if len(row.cells) < 7:
1025+ manage_error(line, _('a row must have 8 columns'), row)
1026+ continue
1027+
1028+ if not row.cells[0].data:
1029+ manage_error(line, _('Order ref is mandatory'), row)
1030+ continue
1031+
1032+ po_ref = row.cells[0].data.strip()
1033+ if not re.match('^[0-9]{2}/[^/]+/\w+/PO\d+$', po_ref):
1034+ manage_error(line, _('Order ref %s does not match the PO pattern') % po_ref, row)
1035+ continue
1036+
1037+ if not row.cells[1].data:
1038+ manage_error(line, _('Requestor Cost Center is mandatory'), row)
1039+ continue
1040+
1041+ cc = row.cells[1].data.strip().lower()
1042+ if cc not in cost_center:
1043+ manage_error(line, _('Requestor Cost Center %s not found or does not match any active instance.') % row.cells[1].data, row)
1044+ continue
1045+ cc_id = cost_center[cc]
1046+
1047+ consignee_id = False
1048+ consignee_instance_txt = False
1049+ if row.cells[2].data:
1050+ cc = row.cells[2].data.strip().lower()
1051+
1052+ if cc in cost_center:
1053+ consignee_id = cost_center[cc]
1054+ consignee_instance_txt = ''
1055+ elif cc in consignee_instances:
1056+ consignee_id= consignee_instances[cc]
1057+ consignee_instance_txt = row.cells[2].data.strip()
1058+ else:
1059+ manage_error(line, _('Consignee Cost Center/Instance %s not found or does not match any active instance.') % row.cells[2].data, row)
1060+ continue
1061+
1062+
1063+ if not row.cells[3].data:
1064+ manage_error(line, _('Product Code is mandatory.'), row)
1065+ continue
1066+ p_code = row.cells[3].data.strip().lower()
1067+ if p_code not in product_cache:
1068+ p_ids = self.pool.get('product.product').search(cr, uid, [('default_code', '=ilike', p_code)], context=context)
1069+ product_cache[p_code] = p_ids[0] if p_ids else False
1070+ if not product_cache[p_code]:
1071+ manage_error(line, _('Product Code %s not found.') % (row.cells[3].data,), row)
1072+ continue
1073+
1074+ if not row.cells[4].data:
1075+ manage_error(line, _('Product quantity is mandatory.'), row)
1076+ continue
1077+ try:
1078+ qty = float(row.cells[4].data)
1079+ except:
1080+ manage_error(line, _('Product Quantity %s is not a number.') % (row.cells[4].data, ), row)
1081+ continue
1082+
1083+ if qty <= 0:
1084+ manage_error(line, _('Product Quantity %s cannot be 0 or negative') % (row.cells[4].data, ), row)
1085+ continue
1086+
1087+ if not row.cells[5].data:
1088+ manage_error(line, _('Unit Price is mandatory.'), row)
1089+ continue
1090+ try:
1091+ unit_price = float(row.cells[5].data)
1092+ except:
1093+ manage_error(line, _('Unit Price %s is not a number.') % (row.cells[5].data, ), row)
1094+ continue
1095+
1096+ if not row.cells[6].data:
1097+ manage_error(line, _('Currency is mandatory.'), row)
1098+ continue
1099+ curr_code = row.cells[6].data.strip().lower()
1100+ if curr_code not in curr_cache:
1101+ curr_ids = self.pool.get('res.currency').search(cr, uid, [('name', '=ilike', curr_code)], context=context)
1102+ curr_cache[curr_code] = curr_ids[0] if curr_ids else False
1103+ if not curr_cache[curr_code]:
1104+ manage_error(line, _('Currency %s not found.') % (row.cells[6].data,), row)
1105+ continue
1106+
1107+ mapping = ''
1108+ if len(row.cells) > 7 and row.cells[7].data:
1109+ mapping = row.cells[7].data.strip()
1110+
1111+ cr.execute("SAVEPOINT esc_line")
1112+ try:
1113+ new_line = self.pool.get('esc.invoice.line').create(cr, uid, {
1114+ 'po_name': po_ref,
1115+ 'requestor_cc_id': cc_id,
1116+ 'consignee_cc_id': consignee_id,
1117+ 'imported_consignee_instance': consignee_instance_txt,
1118+ 'product_id': product_cache[p_code],
1119+ 'price_unit': unit_price,
1120+ 'product_qty': qty,
1121+ 'currency_id': curr_cache[curr_code],
1122+ 'shipment_ref': mapping,
1123+ }, context=context)
1124+ created_ids[new_line] = line
1125+ created += 1
1126+ cr.execute("RELEASE SAVEPOINT esc_line")
1127+ except osv.except_osv, e:
1128+ cr.execute("ROLLBACK TO SAVEPOINT esc_line")
1129+ manage_error(line, e.value, row)
1130+ except IntegrityError:
1131+ cr.execute("ROLLBACK TO SAVEPOINT esc_line")
1132+ line_id = False
1133+
1134+ if created_ids:
1135+ line_id = self.pool.get('esc.invoice.line').search(cr, uid, [
1136+ ('id', 'in', created_ids.keys()),
1137+ ('po_name', '=', po_ref),
1138+ ('requestor_cc_id', '=', cc_id),
1139+ ('consignee_cc_id', '=', consignee_id),
1140+ ('product_id', '=', product_cache[p_code]),
1141+ ('price_unit', '=', unit_price),
1142+ ('product_qty', '=', qty),
1143+ ('currency_id', '=', curr_cache[curr_code]),
1144+ ('shipment_ref', '=', mapping)
1145+ ], context=context)
1146+ if line_id:
1147+ manage_error(line, _('duplicates line %d') % created_ids[line_id[0]], row)
1148+ if not line_id:
1149+ manage_error(line, _('Line duplicated in the system'), row)
1150+
1151+ if processed%10 == 0:
1152+ self.write(cr, uid, wiz_id, {'progress': int(processed/float(nb_lines)*100), 'created': created, 'nberrors': len(errors), 'error': "\n".join(errors)}, context=context)
1153+
1154+ state = 'done'
1155+ if errors:
1156+ state = 'error'
1157+ nb_errors = len(errors)
1158+ errors.insert(0, _('Imported with error(s)'))
1159+ msg = "\n".join(errors)
1160+ else:
1161+ msg = _("International Invoices Lines import successful")
1162+ nb_errors = 0
1163+
1164+ self.write(cr, uid, wiz_id, {'progress': 100, 'state': state, 'created': created, 'total': processed, 'error': msg, 'nberrors': nb_errors, 'end_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'file': False}, context=context)
1165+
1166+ except Exception, e:
1167+ cr.rollback()
1168+ if isinstance(e, osv.except_osv):
1169+ error = e.value
1170+ else:
1171+ error = e
1172+ msg = self.read(cr, uid, wiz_id, ['error'])['error'] or ''
1173+ self.write(cr, uid, wiz_id, {'state': 'error', 'progress': 100, 'error': "%s\n%s\n%s" % (msg, tools.ustr(error), tools.get_traceback(e)), 'end_date': time.strftime('%Y-%m-%d %H:%M:%S')})
1174+ finally:
1175+ cr.commit()
1176+ cr.close(True)
1177+
1178+ def done(self, cr, uid, ids, context=None):
1179+ self.write(cr, uid, ids, {'state': 'ack'}, context=context)
1180+ d = self.pool.get('ir.actions.act_window').open_view_from_xmlid(cr, uid, 'account_hq_entries.esc_invoice_line_action', context=context)
1181+ return d
1182+
1183+ def ack(self, cr, uid, ids, context=None):
1184+ self.write(cr, uid, ids, {'state': 'ack'}, context=context)
1185+ return {'type': 'ir.actions.act_window_close'}
1186+
1187+esc_line_import_wizard()
1188+
1189
1190=== added file 'bin/addons/account_hq_entries/wizard/esc_lines_import_view.xml'
1191--- bin/addons/account_hq_entries/wizard/esc_lines_import_view.xml 1970-01-01 00:00:00 +0000
1192+++ bin/addons/account_hq_entries/wizard/esc_lines_import_view.xml 2023-05-05 12:01:38 +0000
1193@@ -0,0 +1,89 @@
1194+<?xml version="1.0" encoding="utf-8"?>
1195+<openerp>
1196+ <data>
1197+
1198+ <record id="esc_line_import_wizard" model="ir.ui.view">
1199+ <field name="name">esc.line.import.wizard</field>
1200+ <field name="model">esc.line.import</field>
1201+ <field name="type">form</field>
1202+ <field name="arch" type="xml">
1203+ <form string="International Invoices Lines Import">
1204+ <label string="This will import lines from a SpreadSheet xml file." colspan="4"/>
1205+ <newline/>
1206+ <group colspan="4">
1207+ <field name="file" filename="filename" colspan="2"/>
1208+ <field name="filename" invisible="1"/>
1209+ </group>
1210+ <newline />
1211+ <button name="get_template_file" type="object" string="Download Empty Template" icon="gtk-justify-fill" colspan="1"/>
1212+ <group colspan="3" />
1213+ <newline />
1214+ <newline />
1215+ <group colspan="4" col="2">
1216+ <button string="Cancel" special="cancel" icon="gtk-cancel"/>
1217+ <button name="button_validate" type="object" string="Import" icon="terp-camera_test"/>
1218+ </group>
1219+ </form>
1220+ </field>
1221+ </record>
1222+
1223+
1224+ <record id="esc_line_import_progress_wizard" model="ir.ui.view">
1225+ <field name="name">esc.line.import.wizard</field>
1226+ <field name="model">esc.line.import</field>
1227+ <field name="priority" eval="100" />
1228+ <field name="type">form</field>
1229+ <field name="arch" type="xml">
1230+ <form string="International Invoices Lines Import">
1231+ <field name="progress" widget="progressbar" colspan="4"/>
1232+ <newline />
1233+ <field name="filename" readonly="1" />
1234+ <newline />
1235+ <field name="state" />
1236+ <group colspan="2" col="4">
1237+ <field name="start_date" />
1238+ <field name="end_date" />
1239+ </group>
1240+ <html colspan="4">
1241+ <script language="javascript">
1242+ $(document).ready(function() {
1243+ if ($('#state').val() == 'inprogress') {
1244+ setTimeout(function(){
1245+ $('#dummy').click();
1246+ },2400)
1247+ }
1248+ });
1249+ </script>
1250+ </html>
1251+
1252+ <newline />
1253+ <field name="created" />
1254+ <field name="nberrors" />
1255+ <newline />
1256+ <group colspan="4" col="4">
1257+ <button name="get_error_file" type="object" string="Download Rejected Lines" icon="gtk-justify-fill" colspan="1" attrs="{'invisible': [('state', '!=', 'error')]}"/>
1258+ <group colspan="3" />
1259+ </group>
1260+ <newline />
1261+ <newline />
1262+ <field name="error" colspan="4" nolabel="1" />
1263+ <group colspan="4" col="4">
1264+ <button name="dummy" string="Update" icon="gtk-refresh" invisible="1"/>
1265+ <button string="OK" name="done" type="object" icon="gtk-ok" states="done" />
1266+ <button string="Reset" name="done" type="object" icon="gtk-ok" states="error" help="Reset import and close the window" />
1267+ <button string="Close" special="cancel" icon="gtk-cancel" states="error" help="Keep import results and close the window"/>
1268+ </group>
1269+ </form>
1270+ </field>
1271+ </record>
1272+
1273+ <record id="esc_line_import_action" model="ir.actions.server">
1274+ <field name="name">International Invoices Lines Import</field>
1275+ <field name="model_id" ref="model_esc_line_import" />
1276+ <field name="state">code</field>
1277+ <field name="code">action = obj.open_wizard(context=context)</field>
1278+ </record>
1279+
1280+ <menuitem name="International Invoices Lines Import" action="esc_line_import_action" type="server" id="esc_line_import_menu" parent="menu_hq" sequence="19"/>
1281+ </data>
1282+</openerp>
1283
1284=== modified file 'bin/addons/delivery_mechanism/delivery_mechanism.py'
1285--- bin/addons/delivery_mechanism/delivery_mechanism.py 2022-05-10 12:24:07 +0000
1286+++ bin/addons/delivery_mechanism/delivery_mechanism.py 2023-05-05 12:01:38 +0000
1287@@ -467,25 +467,79 @@
1288 uom_obj = self.pool.get('product.uom')
1289 currency_obj = self.pool.get('res.currency')
1290 product_obj = self.pool.get('product.product')
1291+ esc_line_obj = self.pool.get('esc.invoice.line')
1292+ tc_fin_obj = self.pool.get('finance_price.track_changes')
1293
1294 if context is None:
1295 context = {}
1296
1297 average_values = {}
1298
1299+ company_currency_id = move.company_id.currency_id.id
1300+
1301 if move.price_currency_id:
1302 move_currency_id = move.price_currency_id.id
1303 else:
1304 move_currency_id = move.company_id.currency_id.id
1305 context['currency_id'] = move_currency_id
1306
1307+
1308+
1309+ compute_finance_price = False
1310+ if self.pool.get('unifield.setup.configuration').get_config(cr, uid, 'esc_line'):
1311+ compute_finance_price = move.picking_id.partner_id.partner_type == 'esc' or move.dpo_line_id and move.purchase_line_id.from_dpo_esc or False
1312+
1313 qty = line.quantity
1314 if line.uom_id.id != line.product_id.uom_id.id:
1315 qty = uom_obj._compute_qty(cr, uid, line.uom_id.id, line.quantity, line.product_id.uom_id.id)
1316
1317 product_availability.setdefault(line.product_id.id, line.product_id.qty_available)
1318-
1319+ track_finance_price = []
1320+ tc_fin_ids = []
1321 if qty > 0.00:
1322+ if compute_finance_price:
1323+ esc_dom = [('state','!=', 'done'), ('product_id', '=', line.product_id.id), ('po_name', '=', move.purchase_line_id.order_id.name)]
1324+ # exact qty
1325+ esc_ids = esc_line_obj.search(cr, uid, esc_dom + [('remaining_qty', '=', qty)], order='state, id', limit=1, context=context)
1326+ if not esc_ids:
1327+ esc_ids = esc_line_obj.search(cr, uid, esc_dom, order='state, id', context=context)
1328+
1329+ remaining_in_qty = qty
1330+ total_price = 0
1331+ for esc_line in esc_line_obj.browse(cr, uid, esc_ids, context=context):
1332+ if remaining_in_qty <= 0:
1333+ break
1334+ unit_iil_price = esc_line.price_unit
1335+ if esc_line.currency_id.id != company_currency_id:
1336+ unit_iil_price = currency_obj.compute(cr, uid, esc_line.currency_id.id, company_currency_id, unit_iil_price, round=False, context=context)
1337+
1338+ if esc_line.remaining_qty - remaining_in_qty >= 0.001:
1339+ total_price += unit_iil_price * remaining_in_qty
1340+
1341+ remaining_iil_qty = esc_line.remaining_qty - remaining_in_qty
1342+ if abs(remaining_iil_qty) <= 0.001:
1343+ esc_line_obj.write(cr, uid, esc_line.id, {'state': 'done', 'remaining_qty': 0}, context=context)
1344+ else:
1345+ esc_line_obj.write(cr, uid, esc_line.id, {'state': '0_open', 'remaining_qty': remaining_iil_qty}, context=context)
1346+ track_finance_price.append({'qty_processed': remaining_in_qty, 'price_unit': unit_iil_price, 'matching_type': 'iil', 'esc_invoice_line_id': esc_line.id})
1347+ remaining_in_qty = 0
1348+
1349+ else:
1350+ esc_line_obj.write(cr, uid, esc_line.id, {'state': 'done', 'remaining_qty': 0}, context=context)
1351+ total_price += unit_iil_price * esc_line.remaining_qty
1352+ remaining_in_qty -= esc_line.remaining_qty
1353+ track_finance_price.append({'qty_processed': esc_line.remaining_qty, 'price_unit': unit_iil_price, 'matching_type': 'iil', 'esc_invoice_line_id': esc_line.id})
1354+
1355+ if remaining_in_qty > 0:
1356+ # all IIL used: take PO price
1357+ po_price = move.purchase_line_id.price_unit
1358+ if move.purchase_line_id.order_id.currency_id.id != company_currency_id:
1359+ po_price = currency_obj.compute(cr, uid, move.purchase_line_id.order_id.currency_id.id, company_currency_id, po_price, round=False, context=context)
1360+ total_price += remaining_in_qty * po_price
1361+ track_finance_price.append({'qty_processed': remaining_in_qty, 'price_unit': po_price, 'matching_type': 'po', 'purchase_oder_line_id': move.purchase_line_id.id})
1362+
1363+
1364+ # by remaining qty
1365 new_price = line.cost
1366 # Recompute unit price if the currency used is not the functional currency
1367 if line.currency.id != move_currency_id:
1368@@ -500,19 +554,36 @@
1369 new_std_price = 0.00
1370 if line.product_id.qty_available <= 0.00:
1371 new_std_price = new_price
1372+ if compute_finance_price:
1373+ new_finance_price = round(total_price / float(qty), 5)
1374 else:
1375 # Get the current price in today's rate
1376 current_price = product_obj.price_get(cr, uid, [line.product_id.id], 'standard_price', context=context)[line.product_id.id]
1377+
1378 # Check no division by zero
1379 if product_availability[line.product_id.id]:
1380 new_std_price = ((current_price * product_availability[line.product_id.id])
1381 + (new_price * qty)) / (product_availability[line.product_id.id] + qty)
1382
1383+ if compute_finance_price:
1384+ # TODO : init finance_price
1385+ if not line.product_id.finance_price:
1386+ new_finance_price = round(total_price / float(qty), 5)
1387+ else:
1388+ new_finance_price = round((line.product_id.finance_price * product_availability[line.product_id.id] + total_price) / (product_availability[line.product_id.id] + qty), 5)
1389+
1390 new_std_price = round(currency_obj.compute(cr, uid, line.currency.id, move.company_id.currency_id.id,
1391 new_std_price, round=False, context=context), 5)
1392
1393 # Write the field according to price type field
1394- product_obj.write(cr, uid, [line.product_id.id], {'standard_price': new_std_price})
1395+ prod_to_write = {'standard_price': new_std_price}
1396+ if compute_finance_price:
1397+ prod_to_write['finance_price'] = new_finance_price
1398+ for tc_fin in track_finance_price:
1399+ tc_fin.update({'product_id': line.product_id.id, 'old_price': line.product_id.finance_price, 'new_price': new_finance_price, 'stock_before': product_availability.get(line.product_id.id, 0)})
1400+ tc_fin_ids.append(tc_fin_obj.create(cr, uid, tc_fin, context=context))
1401+ product_obj.write(cr, uid, [line.product_id.id], prod_to_write)
1402+
1403 pchanged = False
1404 # Is price changed ?
1405 if line.cost and move.purchase_line_id:
1406@@ -531,7 +602,7 @@
1407 'price_currency_id': line.currency.id,
1408 }
1409
1410- return average_values, sptc_values
1411+ return average_values, sptc_values, tc_fin_ids
1412
1413 def _get_values_from_line(self, cr, uid, move, line, db_data, context=None):
1414 """
1415@@ -814,7 +885,6 @@
1416 out_moves = mirror_data['moves']
1417 average_values = {}
1418 move_sptc_values = []
1419-
1420 line = False
1421
1422 if move.purchase_line_id and move.purchase_line_id.id not in po_line_qty:
1423@@ -828,11 +898,13 @@
1424
1425 if not values.get('product_qty', 0.00):
1426 continue
1427+
1428+ tc_ids = []
1429 # Check if we must re-compute the price of the product
1430 compute_average = process_avg_sysint and picking_dict['type'] == 'in' and line.product_id.cost_method == 'average'
1431
1432 if compute_average:
1433- average_values, sptc_values = self._compute_average_values(cr, uid, move, line, product_availability, context=context)
1434+ average_values, sptc_values, tc_ids = self._compute_average_values(cr, uid, move, line, product_availability, context=context)
1435 values.update(average_values)
1436 move_sptc_values.append(sptc_values)
1437
1438@@ -856,6 +928,9 @@
1439 context['keepLineNumber'] = False
1440 done_moves.append(new_move_id)
1441
1442+ if tc_ids:
1443+ self.pool.get('finance_price.track_changes').write(cr, uid, tc_ids, {'stock_move_id': done_moves[-1]}, context=context)
1444+
1445 values['processed_stock_move'] = False
1446
1447 out_values = values.copy()
1448
1449=== modified file 'bin/addons/msf_audittrail/data/audittrail_hq_entry.yml'
1450--- bin/addons/msf_audittrail/data/audittrail_hq_entry.yml 2021-05-05 16:04:38 +0000
1451+++ bin/addons/msf_audittrail/data/audittrail_hq_entry.yml 2023-05-05 12:01:38 +0000
1452@@ -26,3 +26,31 @@
1453 self.write(cr, uid, rule_id, vals, context=context)
1454 # Subscribe to the rule
1455 self.subscribe(cr, uid, rule_id)
1456+
1457+-
1458+ For International Invoice Lines
1459+-
1460+ !python {model: audittrail.rule}: |
1461+ name = 'International Invoice Lines'
1462+ object_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'esc.invoice.line')], context=context)
1463+ rule_id = self.search(cr, uid, [('object_id', 'in', object_ids)], context=context)
1464+ if object_ids:
1465+ # Create the rule
1466+ fields = ['state']
1467+ fields_ids = self.pool.get('ir.model.fields').search(cr, uid, [('model', '=', 'esc.invoice.line'), ('name', 'in', fields)], context=context)
1468+
1469+ vals = {
1470+ 'name': name,
1471+ 'object_id': object_ids[0],
1472+ 'log_write': True,
1473+ 'log_unlink': True,
1474+ 'log_create': True,
1475+ 'field_ids': [(6, 0, fields_ids)],
1476+ }
1477+
1478+ if not rule_id:
1479+ rule_id = self.create(cr, uid, vals, context=context)
1480+ elif rule_id:
1481+ self.write(cr, uid, rule_id, vals, context=context)
1482+ # Subscribe to the rule
1483+ self.subscribe(cr, uid, rule_id)
1484
1485=== modified file 'bin/addons/msf_printed_documents/printed_report.xml'
1486--- bin/addons/msf_printed_documents/printed_report.xml 2020-09-18 14:39:47 +0000
1487+++ bin/addons/msf_printed_documents/printed_report.xml 2023-05-05 12:01:38 +0000
1488@@ -30,6 +30,7 @@
1489 header="False"
1490 auto="False"
1491 menu="True"
1492+ sequence="150"
1493 />
1494
1495 <report
1496
1497=== modified file 'bin/addons/msf_profile/data/patches.xml'
1498--- bin/addons/msf_profile/data/patches.xml 2023-05-03 10:23:38 +0000
1499+++ bin/addons/msf_profile/data/patches.xml 2023-05-05 12:01:38 +0000
1500@@ -901,6 +901,7 @@
1501 <record id="us_11195_oca_period_nr" model="patch.scripts">
1502 <field name="method">us_11195_oca_period_nr</field>
1503 </record>
1504+<<<<<<< TREE
1505
1506 <!-- UF29.0 -->
1507 <record id="us_11177_bn_for_kcl_items" model="patch.scripts">
1508@@ -933,5 +934,11 @@
1509 <record id="us_10885_tc_entries" model="patch.scripts">
1510 <field name="method">us_10885_tc_entries</field>
1511 </record>
1512+=======
1513+
1514+ <record id="us_10835_disable_iil_menu" model="patch.scripts">
1515+ <field name="method">us_10835_disable_iil_menu</field>
1516+ </record>
1517+>>>>>>> MERGE-SOURCE
1518 </data>
1519 </openerp>
1520
1521=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
1522--- bin/addons/msf_profile/i18n/fr_MF.po 2023-05-04 12:17:53 +0000
1523+++ bin/addons/msf_profile/i18n/fr_MF.po 2023-05-05 12:01:38 +0000
1524@@ -305,7 +305,7 @@
1525 msgid "Instance code / Place of payment"
1526 msgstr "Code de l'Instance / Lieu du paiement"
1527
1528-#. modules: account, register_accounting, account_mcdb, sale, base,useability_dashboard_and_menu
1529+#. modules: account, register_accounting, account_mcdb, sale, base,useability_dashboard_and_menu, account_hq_entries
1530 #: selection:account.period,state:0
1531 #: selection:account.fiscalyear.state,state:0
1532 #: selection:account.period.state,state:0
1533@@ -314,7 +314,11 @@
1534 #: view:signature.follow_up:0
1535 #: selection:signature.follow_up,doc_state:0
1536 #: selection:signature.follow_up,status:0
1537+<<<<<<< TREE
1538 #: code:addons/useability_dashboard_and_menu/report/signature_follow_up_search_report.py:74
1539+=======
1540+#: selection:esc.invoice.line,state:0
1541+>>>>>>> MERGE-SOURCE
1542 msgid "Open"
1543 msgstr "Ouverte"
1544
1545@@ -8314,7 +8318,7 @@
1546 msgid "Generate discrepancies"
1547 msgstr "Générer les écarts"
1548
1549-#. modules: purchase, account, msf_outgoing, finance, purchase_override, procurement, procurement_request, tender_flow, product, specific_rules, kit, stock_forecast, analytic, stock_batch_recall, register_accounting, stock_override, msf_supply_doc_export, mission_stock, msf_doc_import, sale, stock, account_override
1550+#. modules: purchase, account, msf_outgoing, finance, purchase_override, procurement, procurement_request, tender_flow, product, specific_rules, kit, stock_forecast, analytic, stock_batch_recall, register_accounting, stock_override, msf_supply_doc_export, mission_stock, msf_doc_import, sale, stock, account_override, account_hq_entries
1551 #: report:account.analytic.account.balance:0
1552 #: report:account.analytic.account.inverted.balance:0
1553 #: report:account.analytic.account.quantity_cost_ledger:0
1554@@ -8412,10 +8416,14 @@
1555 #: field:view.expired.expiring.stock.lines,product_qty:0
1556 #: code:addons/msf_doc_import/report/return_from_unit_export.py:120
1557 #: field:account.analytic.line,entry_quantity:0
1558+<<<<<<< TREE
1559 #: report:loan.certificate:0
1560 #: report:loan.return.certificate:0
1561 #: report:ship.loan.certificate:0
1562 #: report:ship.loan.return.certificate:0
1563+=======
1564+#: field:esc.invoice.line,product_qty:0
1565+>>>>>>> MERGE-SOURCE
1566 #, python-format
1567 msgid "Quantity"
1568 msgstr "Quantité"
1569@@ -8702,6 +8710,8 @@
1570 #: selection:signature.follow_up,doc_state:0
1571 #: selection:hq.entries.import,state:0
1572 #: view:physical.inventory:0
1573+#: selection:esc.invoice.line,state:0
1574+#: selection:esc.line.import,state:0
1575 #, python-format
1576 msgid "Draft"
1577 msgstr "Brouillon"
1578@@ -8784,6 +8794,7 @@
1579 #: field:wizard.register.import,filename:0
1580 #: field:account.invoice.import,filename:0
1581 #: field:account.cv.import,filename:0
1582+#: field:esc.line.import,filename:0
1583 msgid "Imported filename"
1584 msgstr "Nom du fichier importé"
1585
1586@@ -9632,7 +9643,7 @@
1587 msgid "Go to tender form"
1588 msgstr "Aller sur Formulaire Appels d'Offres"
1589
1590-#. modules: account, base_setup, purchase_double_validation, msf_instance, sale, msf_config_locations, base, msf_button_access_rights, unifield_setup
1591+#. modules: account, base_setup, purchase_double_validation, msf_instance, sale, msf_config_locations, base, msf_button_access_rights, unifield_setup, account_hq_entries
1592 #: view:wizard.multi.charts.accounts:0
1593 #: view:res.config:0
1594 #: view:res.config.users:0
1595@@ -9657,6 +9668,7 @@
1596 #: view:customer.commitment.setup:0
1597 #: view:previous.fy.dates.setup:0
1598 #: view:signature.setup:0
1599+#: view:esc_line.setup:0
1600 msgid "res_config_contents"
1601 msgstr "res_config_contents"
1602
1603@@ -16305,6 +16317,7 @@
1604 #: view:sync.version.instance.monitor:0
1605 #: view:automated.export:0
1606 #: view:automated.import:0
1607+#: view:esc.invoice.line:0
1608 msgid "Group By..."
1609 msgstr "Grouper Par..."
1610
1611@@ -20083,6 +20096,7 @@
1612 #: field:account.invoice.import,progression:0
1613 #: field:hq.entries.import,progress:0
1614 #: field:account.cv.import,progression:0
1615+#: field:esc.line.import,progress:0
1616 msgid "Progression"
1617 msgstr "Progression"
1618
1619@@ -20948,6 +20962,9 @@
1620 #: selection:wizard.import.ad.line,state:0
1621 #: selection:hq.entries.import,state:0
1622 #: selection:account.cv.import,state:0
1623+#: view:esc.invoice.line:0
1624+#: selection:esc.invoice.line,state:0
1625+#: selection:esc.line.import,state:0
1626 msgid "Done"
1627 msgstr "Clôturé"
1628
1629@@ -23178,6 +23195,7 @@
1630 #: view:replenishment.segment.line:0
1631 #: view:replenishment.consolidated_oc.import:0
1632 #: view:hq.entries.import:0
1633+#: view:esc.line.import:0
1634 msgid "Close"
1635 msgstr "Fermé"
1636
1637@@ -24753,7 +24771,11 @@
1638 msgid "Phase Out products"
1639 msgstr "Produits Supprimés"
1640
1641+<<<<<<< TREE
1642 #. modules: tender_flow, product_asset, update_client, register_accounting, return_claim, msf_doc_import, supplier_catalogue, purchase_compare_rfq, product_list, stock, reason_types_moves, stock_override, purchase_override, specific_rules, kit, base, msf_tools, sales_followup, account, msf_outgoing, order_nomenclature, msf_field_access_rights, sale, msf_button_access_rights, analytic_distribution, msf_supply_doc_export, consumption_calculation, procurement_request, purchase_allocation_report
1643+=======
1644+#. modules: tender_flow, product_asset, update_client, register_accounting, return_claim, msf_doc_import, supplier_catalogue, purchase_compare_rfq, product_list, stock, reason_types_moves, stock_override, purchase_override, specific_rules, kit, base, msf_tools, sales_followup, account, msf_outgoing, order_nomenclature, msf_field_access_rights, sale, msf_button_access_rights, analytic_distribution, msf_supply_doc_export, consumption_calculation, procurement_request, account_hq_entries
1645+>>>>>>> MERGE-SOURCE
1646 #: report:addons/msf_supply_doc_export/report/report_pick_export_xls.mako:153
1647 #: field:account.move.line.reconcile.writeoff,comment:0
1648 #: field:account.commitment,notes:0
1649@@ -24858,10 +24880,14 @@
1650 #: code:addons/msf_doc_import/report/return_from_unit_export.py:124
1651 #: code:addons/stock/report/closed_physical_inventory_report.py:134
1652 #: code:addons/msf_doc_import/wizard/__init__.py:57
1653+<<<<<<< TREE
1654 #: report:addons/purchase_allocation_report/report/po_allocation_report.mako:244
1655 #: report:addons/purchase_allocation_report/report/po_line_allocation_report.mako:198
1656 #: report:po.line.allocation.report:0
1657 #: report:shipment.donation.certificate:0
1658+=======
1659+#: field:finance_price.track_changes,comment:0
1660+>>>>>>> MERGE-SOURCE
1661 #, python-format
1662 msgid "Comment"
1663 msgstr "Commentaire"
1664@@ -24961,10 +24987,11 @@
1665 msgid "Social IDs"
1666 msgstr "Identité Sociale"
1667
1668-#. modules: account, register_accounting, product_attributes
1669+#. modules: account, register_accounting, product_attributes, account_hq_entries
1670 #: view:account.bank.statement:0
1671 #: view:account.bank.statement:0
1672 #: report:addons/product_attributes/report/standard_price_track_changes.mako:101
1673+#: code:addons/account_hq_entries/report/finance_cost_price.py:72
1674 msgid "Transaction"
1675 msgstr "Transactions"
1676
1677@@ -26226,8 +26253,9 @@
1678 msgid "Only products with total expired > 0"
1679 msgstr "Seuls produits ayant un total d'articles expirés > 0"
1680
1681-#. module: product
1682+#. module: product, account_hq_entries
1683 #: field:product.template,loc_row:0
1684+#: field:esc.line.import.rejected,xls_row:0
1685 msgid "Row"
1686 msgstr "Ligne"
1687
1688@@ -37409,7 +37437,7 @@
1689 msgid "On Multiple Doc."
1690 msgstr "Sur Plusieurs Documents"
1691
1692-#. modules: tender_flow, financing_contract, product_asset, account_corrections, product_attributes, msf_accrual, analytic_override, sync_client, account_mcdb, res_currency_tables, procurement_request, stock_forecast, board, stock_override, msf_doc_import, stock, finance, msf_homere_interface, base, kit, stock_schedule, account, msf_outgoing, resource, msf_audittrail, stock_move_tracking, msf_supply_doc_export, procurement_cycle, msf_order_date
1693+#. modules: tender_flow, financing_contract, product_asset, account_corrections, product_attributes, msf_accrual, analytic_override, sync_client, account_mcdb, res_currency_tables, procurement_request, stock_forecast, board, stock_override, msf_doc_import, stock, finance, msf_homere_interface, base, kit, stock_schedule, account, msf_outgoing, resource, msf_audittrail, stock_move_tracking, msf_supply_doc_export, procurement_cycle, msf_order_date, account_hq_entries
1694 #: selection:account.aged.trial.balance,filter:0
1695 #: report:account.analytic.account.journal:0
1696 #: field:account.bank.statement,date:0
1697@@ -37535,6 +37563,7 @@
1698 #: report:addons/account/report/account_employee_ledger.mako:297
1699 #: selection:wizard.account.employee.balance.tree,filter:0
1700 #: field:signature.line,date:0
1701+#: field:finance_price.track_changes,date:0
1702 #, python-format
1703 msgid "Date"
1704 msgstr "Date"
1705@@ -40501,7 +40530,7 @@
1706 msgid "From confirmed to assigned."
1707 msgstr "De confirmé à attribué."
1708
1709-#. modules: tender_flow, account_override, purchase_allocation_report, procurement_cycle, return_claim, supplier_catalogue, mission_stock, stock_override, purchase_compare_rfq, purchase_followup, msf_supply_doc_export, analytic_distribution, product, procurement_request, consumption_calculation, specific_rules, kit, msf_doc_import, procurement_report, sales_followup, account, msf_outgoing, product_attributes, sale, sourcing, stock, stock_batch_recall,msf_tools
1710+#. modules: tender_flow, account_override, purchase_allocation_report, procurement_cycle, return_claim, supplier_catalogue, mission_stock, stock_override, purchase_compare_rfq, purchase_followup, msf_supply_doc_export, analytic_distribution, product, procurement_request, consumption_calculation, specific_rules, kit, msf_doc_import, procurement_report, sales_followup, account, msf_outgoing, product_attributes, sale, sourcing, stock, stock_batch_recall,msf_tools, account_hq_entries
1711 #: field:account.analytic.line,product_uom_id:0
1712 #: selection:account.journal.column,field:0
1713 #: field:account.move.line,product_uom_id:0
1714@@ -40650,6 +40679,7 @@
1715 #: code:addons/stock/report/closed_physical_inventory_report.py:124
1716 #: field:stock.pipe.per.product.instance.prod.lines,uom_id:0
1717 #: field:report.batch.recall,uom_id:0
1718+#: field:esc.invoice.line,uom_id:0
1719 #, python-format
1720 msgid "UoM"
1721 msgstr "UdM"
1722@@ -42310,6 +42340,7 @@
1723 #: view:account.invoice.import:0
1724 #: view:hq.entries.import:0
1725 #: view:account.cv.import:0
1726+#: view:esc.line.import:0
1727 msgid "Update"
1728 msgstr "Mettre à jour"
1729
1730@@ -43761,7 +43792,7 @@
1731 msgid "product code"
1732 msgstr "code produit"
1733
1734-#. modules: account, analytic_distribution_supply, finance, register_accounting, account_override, msf_audittrail, analytic_distribution
1735+#. modules: account, analytic_distribution_supply, finance, register_accounting, account_override, msf_audittrail, analytic_distribution, account_hq_entries
1736 #: view:account.invoice.line:0
1737 #: field:account.invoice.tax,invoice_id:0
1738 #: model:ir.model,name:account.model_account_invoice_line
1739@@ -43775,6 +43806,7 @@
1740 #: model:ir.model,name:finance.model_account_invoice_line
1741 #: model:ir.model,name:msf_audittrail.model_account_invoice_line
1742 #: model:ir.model,name:register_accounting.model_wizard_account_invoice_line
1743+#: field:finance_price.track_changes,invoice_line_id:0
1744 msgid "Invoice Line"
1745 msgstr "Ligne de Facture"
1746
1747@@ -44976,6 +45008,7 @@
1748 #: field:signature.export.wizard,end_date:0
1749 #: field:hq.entries.import,end_date:0
1750 #: field:signature.image,to_date:0
1751+#: field:esc.line.import,end_date:0
1752 msgid "End Date"
1753 msgstr "Date de Clôture"
1754
1755@@ -45389,6 +45422,7 @@
1756 #. module: msf_homere_interface, account_hq_entries
1757 #: field:hr.payroll.import.confirmation,total:0
1758 #: field:hq.entries.import,created:0
1759+#: field:esc.line.import,created:0
1760 msgid "Processed"
1761 msgstr "Traité"
1762
1763@@ -45491,7 +45525,7 @@
1764 msgid "The currency you want to %s is used in at least one Commitment Voucher which isn't Done."
1765 msgstr "La devise que vous désirez %s est utilisée dans au moins un Bon d'Engagement non Terminé."
1766
1767-#. modules: account, resource, account_mcdb, msf_instance, analytic, base, msf_audittrail, msf_profile, product_attributes, sync_client, useability_dashboard_and_menu
1768+#. modules: account, resource, account_mcdb, msf_instance, analytic, base, msf_audittrail, msf_profile, product_attributes, sync_client, useability_dashboard_and_menu, account_hq_entries
1769 #: view:account.journal:0
1770 #: field:account.journal,user_id:0
1771 #: view:analytic.entries.report:0
1772@@ -45529,8 +45563,13 @@
1773 #: field:signature.users.allowed,user_id:0
1774 #: field:signature.follow_up,user_id:0
1775 #: field:signature.set_user,user_name:0
1776+<<<<<<< TREE
1777 #: code:addons/useability_dashboard_and_menu/report/signature_follow_up_search_report.py:204
1778 #: report:signature.follow_up.search.pdf:0
1779+=======
1780+#: code:addons/account_hq_entries/report/finance_cost_price.py:69
1781+#: field:finance_price.track_changes,user_id:0
1782+>>>>>>> MERGE-SOURCE
1783 msgid "User"
1784 msgstr "Utilisateur"
1785
1786@@ -48028,7 +48067,7 @@
1787 msgid "Child IDs"
1788 msgstr "ID Enfants"
1789
1790-#. modules: purchase, account, finance, account_mcdb, sale, specific_rules, account_override, delete_button, tender_flow, analytic_distribution, msf_budget, register_accounting, msf_accrual, kit, stock
1791+#. modules: purchase, account, finance, account_mcdb, sale, specific_rules, account_override, delete_button, tender_flow, analytic_distribution, msf_budget, register_accounting, msf_accrual, kit, stock, account_hq_entries
1792 #: view:account.common.report:0
1793 #: view:account.mcdb:0
1794 #: view:account.chart:0
1795@@ -48052,6 +48091,7 @@
1796 #: view:free.allocation.wizard:0
1797 #: view:account.commitment.line:0
1798 #: view:view.expired.expiring.stock:0
1799+#: view:esc.invoice.line:0
1800 msgid "Delete"
1801 msgstr "Supprimer"
1802
1803@@ -48071,7 +48111,7 @@
1804 msgid "TVA :"
1805 msgstr "TVA :"
1806
1807-#. modules: sourcing, sale, product_attributes, procurement_cycle, finance
1808+#. modules: sourcing, sale, product_attributes, procurement_cycle, finance, account_hq_entries
1809 #: field:sale.report,product_code:0
1810 #: field:sale.order.line,product_code:0
1811 #: report:addons/product_attributes/report/standard_price_track_changes.mako:69
1812@@ -48079,7 +48119,11 @@
1813 #: report:addons/procurement_cycle/report_doc/replenishment_product_list.mako:124
1814 #: report:addons/procurement_cycle/report_doc/replenishment_segment.mako:368
1815 #: report:addons/finance/report/fo_follow_up_finance_xls.mako:352
1816+<<<<<<< TREE
1817 #: code:addons/procurement_cycle/replenishment.py:3640
1818+=======
1819+#: code:addons/account_hq_entries/report/finance_cost_price.py:51
1820+>>>>>>> MERGE-SOURCE
1821 msgid "Product code"
1822 msgstr "Code Produit"
1823
1824@@ -49926,8 +49970,9 @@
1825 msgid "Email"
1826 msgstr "Courriel"
1827
1828-#. module: base
1829+#. module: base, account_hq_entries
1830 #: field:workflow.triggers,instance_id:0
1831+#: field:esc.invoice.line,dest_instance_id:0
1832 msgid "Destination Instance"
1833 msgstr "Instance de Destination"
1834
1835@@ -53493,7 +53538,7 @@
1836 msgid "Ignore Exception"
1837 msgstr "Ignorer l'Exception"
1838
1839-#. modules: account, finance, msf_instance, register_accounting, sale, base, msf_tools, mission_stock, sync_client, procurement_cycle, stock
1840+#. modules: account, finance, msf_instance, register_accounting, sale, base, msf_tools, mission_stock, sync_client, procurement_cycle, stock, account_hq_entries
1841 #: view:account.bank.statement:0
1842 #: report:addons/account/report/account_liquidity_balance.mako:156
1843 #: field:workflow.workitem,inst_id:0
1844@@ -53528,6 +53573,7 @@
1845 #: report:liquidity.position.pdf:0
1846 #: field:stock.location.instance,instance_id:0
1847 #: report:signature.export.report:0
1848+#: code:addons/account_hq_entries/report/finance_cost_price.py:47
1849 msgid "Instance"
1850 msgstr "Instance"
1851
1852@@ -56717,7 +56763,7 @@
1853 msgid "Operational advance linked po invoices"
1854 msgstr "Operational advance linked po invoices"
1855
1856-#. modules: purchase, account, base_setup, hr, purchase_double_validation, msf_instance, sale, msf_config_locations, base, base_report_designer, unifield_setup, msf_button_access_rights
1857+#. modules: purchase, account, base_setup, hr, purchase_double_validation, msf_instance, sale, msf_config_locations, base, base_report_designer, unifield_setup, msf_button_access_rights, account_hq_entries
1858 #: field:account.installer,progress:0
1859 #: field:account.installer.modules,progress:0
1860 #: field:wizard.multi.charts.accounts,progress:0
1861@@ -56753,6 +56799,7 @@
1862 #: field:customer.commitment.setup,progress:0
1863 #: field:previous.fy.dates.setup,progress:0
1864 #: field:signature.setup,progress:0
1865+#: field:esc_line.setup,progress:0
1866 msgid "Configuration Progress"
1867 msgstr "Progression de la Configuration"
1868
1869@@ -57884,10 +57931,12 @@
1870 msgid "Invoice Based on Sales Orders"
1871 msgstr "Facture Basée sur commandes terrains"
1872
1873-#. module: transport_mgmt, msf_supply_doc_export
1874+#. module: transport_mgmt, msf_supply_doc_export, account_hq_entries
1875 #: field:international.transport.cost.report,order_id:0
1876 #: field:local.transport.cost.report,order_id:0
1877 #: report:addons/msf_supply_doc_export/report/supplier_performance_report_xls.mako:229
1878+#: view:esc.invoice.line:0
1879+#: field:esc.invoice.line,po_name:0
1880 msgid "PO Reference"
1881 msgstr "Référence BC"
1882
1883@@ -57903,12 +57952,16 @@
1884 msgid "Import Intl Commitments"
1885 msgstr "Import des Engagements"
1886
1887-#. module: msf_supply_doc_export, register_accounting, stock_override, useability_dashboard_and_menu
1888+#. module: msf_supply_doc_export, register_accounting, stock_override, useability_dashboard_and_menu, account_hq_entries
1889 #: report:po.follow.up_rml:0
1890 #: report:addons/register_accounting/report/fully_report_xls.mako:566
1891 #: report:addons/stock_override/report/report_stock_move_xls.mako:140
1892 #: selection:signature.follow_up,doc_type:0
1893+<<<<<<< TREE
1894 #: code:addons/useability_dashboard_and_menu/report/signature_follow_up_search_report.py:39
1895+=======
1896+#: field:finance_price.track_changes,stock_picking_id:0
1897+>>>>>>> MERGE-SOURCE
1898 msgid "IN"
1899 msgstr "ENTRANT"
1900
1901@@ -60526,7 +60579,7 @@
1902 msgid "Pallet"
1903 msgstr "Palette"
1904
1905-#. modules: msf_outgoing, account_mcdb, stock_override, sale, specific_rules, account_override, sourcing, update_client, stock, analytic_distribution, sync_client, resource, finance, account_mcdb, sales_followup, account, procurement_request, hr, consumption_calculation, account_override, base, purchase_followup, sync_client
1906+#. modules: msf_outgoing, account_mcdb, stock_override, sale, specific_rules, account_override, sourcing, update_client, stock, analytic_distribution, sync_client, resource, finance, account_mcdb, sales_followup, account, procurement_request, hr, consumption_calculation, account_override, base, purchase_followup, sync_client, product
1907 #: field:output.currency.for.export,state:0
1908 #: field:account.move,register_line_id:0
1909 #: field:res.partner,by_invoice_type:0
1910@@ -60590,6 +60643,7 @@
1911 #: field:wizard.account.employee.balance.tree,display_load_button:0
1912 #: field:signature.add_user.wizard,signature_id:0
1913 #: field:signature.document.wizard,user_id:0
1914+#: field:product.template,finance_price_currency_id:0
1915 msgid "unknown"
1916 msgstr "inconnu"
1917
1918@@ -68707,12 +68761,13 @@
1919 msgid "Supplier Information"
1920 msgstr "Fournisseur - Informations"
1921
1922-#. module: msf_outgoing
1923+#. module: msf_outgoing, account_hq_entries
1924 #: view:ppl.processor:0
1925 #: view:stock.incoming.processor:0
1926 #: view:internal.picking.processor:0
1927 #: view:outgoing.delivery.processor:0
1928 #: view:stock.picking:0
1929+#: view:esc.line.import:0
1930 msgid "Reset"
1931 msgstr "RÀZ"
1932
1933@@ -74064,6 +74119,8 @@
1934 #: field:hq.entries.import,error:0
1935 #: selection:hq.entries.import,state:0
1936 #: selection:account.cv.import,state:0
1937+#: field:esc.line.import,error:0
1938+#: selection:esc.line.import,state:0
1939 #, python-format, python-format
1940 msgid "Error"
1941 msgstr "Erreur"
1942@@ -74519,6 +74576,7 @@
1943 #: field:account.invoice.import,error_ids:0
1944 #: field:hq.entries.import,nberrors:0
1945 #: field:account.cv.import,error_ids:0
1946+#: field:esc.line.import,nberrors:0
1947 #, python-format
1948 msgid "Errors"
1949 msgstr "Erreurs"
1950@@ -74637,7 +74695,7 @@
1951 msgid "Line %s :: The move is not 'Available'. Check the state of the stock move and re-try."
1952 msgstr "Ligne %s :: Le mouvement n'est pas 'Disponible'. Vérifier le statut du mouvement de Stock et ré-essayez."
1953
1954-#. modules: purchase, account, msf_outgoing, analytic_distribution_supply, finance, product_asset, account_override, base, msf_audittrail, register_accounting, analytic_distribution
1955+#. modules: purchase, account, msf_outgoing, analytic_distribution_supply, finance, product_asset, account_override, base, msf_audittrail, register_accounting, analytic_distribution, account_hq_entries
1956 #: view:account.invoice:0
1957 #: view:account.invoice.report:0
1958 #: report:account.invoice2:0
1959@@ -74670,6 +74728,8 @@
1960 #: view:account.direct.invoice.wizard:0
1961 #: field:account.invoice.import,invoice_id:0
1962 #: field:account.cv.import,invoice_id:0
1963+#: field:finance_price.track_changes,invoice_id:0
1964+#: selection:finance_price.track_changes,matching_type:0
1965 msgid "Invoice"
1966 msgstr "Facture"
1967
1968@@ -75223,6 +75283,7 @@
1969 #: field:signature.export.wizard,start_date:0
1970 #: field:hq.entries.import,start_date:0
1971 #: field:signature.image,from_date:0
1972+#: field:esc.line.import,start_date:0
1973 msgid "Start Date"
1974 msgstr "Date de Début"
1975
1976@@ -76460,7 +76521,7 @@
1977 msgid "Canada/Yukon"
1978 msgstr "Canada/Yukon"
1979
1980-#. modules: purchase_allocation_report, unifield_setup, sales_followup, msf_doc_import, purchase, account, useability_dashboard_and_menu
1981+#. modules: purchase_allocation_report, unifield_setup, sales_followup, msf_doc_import, purchase, account, useability_dashboard_and_menu, account_hq_entries
1982 #: report:addons/purchase_allocation_report/report/po_line_allocation_report.mako:147
1983 #: report:purchase.order.allocation.report:0
1984 #: field:purchase.order.line.allocation.report,order_id:0
1985@@ -76471,7 +76532,11 @@
1986 #: code:addons/msf_doc_import/wizard/wizard_import_ad_line.py:122
1987 #: field:account.invoice.tax,purchase_id:0
1988 #: selection:signature.follow_up,doc_type:0
1989+<<<<<<< TREE
1990 #: code:addons/useability_dashboard_and_menu/report/signature_follow_up_search_report.py:32
1991+=======
1992+#: selection:finance_price.track_changes,matching_type:0
1993+>>>>>>> MERGE-SOURCE
1994 #, python-format
1995 msgid "PO"
1996 msgstr "BC"
1997@@ -77019,7 +77084,7 @@
1998 msgid "# of lines imported"
1999 msgstr "# de lignes importées"
2000
2001-#. modules: purchase, account, msf_outgoing, finance, purchase_override, sales_followup, supplier_catalogue, sale, product, kit, account_override, purchase_allocation_report, order_types, tender_flow, msf_supply_doc_export, msf_doc_import, register_accounting, stock, purchase_followup, consumption_calculation, procurement_request
2002+#. modules: purchase, account, msf_outgoing, finance, purchase_override, sales_followup, supplier_catalogue, sale, product, kit, account_override, purchase_allocation_report, order_types, tender_flow, msf_supply_doc_export, msf_doc_import, register_accounting, stock, purchase_followup, consumption_calculation, procurement_request, account_hq_entries
2003 #: field:account.invoice.line,price_unit:0
2004 #: report:account.invoice2:0
2005 #: report:allocation.invoices.report:0
2006@@ -77079,7 +77144,12 @@
2007 #: report:addons/msf_supply_doc_export/report/report_tender_xls.mako:73
2008 #: code:addons/msf_doc_import/wizard/__init__.py:92
2009 #: field:tender.line,price_unit:0
2010+<<<<<<< TREE
2011 #: report:shipment.donation.certificate:0
2012+=======
2013+#: field:esc.invoice.line,price_unit:0
2014+#: field:finance_price.track_changes,price_unit:0
2015+>>>>>>> MERGE-SOURCE
2016 #, python-format
2017 msgid "Unit Price"
2018 msgstr "Prix Unitaire"
2019@@ -79795,7 +79865,13 @@
2020 msgid "Date cancel"
2021 msgstr "Date d'annulation"
2022
2023+<<<<<<< TREE
2024 #. modules: sales_followup, msf_outgoing, procurement_request, consumption_calculation, sale, purchase_allocation_report, msf_supply_doc_export
2025+=======
2026+#. modules: sales_followup, consumption_calculation, procurement_request, msf_supply_doc_export, sale, msf_outgoing, account_hq_entries
2027+#: view:sale.order:0
2028+#: field:sale.order,requestor:0
2029+>>>>>>> MERGE-SOURCE
2030 #: field:product.history.consumption,requestor_id:0
2031 #: field:product.likely.expire.report,requestor_id:0
2032 #: field:weekly.forecast.report,requestor_id:0
2033@@ -79811,7 +79887,12 @@
2034 #: field:purchase.order.line.allocation.report,requestor:0
2035 #: field:internal.request.import,imp_requestor:0
2036 #: field:internal.request.import,in_requestor:0
2037+<<<<<<< TREE
2038 #: report:addons/sales_followup/report/ir_follow_up_location_report_xls.mako:313
2039+=======
2040+#: field:stock.picking,requestor:0
2041+#: view:esc.invoice.line:0
2042+>>>>>>> MERGE-SOURCE
2043 msgid "Requestor"
2044 msgstr "Demandeur"
2045
2046@@ -81637,6 +81718,8 @@
2047 #: view:replenishment.consolidated_oc.import:0
2048 #: view:wizard.import.ad.line:0
2049 #: view:account.cv.import:0
2050+#: view:esc.line.import:0
2051+#: field:esc.line.import.rejected,wiz_id:0
2052 msgid "Import"
2053 msgstr "Importer"
2054
2055@@ -82345,6 +82428,8 @@
2056 #: field:msf.accrual.line,state:0
2057 #: field:hq.entries.import,state:0
2058 #: field:account.cv.import,state:0
2059+#: field:esc.invoice.line,state:0
2060+#: field:esc.line.import,state:0
2061 #, python-format
2062 msgid "State"
2063 msgstr "Statut"
2064@@ -83091,7 +83176,7 @@
2065 msgid "SFTP connection succeeded"
2066 msgstr "SFTP connection succeeded"
2067
2068-#. modules: tender_flow, product_nomenclature, product_asset, account_override, product_attributes, register_accounting, product_expiry, procurement_cycle, return_claim, supplier_catalogue, import_data, mission_stock, unifield_setup, stock_forecast, stock_batch_recall, order_types, msf_doc_import, purchase_followup, product, stock_override, stock_schedule, service_purchasing, consumption_calculation, purchase_override, specific_rules, kit, base, product_list, product_manufacturer, procurement_report, threshold_value, purchase, account, msf_outgoing, stock_move_tracking, purchase_allocation_report, procurement_auto, sale, transport_mgmt, procurement, sourcing, msf_audittrail, purchase_msf, stock, sync_so, msf_tools, analytic_distribution
2069+#. modules: tender_flow, product_nomenclature, product_asset, account_override, product_attributes, register_accounting, product_expiry, procurement_cycle, return_claim, supplier_catalogue, import_data, mission_stock, unifield_setup, stock_forecast, stock_batch_recall, order_types, msf_doc_import, purchase_followup, product, stock_override, stock_schedule, service_purchasing, consumption_calculation, purchase_override, specific_rules, kit, base, product_list, product_manufacturer, procurement_report, threshold_value, purchase, account, msf_outgoing, stock_move_tracking, purchase_allocation_report, procurement_auto, sale, transport_mgmt, procurement, sourcing, msf_audittrail, purchase_msf, stock, sync_so, msf_tools, analytic_distribution, account_hq_entries
2070 #: field:account.analytic.line,product_id:0
2071 #: view:account.entries.report:0
2072 #: field:account.entries.report,product_id:0
2073@@ -83299,6 +83384,9 @@
2074 #: field:account.commitment.line,line_product_id:0
2075 #: field:product.ed_bn.mass.update.history,product_id:0
2076 #: field:stock.picking,product_id:0
2077+#: view:esc.invoice.line:0
2078+#: field:esc.invoice.line,product_id:0
2079+#: field:finance_price.track_changes,product_id:0
2080 #, python-format
2081 msgid "Product"
2082 msgstr "Produit"
2083@@ -83557,6 +83645,7 @@
2084 #: field:wizard.register.import,file:0
2085 #: field:account.invoice.import,file:0
2086 #: field:account.cv.import,file:0
2087+#: field:esc.line.import,file:0
2088 msgid "File"
2089 msgstr "Fichier"
2090
2091@@ -92376,6 +92465,7 @@
2092 #: report:addons/msf_outgoing/report/freight_manifest_xls.mako:372
2093 #: report:freight_manifest:0
2094 #: field:hq.entries.import,total:0
2095+#: field:esc.line.import,total:0
2096 #, python-format
2097 msgid "Total"
2098 msgstr "Total"
2099@@ -93399,7 +93489,7 @@
2100 msgid "America/Anguilla"
2101 msgstr "America/Anguilla"
2102
2103-#. modules: tender_flow, financing_contract, account_override, product_attributes, msf_accrual, msf_doc_import, finance, base_setup, account_mcdb, res_currency_tables, supplier_catalogue, stock_override, product_asset, analytic_override, purchase_compare_rfq, msf_supply_doc_export, analytic_distribution, product, msf_homere_interface, msf_instance, register_accounting, specific_rules, kit, base, msf_currency_revaluation, account_subscription, return_claim, res_currency_functional, msf_budget, purchase, account, msf_outgoing, msf_partner, purchase_allocation_report, sale, transport_mgmt, stock, sync_so, purchase_followup, consumption_calculation, procurement_request, order_types, purchase_override
2104+#. modules: tender_flow, financing_contract, account_override, product_attributes, msf_accrual, msf_doc_import, finance, base_setup, account_mcdb, res_currency_tables, supplier_catalogue, stock_override, product_asset, analytic_override, purchase_compare_rfq, msf_supply_doc_export, analytic_distribution, product, msf_homere_interface, msf_instance, register_accounting, specific_rules, kit, base, msf_currency_revaluation, account_subscription, return_claim, res_currency_functional, msf_budget, purchase, account, msf_outgoing, msf_partner, purchase_allocation_report, sale, transport_mgmt, stock, sync_so, purchase_followup, consumption_calculation, procurement_request, order_types, purchase_override, account_hq_entries
2105 #: view:account.account:0
2106 #: report:account.analytic.account.journal:0
2107 #: view:account.analytic.line:0
2108@@ -93589,7 +93679,11 @@
2109 #: report:addons/account/report/account_employee_ledger.mako:315
2110 #: report:addons/finance/report/account_employee_balance_tree_xls.mako:345
2111 #: report:addons/account/report/export_cv.mako:117
2112+<<<<<<< TREE
2113 #: report:shipment.donation.certificate:0
2114+=======
2115+#: field:esc.invoice.line,currency_id:0
2116+>>>>>>> MERGE-SOURCE
2117 #, python-format
2118 msgid "Currency"
2119 msgstr "Devise"
2120@@ -96551,6 +96645,7 @@
2121 #: report:account.invoice2:0
2122 #: code:addons/account_override/res_company.py:40
2123 #: report:addons/account/report/export_invoice.mako:104
2124+#: field:hq.entries.split,document_date:0
2125 #, python-format
2126 msgid "Document Date"
2127 msgstr "Date du Document"
2128@@ -97277,7 +97372,11 @@
2129 #: view:signature.set_user:0
2130 #: view:account.cv.import:0
2131 #: view:split.composition.item.wizard:0
2132+<<<<<<< TREE
2133 #: view:signature.follow_up.search.wizard:0
2134+=======
2135+#: view:esc.line.import:0
2136+>>>>>>> MERGE-SOURCE
2137 #, python-format
2138 msgid "Cancel"
2139 msgstr "Annuler"
2140@@ -97928,7 +98027,7 @@
2141 msgid "Removal date"
2142 msgstr "Date de Retrait"
2143
2144-#. modules: msf_budget, sync_client, res_currency_tables, financing_contract, msf_homere_interface, msf_instance, export_import_lang, msf_outgoing, msf_doc_import, product_attributes
2145+#. modules: msf_budget, sync_client, res_currency_tables, financing_contract, msf_homere_interface, msf_instance, export_import_lang, msf_outgoing, msf_doc_import, product_attributes, account_hq_entries
2146 #: view:base.language.export:0
2147 #: view:base.language.import:0
2148 #: view:msf.language.import:0
2149@@ -97942,6 +98041,7 @@
2150 #: view:ppl.set_pack_on_lines:0
2151 #: code:addons/msf_doc_import/purchase_order.py:61
2152 #: view:product.ask.activate.wizard:0
2153+#: view:esc.line.import:0
2154 #, python-format
2155 msgid "OK"
2156 msgstr "OK"
2157@@ -98423,7 +98523,7 @@
2158 msgid "To"
2159 msgstr "À"
2160
2161-#. modules: delivery_mechanism, account, msf_outgoing, msf_homere_interface, sync_client, stock_override, kit, account_override, register_accounting, msf_doc_import, return_claim, stock
2162+#. modules: delivery_mechanism, account, msf_outgoing, msf_homere_interface, sync_client, stock_override, kit, account_override, register_accounting, msf_doc_import, return_claim, stock, account_hq_entries
2163 #: view:account.automatic.reconcile:0
2164 #: view:account.use.model:0
2165 #: view:debit.note.import.invoice:0
2166@@ -98482,6 +98582,7 @@
2167 #: view:wizard.common.import.line:0
2168 #: selection:stock.move.in.processor,sequence_issue:0
2169 #: view:account.cv.import:0
2170+#: view:hq.entries.import:0
2171 msgid "Ok"
2172 msgstr "Ok"
2173
2174@@ -99471,11 +99572,12 @@
2175 " This module aims at set documents to 'Done' state.\n"
2176 " "
2177
2178-#. modules: procurement, resource, stock
2179+#. modules: procurement, resource, stock, account_hq_entries
2180 #: view:procurement.order:0
2181 #: field:procurement.order,name:0
2182 #: view:resource.calendar.leaves:0
2183 #: view:stock.move:0
2184+#: field:esc.line.import.rejected,error:0
2185 msgid "Reason"
2186 msgstr "Motif"
2187
2188@@ -100058,7 +100160,7 @@
2189 msgid "Monthly review consumption line"
2190 msgstr "Ligne de Révision Mensuelle des Consommations"
2191
2192-#. modules: purchase, account, base_setup, hr, import_data, msf_instance, sale, msf_config_locations, export_import_lang, base, base_report_designer, unifield_setup, report_webkit, purchase_double_validation, msf_button_access_rights
2193+#. modules: purchase, account, base_setup, hr, import_data, msf_instance, sale, msf_config_locations, export_import_lang, base, base_report_designer, unifield_setup, report_webkit, purchase_double_validation, msf_button_access_rights, account_hq_entries
2194 #: field:account.installer,config_logo:0
2195 #: field:account.installer.modules,config_logo:0
2196 #: field:wizard.multi.charts.accounts,config_logo:0
2197@@ -100113,6 +100215,7 @@
2198 #: field:signature.image,pngb64:0
2199 #: field:signature.line,image_id:0
2200 #: field:signature.setup,config_logo:0
2201+#: field:esc_line.setup,config_logo:0
2202 msgid "Image"
2203 msgstr "Image"
2204
2205@@ -103726,12 +103829,13 @@
2206 msgstr " Import en cours... \n"
2207 " Veuillez attendre que l'import soit terminer avant de faire des modifications."
2208
2209-#. modules: msf_doc_import, msf_outgoing, msf_printed_documents
2210+#. modules: msf_doc_import, msf_outgoing, msf_printed_documents, account_hq_entries
2211 #: code:addons/msf_doc_import/wizard/wizard_import_ppl_to_create_ship.py:71
2212 #: report:addons/msf_outgoing/report/pre_packing_excel_report_xls.mako:192
2213 #: view:shipment:0
2214 #: report:addons/msf_outgoing/report/freight_manifest_xls.mako:238
2215 #: report:freight_manifest:0
2216+#: view:esc.invoice.line:0
2217 #, python-format
2218 msgid "Consignee"
2219 msgstr "Destinataire"
2220@@ -105612,8 +105716,9 @@
2221 msgid "Processing Qty can't be larger than move qty."
2222 msgstr "La qté à traiter ne peut être plus grande que la qté du mouvement."
2223
2224-#. module: stock
2225+#. module: stock, account_hq_entries
2226 #: field:stock.move,qty_processed:0
2227+#: code:addons/account_hq_entries/report/finance_cost_price.py:74
2228 msgid "Qty Processed"
2229 msgstr "Qté Taitée"
2230
2231@@ -108523,9 +108628,10 @@
2232 msgid "Generated according to latest IR's RDD (from most recent Order calc which is now closed)."
2233 msgstr "Généré en fonction de la DLS du dernier DI (depuis le plus récent Calcul de commande fermé)."
2234
2235-#. module: procurement_cycle
2236+#. module: procurement_cycle, account_hq_entries
2237 #: view:replenishment.segment:0
2238 #: field:replenishment.segment,last_generation:0
2239+#: code:addons/account_hq_entries/report/finance_cost_price.py:63
2240 msgid "Generation Date"
2241 msgstr "Date Génération"
2242
2243@@ -117771,6 +117877,7 @@
2244
2245 #. module: account_hq_entries
2246 #: selection:hq.entries.import,state:0
2247+#: selection:esc.line.import,state:0
2248 msgid "In-progress"
2249 msgstr "En cours"
2250
2251@@ -118884,6 +118991,7 @@
2252 #: view:account.bank.statement.line:0
2253 msgid "Only This Journal"
2254 msgstr "Seulement Ce Journal"
2255+<<<<<<< TREE
2256
2257 #. module: msf_doc_import
2258 #: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1058
2259@@ -119224,3 +119332,366 @@
2260 #: report:shipment.donation.certificate:0
2261 msgid "Additional items:"
2262 msgstr "Éléments supplémentaires:"
2263+=======
2264+
2265+#. module: account_hq_entries
2266+#: view:esc_line.setup:0
2267+#: model:ir.actions.act_window,name:account_hq_entries.action_esc_line_setup
2268+msgid "Activate International Invoices Lines"
2269+msgstr "Activer les Lignes de Factures Internationales"
2270+
2271+#. module: account_hq_entries
2272+#: field:esc_line.setup,esc_line:0
2273+msgid "Activate International Invoices Lines ?"
2274+msgstr "Activer les Lignes de Factures Internationales ?"
2275+
2276+#. module: account_hq_entries
2277+#: field:esc.invoice.line,consignee_cc_id:0
2278+msgid "Consignee Cost Center"
2279+msgstr "Centre de Coût de Destination"
2280+
2281+#. module: account_hq_entries
2282+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:222
2283+#, python-format
2284+msgid "Consignee Cost Center/Instance %s not found or does not match any active instance."
2285+msgstr "Centre coût / Instance de Destination %s non trouvé ou ne correspondant pas à une instance active."
2286+
2287+#. module: account_hq_entries
2288+#: field:esc.invoice.line,imported_consignee_instance:0
2289+msgid "Consignee Instance"
2290+msgstr "Instance Destinataire"
2291+
2292+#. module: account_hq_entries
2293+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:260
2294+#, python-format
2295+msgid "Currency is mandatory."
2296+msgstr "Devise obligatoire."
2297+
2298+#. module: account_hq_entries
2299+#: model:ir.actions.server,name:account_hq_entries.esc_line_delete_action
2300+msgid "Delete Selected draft entries"
2301+msgstr "Supprimer les lignes brouillon sélectionnées"
2302+
2303+#. module: account_hq_entries
2304+#: view:esc.invoice.line:0
2305+msgid "Do you want to delete this line ?"
2306+msgstr "Voulez-vous supprimer cette ligne ?"
2307+
2308+#. module: account_hq_entries
2309+#: view:esc.line.import:0
2310+msgid "Download Empty Template"
2311+msgstr "Télécharger le modèle"
2312+
2313+#. module: account_hq_entries
2314+#: view:esc.line.import:0
2315+msgid "Download Rejected Lines"
2316+msgstr "Télécharger les lignes rejetées"
2317+
2318+#. module: product
2319+#: selection:product.mass.update,type_of_ed_bn:0
2320+msgid "ED Only"
2321+msgstr "Seulement DE"
2322+
2323+#. module: account_hq_entries
2324+#: field:esc.invoice.line,shipment_ref:0
2325+msgid "Field mapping with IN"
2326+msgstr "Mappage avec IN"
2327+
2328+#. module: product
2329+#: selection:product.price.type,field:0
2330+#: field:product.template,finance_price:0
2331+msgid "Finance Cost Price"
2332+msgstr "Prix Finance"
2333+
2334+#. module: account_hq_entries
2335+#: model:ir.model,name:account_hq_entries.model_finance_price_track_changes
2336+msgid "Finance Price Track changes"
2337+msgstr "Changements du Prix Finance"
2338+
2339+#. module: product
2340+#: view:product.product:0
2341+msgid "HQ Merge product"
2342+msgstr "Fusion Siège de produits"
2343+
2344+#. module: account_hq_entries
2345+#: field:esc.invoice.line,in_number:0
2346+msgid "IN Number"
2347+msgstr "Numéro IN"
2348+
2349+#. module: account_hq_entries
2350+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:82
2351+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:134
2352+#: model:ir.model,name:account_hq_entries.model_esc_line_import
2353+#, python-format
2354+msgid "Import International Invoices Lines"
2355+msgstr "Import de Lignes de Factures Internationales"
2356+
2357+#. module: account_hq_entries
2358+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:321
2359+#, python-format
2360+msgid "Imported with error(s)"
2361+msgstr "Importé avec des erreurs"
2362+
2363+#. module: account_hq_entries
2364+#: view:esc.invoice.line:0
2365+#: model:ir.model,name:account_hq_entries.model_esc_invoice_line
2366+msgid "International Invoices Line"
2367+msgstr "Ligne de Factures Internationales"
2368+
2369+#. module: account_hq_entries
2370+#: model:ir.actions.act_window,name:account_hq_entries.esc_invoice_line_action
2371+#: model:ir.ui.menu,name:account_hq_entries.esc_invoice_line_menu
2372+msgid "International Invoices Lines"
2373+msgstr "Lignes de Factures Internationales"
2374+
2375+#. module: account_hq_entries
2376+#: view:esc.line.import:0
2377+#: model:ir.actions.server,name:account_hq_entries.esc_line_import_action
2378+#: model:ir.ui.menu,name:account_hq_entries.esc_line_import_menu
2379+msgid "International Invoices Lines Import"
2380+msgstr "Import de Lignes de Factures Internationales"
2381+
2382+#. module: account_hq_entries
2383+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:100
2384+#: model:ir.actions.report.xml,name:account_hq_entries.esc_line_import_template
2385+#, python-format
2386+msgid "International Invoices Lines Template"
2387+msgstr "Modèle de Lignes de Factures Internationales"
2388+
2389+#. module: account_hq_entries
2390+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:324
2391+#, python-format
2392+msgid "International Invoices Lines import successful"
2393+msgstr "Import réussi des Lignes de Factures Internationales"
2394+
2395+#. module: account_hq_entries
2396+#: view:esc.invoice.line:0
2397+msgid "International Invoices Liness"
2398+msgstr "Lignes de Factures Internationales"
2399+
2400+#. module: account_hq_entries
2401+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:111
2402+#: model:ir.actions.report.xml,name:account_hq_entries.esc_line_import_rejected
2403+#, python-format
2404+msgid "International Invoices Rejected Lines"
2405+msgstr "Lignes Internationales Rejetées"
2406+
2407+#. module: account_hq_entries
2408+#: field:finance_price.track_changes,esc_invoice_line_id:0
2409+msgid "International Line"
2410+msgstr "Ligne Internationale"
2411+
2412+#. module: account_hq_entries
2413+#: selection:finance_price.track_changes,matching_type:0
2414+msgid "International Lines"
2415+msgstr "Lignes Internationales"
2416+
2417+#. module: account_hq_entries
2418+#: view:esc.line.import:0
2419+msgid "Keep import results and close the window"
2420+msgstr "Garder les résultats de l'import et fermer la fenêtre."
2421+
2422+#. module: account_hq_entries
2423+#: view:finance_price.track_changes:0
2424+#: model:ir.actions.act_window,name:account_hq_entries.finance_price_track_changes_action
2425+#: model:ir.ui.menu,name:account_hq_entries.finance_price_track_changes_menu
2426+msgid "Line Matching"
2427+msgstr "Correspondance des lignes"
2428+
2429+#. module: account_hq_entries
2430+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:312
2431+#, python-format
2432+msgid "Line duplicated in the system"
2433+msgstr "Ligne dupliquée dans le système"
2434+
2435+#. module: account_hq_entries
2436+#: model:ir.actions.act_window,name:account_hq_entries.esc_line_to_finance_price_tc
2437+msgid "Matching"
2438+msgstr "Correspondance"
2439+
2440+#. module: account_hq_entries
2441+#: code:addons/account_hq_entries/report/finance_cost_price.py:76
2442+#: field:finance_price.track_changes,matching_type:0
2443+#, python-format
2444+msgid "Matching Type"
2445+msgstr "Type de correspondance"
2446+
2447+#. module: account_hq_entries
2448+#: field:finance_price.track_changes,stock_move_id:0
2449+msgid "Move line"
2450+msgstr "Mouvement"
2451+
2452+#. module: account_hq_entries
2453+#: code:addons/account_hq_entries/report/finance_cost_price.py:71
2454+#: field:finance_price.track_changes,new_price:0
2455+#, python-format
2456+msgid "New Finance Price"
2457+msgstr "Nouveau Prix Finance"
2458+
2459+#. module: product
2460+#: selection:product.mass.update,type_of_ed_bn:0
2461+msgid "No BN/No ED"
2462+msgstr "Pas NL/Pas DE"
2463+
2464+#. module: account_hq_entries
2465+#: view:esc.invoice.line:0
2466+msgid "Not Done"
2467+msgstr "Non clôturé"
2468+
2469+#. module: account_hq_entries
2470+#: code:addons/account_hq_entries/report/finance_cost_price.py:70
2471+#, python-format
2472+msgid "Old Finance Price"
2473+msgstr "Ancien Prix Finance"
2474+
2475+#. module: account_hq_entries
2476+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:197
2477+#, python-format
2478+msgid "Order ref %s does not match the PO pattern"
2479+msgstr "La Réf. de Commande %s ne correspond pas au format d'un BdC"
2480+
2481+#. module: account_hq_entries
2482+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:192
2483+#, python-format
2484+msgid "Order ref is mandatory"
2485+msgstr "Réf. de Commande obligatoire."
2486+
2487+#. module: account_hq_entries
2488+#: field:finance_price.track_changes,purchase_oder_line_id:0
2489+msgid "PO line"
2490+msgstr "Ligne BdC"
2491+
2492+#. module: product
2493+#: code:addons/product/wizard/product_mass_update.py:426
2494+#, python-format
2495+msgid "Please limit your query to a maximum of 500 products."
2496+msgstr "Veuillez restreindre la recherche à un maximum de 500 produits."
2497+
2498+#. module: account_hq_entries
2499+#: field:finance_price.track_changes,old_price:0
2500+msgid "Previous Finance Price"
2501+msgstr "Précédent Prix Finance"
2502+
2503+#. module: account_hq_entries
2504+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:234
2505+#, python-format
2506+msgid "Product Code %s not found."
2507+msgstr "Code Produit %s non trouvé."
2508+
2509+#. module: account_hq_entries
2510+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:227
2511+#, python-format
2512+msgid "Product Code is mandatory."
2513+msgstr "Code Produit obligatoire."
2514+
2515+#. module: account_hq_entries
2516+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:247
2517+#, python-format
2518+msgid "Product Quantity %s cannot be 0 or negative"
2519+msgstr "La Quantité %s ne peut pas être 0 ou négative"
2520+
2521+#. module: account_hq_entries
2522+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:243
2523+#, python-format
2524+msgid "Product Quantity %s is not a number."
2525+msgstr "La Quantité %s n'est pas un nombre."
2526+
2527+#. module: account_hq_entries
2528+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:238
2529+#, python-format
2530+msgid "Product quantity is mandatory."
2531+msgstr "La Quantité est obligatoire."
2532+
2533+#. module: product
2534+#: field:product.mass.update,not_activated_product_ids:0
2535+#: field:product.mass.update,not_deactivated_product_ids:0
2536+msgid "Product(s) that can not be deactivated"
2537+msgstr "Produit(s) qui ne peuvent pas être désativé(s)"
2538+
2539+#. module: account_hq_entries
2540+#: field:finance_price.track_changes,stock_before:0
2541+msgid "Qty in Stock Before"
2542+msgstr "Qté en stock avant"
2543+
2544+#. module: account_hq_entries
2545+#: field:finance_price.track_changes,qty_processed:0
2546+msgid "Quantity Processed"
2547+msgstr "Quantité Traitée"
2548+
2549+#. module: account_hq_entries
2550+#: sql_constraint:esc.invoice.line:0
2551+msgid "Quantity must be greater than 0."
2552+msgstr "La Quantité doit être supérieure à 0."
2553+
2554+#. module: account_hq_entries
2555+#: model:ir.model,name:account_hq_entries.model_esc_line_import_rejected
2556+msgid "Rejected Lines"
2557+msgstr "Lignes Rejetées"
2558+
2559+#. module: account_hq_entries
2560+#: field:esc.invoice.line,remaining_qty:0
2561+msgid "Remaining Quantity"
2562+msgstr "Quantié Restante"
2563+
2564+#. module: account_hq_entries
2565+#: field:esc.invoice.line,requestor_cc_id:0
2566+msgid "Requestor Cost Center"
2567+msgstr "Centre de Coût du Demandeur"
2568+
2569+#. module: account_hq_entries
2570+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:206
2571+#, python-format
2572+msgid "Requestor Cost Center %s not found or does not match any active instance."
2573+msgstr "Centre de Coût du demandeur %s non trouvé ou ne correspondant pas à une instance active."
2574+
2575+#. module: account_hq_entries
2576+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:201
2577+#, python-format
2578+msgid "Requestor Cost Center is mandatory"
2579+msgstr "Le Centre de Coût du demandeur est obligatoire"
2580+
2581+#. module: account_hq_entries
2582+#: view:esc.line.import:0
2583+msgid "Reset import and close the window"
2584+msgstr "Mise à zéro de l'import et fermeture de la fenêtre"
2585+
2586+#. module: account_hq_entries
2587+#: code:addons/account_hq_entries/report/finance_cost_price.py:73
2588+#, python-format
2589+msgid "Stock Level Before"
2590+msgstr "Niveau de Stock Avant"
2591+
2592+#. module: account_hq_entries
2593+#: view:esc.line.import:0
2594+msgid "This will import lines from a SpreadSheet xml file."
2595+msgstr "Imported des lines depuis un fichier au format Feuille de Calcul XML 2003"
2596+
2597+#. module: account_hq_entries
2598+#: model:ir.actions.report.xml,name:account_hq_entries.report_finance_cost_price
2599+msgid "Track Changes Finance Price"
2600+msgstr "Suivi des changements du Prix Finance"
2601+
2602+#. module: account_hq_entries
2603+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:256
2604+#, python-format
2605+msgid "Unit Price %s is not a number."
2606+msgstr "Prix Unitaire %s n'est pas un nombre."
2607+
2608+#. module: account_hq_entries
2609+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:251
2610+#, python-format
2611+msgid "Unit Price is mandatory."
2612+msgstr "Le Prix Unitaire est obligatoire"
2613+
2614+#. module: account_hq_entries
2615+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:188
2616+#, python-format
2617+msgid "a row must have 8 columns"
2618+msgstr "une ligne doit avoir 8 colonnes"
2619+
2620+#. module: account_hq_entries
2621+#: code:addons/account_hq_entries/wizard/esc_lines_import.py:310
2622+#, python-format
2623+msgid "duplicates line %d"
2624+msgstr "ligne dupliquée %d"
2625+>>>>>>> MERGE-SOURCE
2626
2627=== modified file 'bin/addons/msf_profile/msf_profile.py'
2628--- bin/addons/msf_profile/msf_profile.py 2023-05-03 10:23:38 +0000
2629+++ bin/addons/msf_profile/msf_profile.py 2023-05-05 12:01:38 +0000
2630@@ -57,6 +57,7 @@
2631 'model': lambda *a: 'patch.scripts',
2632 }
2633
2634+<<<<<<< TREE
2635 # UF29.0
2636 def us_11177_bn_for_kcl_items(self, cr, uid, *a, **b):
2637 '''
2638@@ -198,6 +199,16 @@
2639 cr.execute("update ir_translation set name='account.analytic.account,nameko' where name='account.analytic.account,name' and type='model'")
2640 return True
2641
2642+=======
2643+ # UF29.0
2644+ def us_10835_disable_iil_menu(self, cr, uid, *a, **b):
2645+ # hide menuitems
2646+ setup_obj = self.pool.get('esc_line.setup')
2647+ esc_line_install = setup_obj.create(cr, uid, {})
2648+ setup_obj.execute(cr, uid, [esc_line_install])
2649+
2650+
2651+>>>>>>> MERGE-SOURCE
2652 # UF28.0
2653 def us_10885_tc_entries(self, cr, uid, *a, **b):
2654 current_instance = self.pool.get('res.users').browse(cr, uid, uid).company_id.instance_id
2655
2656=== modified file 'bin/addons/msf_sync_data_server/data/sync_server.message_rule.csv'
2657--- bin/addons/msf_sync_data_server/data/sync_server.message_rule.csv 2023-02-17 14:02:08 +0000
2658+++ bin/addons/msf_sync_data_server/data/sync_server.message_rule.csv 2023-05-05 12:01:38 +0000
2659@@ -6,7 +6,7 @@
2660 msf_sync_data_server.fo_updates_po_ref,TRUE,TRUE,"['name','state','client_order_ref']","['&', '&','&','&', ('claim_name_goods_return', '=', False), ('partner_type','!=','external'),('client_order_ref','!=',False),('split_type_sale_order','=','original_sale_order'),'!',('client_order_ref', 'like', 'invalid_by_recovery')]",partner_id,MISSION,purchase.order.update_fo_ref,sale.order,FO updates PO ref,9,,Valid
2661 msf_sync_data_server.update_in_ref,TRUE,TRUE,"['name','shipment_ref']","['&','&', ('partner_type_stock_picking', 'not in', ['esc', 'external']),('shipment_ref','!=',False),'!',('shipment_ref', 'like', 'invalid_by_recovery')]",partner_id,MISSION,stock.picking.update_in_ref,stock.picking,IN updates ref to OUT SHIP,10,,Valid
2662 msf_sync_data_server.pol_create_sol,TRUE,TRUE,"['sync_local_id', 'order_id/name','product_id/id', 'product_id/name', 'name', 'state', 'product_qty', 'product_uom', 'price_unit', 'analytic_distribution_id/id','comment','have_analytic_distribution_from_header','line_number', 'nomen_manda_0/id','nomen_manda_1/id','nomen_manda_2/id','nomen_manda_3/id', 'nomenclature_description','notes','default_name','default_code','is_line_split','date_planned', 'stock_take_date', 'ir_name_for_sync', 'original_instance']","[('sync_linked_sol', '=', False), ('order_id.partner_type', 'not in',['external','esc']), ('state', 'in', ['validated', 'confirmed', 'done']), ('order_id.state', 'not in', ['draft', 'draft_p', 'cancel']), ('from_synchro_return_goods', '=', False), ('order_id.active', '=', 't')]",partner_id,MISSION,sale.order.line.create_so_line,purchase.order.line,PO line creates FO line,11,,Valid
2663-msf_sync_data_server.sol_updates_pol,TRUE,TRUE,"['resourced_original_line/id', 'resourced_original_remote_line','sync_sourced_origin', 'sync_local_id', 'sync_linked_pol', 'order_id/name', 'product_id/id', 'product_id/name', 'name', 'state','product_uom_qty', 'product_uom', 'price_unit', 'in_name_goods_return', 'analytic_distribution_id/id','comment','have_analytic_distribution_from_header','line_number', 'nomen_manda_0/id','nomen_manda_1/id','nomen_manda_2/id','nomen_manda_3/id', 'nomenclature_description','notes','default_name','default_code','date_planned','is_line_split', 'original_line_id/id', 'confirmed_delivery_date', 'stock_take_date', 'cancel_split_ok', 'modification_comment', 'from_cancel_out', 'pol_external_ref', 'dpo_line_id/.id', 'dpo_id/.id', 'sync_pushed_from_po', 'esti_dd']","[('order_id.partner_type', '!=', 'external'), ('order_id.active', '=', 't'), ('state', '!=', 'draft'), ('order_id.procurement_request', '=', False), ('product_uom_qty', '!=', 0.0), '!', '&', ('order_id.fo_created_by_po_sync', '=', False), ('order_id.state', '=', 'draft')]",partner_id,MISSION,purchase.order.line.sol_update_original_pol,sale.order.line,FO line updates PO line,12,"[('order_id.procurement_request', '=', False), ('order_id.active', '=', 't'), ('order_id.state', 'in', ['draft', 'draft_p']), ('order_id.partner_type', 'not in', ['external', 'esc']), ('order_id.client_order_ref', '=', False)]",Valid
2664+msf_sync_data_server.sol_updates_pol,TRUE,TRUE,"['resourced_original_line/id', 'resourced_original_remote_line','sync_sourced_origin', 'sync_local_id', 'sync_linked_pol', 'order_id/name', 'product_id/id', 'product_id/name', 'name', 'state','product_uom_qty', 'product_uom', 'price_unit', 'in_name_goods_return', 'analytic_distribution_id/id','comment','have_analytic_distribution_from_header','line_number', 'nomen_manda_0/id','nomen_manda_1/id','nomen_manda_2/id','nomen_manda_3/id', 'nomenclature_description','notes','default_name','default_code','date_planned','is_line_split', 'original_line_id/id', 'confirmed_delivery_date', 'stock_take_date', 'cancel_split_ok', 'modification_comment', 'from_cancel_out', 'pol_external_ref', 'dpo_line_id/.id', 'dpo_id/.id', 'dpo_id/partner_type', 'sync_pushed_from_po', 'esti_dd']","[('order_id.partner_type', '!=', 'external'), ('order_id.active', '=', 't'), ('state', '!=', 'draft'), ('order_id.procurement_request', '=', False), ('product_uom_qty', '!=', 0.0), '!', '&', ('order_id.fo_created_by_po_sync', '=', False), ('order_id.state', '=', 'draft')]",partner_id,MISSION,purchase.order.line.sol_update_original_pol,sale.order.line,FO line updates PO line,12,"[('order_id.procurement_request', '=', False), ('order_id.active', '=', 't'), ('order_id.state', 'in', ['draft', 'draft_p']), ('order_id.partner_type', 'not in', ['external', 'esc']), ('order_id.client_order_ref', '=', False)]",Valid
2665 msf_sync_data_server.pol_update_date_expected,TRUE,TRUE,"['sync_local_id', 'sync_linked_pol']","[('id', '=', 0)]",partner_id,MISSION,purchase.order.line.update_date_expected,sale.order.line,Update IN expected date,55,,Valid
2666 msf_sync_data_server.partial_shipped_coordo_updates_in_at_project,TRUE,TRUE,"['name', 'previous_step_id/name', 'state', 'origin', 'partner_type_stock_picking', 'shipment_id/name', 'min_date', 'note', 'claim', 'packing_list', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_id/default_code', 'move_lines/product_qty', 'move_lines/prodlot_id/id','move_lines/prodlot_id/name','move_lines/prodlot_id/life_date', 'move_lines/prodlot_id/type', 'move_lines/prodlot_id/comment', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/usage', 'move_lines/comment', 'move_lines/sale_line_id/id', 'move_lines/sale_line_id/in_name_goods_return', 'move_lines/sale_line_id/resourced_original_remote_line', 'move_lines/from_pack', 'move_lines/to_pack', 'move_lines/weight', 'move_lines/height', 'move_lines/length', 'move_lines/width', 'sale_id/claim_name_goods_return', 'sale_id/client_order_ref']","['&','&','&','&','&',('partner_type_stock_picking', '!=', 'external'), ('type', '=', 'out'), ('subtype', 'in', ['standard', 'packing']), ('state', 'in', ['done', 'delivered']), ('already_shipped', '=', True), ('do_not_sync', '=', False)]",partner_id,MISSION,stock.picking.partial_shipped_fo_updates_in_po,stock.picking,Partial shipped at Coordo updates IN at Project,19,,Valid
2667 msf_sync_data_server.moves_from_dpo_closed_coordo_updates_in_at_project,TRUE,TRUE,"['name', 'state', 'origin', 'subtype', 'partner_type_stock_picking', 'shipment_id/name', 'min_date', 'note', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_id/default_code', 'move_lines/product_qty', 'move_lines/prodlot_id/id','move_lines/prodlot_id/name','move_lines/prodlot_id/life_date', 'move_lines/prodlot_id/type', 'move_lines/prodlot_id/comment', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/dpo_line_id', 'move_lines/comment']","['&', '&', '&', '&', ('partner_type_stock_picking', '!=', 'external'), ('type', '=', 'out'), ('subtype', 'in', ['picking', 'standard']), ('dpo_out', '=', True), ('new_dpo_out', '=', False)]",partner_id,MISSION,stock.picking.partial_shippped_dpo_updates_in_po,stock.picking,Moves from DPO closed at Coordo updates IN at Project,20,,Valid
2668
2669=== modified file 'bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv'
2670--- bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2023-03-08 09:08:44 +0000
2671+++ bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2023-05-05 12:01:38 +0000
2672@@ -187,3 +187,5 @@
2673 msf_sync_data_server.stock_mission_report_line_location_remote,TRUE,TRUE,TRUE,TRUE,bidirectional,Up,"[('location_id.usage', '=', 'internal')]","['location_name', 'product_id/id', 'quantity', 'last_mod_date', 'instance_id/id', 'uom_id/id']",MISSION,stock.mission.report.line.location,,Remote Stock Level,Valid,,1030
2674 msf_sync_data_server.account_mcdb,TRUE,TRUE,TRUE,TRUE,bidirectional,Down,"[('description', '!=', False), ('synced', '=', True), ('hq_template', '=', True)]","['abs_id/id', 'account_ids/id', 'account_type_ids/id', 'amount_book_from', 'amount_book_to', 'amount_from', 'amount_func_from', 'amount_func_to', 'amount_to', 'analytic_account_cc_ids/id', 'analytic_account_dest_ids/id', 'analytic_account_f1_ids/id', 'analytic_account_f2_ids/id', 'analytic_account_fp_ids/id', 'analytic_axis', 'analytic_journal_ids/id', 'booking_currency_id/id', 'cheque_number', 'copied_id/id', 'currency_choice', 'currency_id/id', 'description', 'display_account', 'display_analytic_account', 'display_analytic_journal', 'display_analytic_period', 'display_cost_center', 'display_destination', 'display_employee', 'display_free1', 'display_free2', 'display_funding_pool', 'display_in_output_currency/id', 'display_instance', 'display_journal', 'display_mcdb_load_button', 'display_partner', 'display_period', 'display_top_prop_instance', 'display_transfer_journal', 'display_type', 'document_code', 'document_date_from', 'document_date_to', 'document_state', 'employee_id/id', 'employee_ids/id', 'fiscalyear_id/id', 'functional_currency_id/id', 'fx_table_id/id', 'instance_ids/id', 'journal_ids/id', 'model', 'name', 'open_items/id', 'partner_id/id', 'partner_ids/id', 'partner_txt', 'period_ids/id', 'posting_date_from', 'posting_date_to', 'reallocated', 'reconciled', 'reconcile_date', 'reconcile_id/id', 'ref', 'rev_account_ids', 'rev_account_type_ids', 'rev_analytic_account_cc_ids', 'rev_analytic_account_dest_ids', 'rev_analytic_account_f1_ids', 'rev_analytic_account_f2_ids', 'rev_analytic_account_fp_ids', 'rev_analytic_journal_ids', 'rev_employee_ids', 'reversed', 'rev_instance_ids', 'rev_journal_ids', 'rev_partner_ids', 'rev_period_ids', 'rev_top_prop_instance_ids', 'rev_transfer_journal_ids', 'top_prop_instance_ids/id', 'transfer_journal_id/id', 'transfer_journal_ids/id', 'hq_template', 'include_related_entries', 'excl_inactive_journal_ids', 'inactive_at']",HQ + MISSION,account.mcdb,,Selector,Valid,,1040
2675 msf_sync_data_server.finance_report_template,TRUE,TRUE,TRUE,TRUE,bidirectional,Down,"[('synced', '=', True), ('hq_template', '=', True)]","['last_modification', 'name', 'sync_values', 'wizard_name', 'hq_template']",HQ + MISSION,wizard.template,,Finance Report Templates,Valid,,1050
2676+msf_sync_data_server.iil_down,TRUE,TRUE,FALSE,FALSE,bidirectional,Single-Private,"[('state', '=', '1_draft')]","['po_name', 'requestor_cc_id/id', 'consignee_cc_id/id', 'product_id/id', 'price_unit', 'product_qty', 'uom_id/id', 'currency_id/id', 'shipment_ref', 'dest_instance_id/id']",HQ + MISSION,esc.invoice.line,dest_instance_id,Down ESC Invoices Lines,Valid,,1300
2677+msf_sync_data_server.iil_up,TRUE,TRUE,FALSE,FALSE,bidirectional,Single-Private,"[('state', '=', 'done')]","['state', 'remaining_qty', 'dest_instance_id/id']",HQ + MISSION,esc.invoice.line,dest_instance_id,UP ESC Invoices Lines state,Valid,,1305
2678
2679=== modified file 'bin/addons/product/product.py'
2680--- bin/addons/product/product.py 2023-03-15 13:17:31 +0000
2681+++ bin/addons/product/product.py 2023-05-05 12:01:38 +0000
2682@@ -314,6 +314,14 @@
2683 res[obj.id] = list_price
2684 return res
2685
2686+ def _get_finance_price_currency_id(self, cr, uid, ids, fields, arg, context=None):
2687+ ret = {}
2688+ cur_id = self.pool.get('res.users').get_company_currency_id(cr, uid)
2689+
2690+ for _id in ids:
2691+ ret[_id] = cur_id
2692+ return ret
2693+
2694 _columns = {
2695 'name': fields.char('Name', size=128, required=True, translate=True, select=True),
2696 'product_manager': fields.many2one('res.users','Product Manager',help="This is use as task responsible"),
2697@@ -328,6 +336,8 @@
2698 'rental': fields.boolean('Can be Rent'),
2699 'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
2700 'standard_price': fields.float('Cost Price', required=True, digits_compute=dp.get_precision('Account Computation'), help="Price of product calculated according to the selected costing method."),
2701+ 'finance_price': fields.float('Finance Cost Price', readonly=1, digits_compute=dp.get_precision('Account Computation')),
2702+ 'finance_price_currency_id': fields.function(_get_finance_price_currency_id, 'Finance CP Currency', method=True, type='many2one', relation='res.currency'),
2703 'list_price': fields.function(_get_list_price, method=True, type='float', string='Sale Price', digits_compute=dp.get_precision('Sale Price Computation'), help="Base price for computing the customer price. Sometimes called the catalog price.",
2704 store = {
2705 'product.template': (lambda self, cr, uid, ids, c=None: ids, ['standard_price'], 10),
2706
2707=== modified file 'bin/addons/product_attributes/product_attributes.py'
2708--- bin/addons/product_attributes/product_attributes.py 2023-04-26 14:14:45 +0000
2709+++ bin/addons/product_attributes/product_attributes.py 2023-05-05 12:01:38 +0000
2710@@ -1168,6 +1168,12 @@
2711 field.set('invisible', '0')
2712 res['arch'] = etree.tostring(root)
2713
2714+ if view_type == 'form' and self.pool.get('unifield.setup.configuration').get_config(cr, uid, 'esc_line'):
2715+ root = etree.fromstring(res['arch'])
2716+ for field in root.xpath('//field[@name="finance_price"]|//field[@name="finance_price_currency_id"]'):
2717+ field.set('invisible', '0')
2718+ res['arch'] = etree.tostring(root)
2719+
2720 if view_type == 'search' and context.get('available_for_restriction'):
2721 context.update({'search_default_not_restricted': 1})
2722 root = etree.fromstring(res['arch'])
2723
2724=== modified file 'bin/addons/product_attributes/product_attributes_view.xml'
2725--- bin/addons/product_attributes/product_attributes_view.xml 2023-04-26 14:14:45 +0000
2726+++ bin/addons/product_attributes/product_attributes_view.xml 2023-05-05 12:01:38 +0000
2727@@ -94,6 +94,8 @@
2728 <field name="currency_id" nolabel="1" />
2729 <field name="list_price" colspan="2"/>
2730 <field name="field_currency_id" nolabel="1" />
2731+ <field name="finance_price" colspan="2" invisible="1" />
2732+ <field name="finance_price_currency_id" nolabel="1" invisible="1" />
2733 <newline/>
2734 </group>
2735
2736
2737=== modified file 'bin/addons/purchase/purchase_order_line.py'
2738--- bin/addons/purchase/purchase_order_line.py 2023-02-09 11:14:39 +0000
2739+++ bin/addons/purchase/purchase_order_line.py 2023-05-05 12:01:38 +0000
2740@@ -666,6 +666,7 @@
2741 'max_qty_cancellable': fields.function(_in_qty_remaining, type='float', string='Total PO qty - already processed + assign qty + confirm qty', method=1, multi='in_remain'),
2742 'from_dpo_line_id': fields.integer('DPO line id on the remote', internal=1),
2743 'from_dpo_id': fields.integer('DPO id on the remote', internal=1),
2744+ 'from_dpo_esc': fields.boolean('Line sourced to ESC DPO', internal=1),
2745 'dates_modified': fields.boolean('EDD/CDD modified on validated line', internal=1),
2746 'loan_line_id': fields.many2one('sale.order.line', string='Linked loan line', readonly=True),
2747
2748
2749=== modified file 'bin/addons/stock/stock_move.py'
2750--- bin/addons/stock/stock_move.py 2023-02-10 11:14:12 +0000
2751+++ bin/addons/stock/stock_move.py 2023-05-05 12:01:38 +0000
2752@@ -38,8 +38,14 @@
2753
2754 def name_get(self, cr, uid, ids, context=None):
2755 res = []
2756- for line in self.browse(cr, uid, ids, context=context):
2757- res.append((line.id, (line.product_id.code or '/')+': '+line.location_id.name+' > '+line.location_dest_id.name))
2758+ if context is None:
2759+ context = {}
2760+ for line in self.browse(cr, uid, ids, fields_to_fetch=['product_id', 'line_number', 'location_id', 'location_dest_id'], context=context):
2761+ if context.get('display_move_line'):
2762+ prefix = '#%s %s' % (line.line_number, line.product_id.code or '/')
2763+ else:
2764+ prefix = line.product_id.code or '/'
2765+ res.append((line.id, '%s: %s > %s' % (prefix, line.location_id.name, line.location_dest_id.name)))
2766 return res
2767
2768 def _get_picking_ids(self, cr, uid, ids, context=None):
2769
2770=== modified file 'bin/addons/sync_client/update.py'
2771--- bin/addons/sync_client/update.py 2023-01-31 10:36:54 +0000
2772+++ bin/addons/sync_client/update.py 2023-05-05 12:01:38 +0000
2773@@ -209,7 +209,12 @@
2774 return 0
2775 domain.append(('id', 'in', ids_need_to_push))
2776
2777- ids_to_compute = self.search_ext(cr, uid, domain, context=context)
2778+ order = None
2779+ if hasattr(self, '_sync_order'):
2780+ # keep same id order at HQ and lower level
2781+ order = self._sync_order
2782+
2783+ ids_to_compute = self.search_ext(cr, uid, domain, order=order, context=context)
2784 if not ids_to_compute:
2785 return 0
2786
2787
2788=== modified file 'bin/addons/sync_common/common.py'
2789--- bin/addons/sync_common/common.py 2022-09-22 12:45:25 +0000
2790+++ bin/addons/sync_common/common.py 2023-05-05 12:01:38 +0000
2791@@ -45,6 +45,7 @@
2792 'cost.center.distribution.line',
2793 'country.export.mapping',
2794 'distribution.line',
2795+ 'esc.invoice.line',
2796 'financing.contract.contract',
2797 'financing.contract.donor',
2798 'financing.contract.format',
2799
2800=== modified file 'bin/addons/sync_server/rules.py'
2801--- bin/addons/sync_server/rules.py 2017-10-12 08:16:17 +0000
2802+++ bin/addons/sync_server/rules.py 2023-05-05 12:01:38 +0000
2803@@ -120,6 +120,7 @@
2804 ('down', 'Down'),
2805 ('bidirectional', 'Bidirectional'),
2806 ('bi-private', 'Bidirectional-Private'),
2807+ ('single-private', 'Single-Private'),
2808 ], 'Directionality', required = True,),
2809 'domain':fields.text('Domain', required = False),
2810 'owner_field':fields.char('Owner Field', size = 64, required = False),
2811@@ -459,7 +460,8 @@
2812 return (message, error)
2813
2814 def check_owner_field(self, cr, uid, rec, context=None):
2815- if rec.direction != 'bi-private': return ('', False)
2816+ if rec.direction not in ('bi-private', 'single-private'):
2817+ return ('', False)
2818 error = False
2819 message = "* Owner field existence... "
2820 try:
2821@@ -517,6 +519,10 @@
2822 error = err or error
2823 message.append(mess)
2824
2825+ if rec.direction == 'single-private' and rec.can_delete:
2826+ error = True
2827+ message.append('Single-Private and Can delete not implemented')
2828+
2829 message.append("* Sequence is unique... ")
2830 if self.search(cr, uid,
2831 [('sequence_number','=',rec.sequence_number)],
2832
2833=== modified file 'bin/addons/sync_server/rules_view.xml'
2834--- bin/addons/sync_server/rules_view.xml 2017-11-14 10:57:04 +0000
2835+++ bin/addons/sync_server/rules_view.xml 2023-05-05 12:01:38 +0000
2836@@ -92,7 +92,7 @@
2837 <field name="can_delete" />
2838 <field name="handle_priority"/>
2839 <field name="direction" on_change="invalidate(model_ref)" string="Direction"/>
2840- <field name="owner_field" on_change="invalidate(model_ref)" attrs="{'invisible':[('direction','!=','bi-private')], 'required':[('direction','=','bi-private')]}" colspan="4"/>
2841+ <field name="owner_field" on_change="invalidate(model_ref)" attrs="{'invisible':[('direction','not int',['bi-private', 'single-private'])], 'required':[('direction','in',['bi-private', 'single-private'])]}" colspan="4"/>
2842 <field name="master_data" />
2843 </group>
2844 <group col="2">
2845
2846=== modified file 'bin/addons/sync_server/sync_server.py'
2847--- bin/addons/sync_server/sync_server.py 2022-07-22 12:54:50 +0000
2848+++ bin/addons/sync_server/sync_server.py 2023-05-05 12:01:38 +0000
2849@@ -1097,6 +1097,9 @@
2850 to_retrieve.append(x)
2851 else:
2852 to_retrieve = list_to_retrieve
2853+ elif rules[update.rule_id.id]['direction'] == 'single-private':
2854+ if update.owner:
2855+ to_retrieve.append(update.owner.id)
2856
2857 puller_ids = [y.entity_id.id for y in update.puller_ids]
2858 not_pulled = []
2859
2860=== modified file 'bin/addons/sync_server/update.py'
2861--- bin/addons/sync_server/update.py 2021-02-01 16:59:12 +0000
2862+++ bin/addons/sync_server/update.py 2023-05-05 12:01:38 +0000
2863@@ -454,6 +454,8 @@
2864 else:
2865 privates = self.pool.get('sync.server.entity')._get_ancestor(cr, uid, update.owner.id, context=context) + \
2866 [update.owner.id]
2867+ elif update.rule_id.direction == 'single-private' and update.owner:
2868+ privates = [update.owner.id]
2869 else:
2870 privates = []
2871 if (update.rule_id.direction == 'up' and update.source.id in children) or \
2872@@ -530,6 +532,7 @@
2873 if recover:
2874 filters.append("source = %s" % (entity.id, ))
2875 filters.append("direction = 'bi-private' AND (is_deleted = 't' OR owner IN (" + (','.join(map(str, children + [entity.id]))) + "))")
2876+ filters.append("direction = 'single-private' AND owner = %d " % (entity.id,))
2877 base_query += ' AND ((' + ') OR ('.join(filters) + '))'
2878
2879 ## Recover add own client updates to the list
2880
2881=== modified file 'bin/addons/sync_so/purchase.py'
2882--- bin/addons/sync_so/purchase.py 2023-02-17 13:56:40 +0000
2883+++ bin/addons/sync_so/purchase.py 2023-05-05 12:01:38 +0000
2884@@ -144,6 +144,7 @@
2885 pol_values['modification_comment'] = sol_dict.get('modification_comment', False)
2886 pol_values['from_dpo_line_id'] = sol_dict.get('dpo_line_id') and sol_dict.get('dpo_line_id', {}).get('.id', False) or False
2887 pol_values['from_dpo_id'] = sol_dict.get('dpo_id') and sol_dict.get('dpo_id', {}).get('.id', False) or False
2888+ pol_values['from_dpo_esc'] = sol_dict.get('dpo_id') and sol_dict.get('dpo_id', {}).get('partner_type', False) == 'esc' or False
2889 pol_values['esti_dd'] = sol_dict.get('esti_dd', False)
2890 if 'line_number' in pol_values:
2891 del(pol_values['line_number'])
2892
2893=== modified file 'bin/addons/unifield_setup/setup_configuration.py'
2894--- bin/addons/unifield_setup/setup_configuration.py 2022-09-19 08:45:17 +0000
2895+++ bin/addons/unifield_setup/setup_configuration.py 2023-05-05 12:01:38 +0000
2896@@ -62,6 +62,7 @@
2897 'previous_fy_dates_allowed': fields.boolean(string='Does the system allow document dates on previous Fiscal Year?'),
2898 'customer_commitment': fields.boolean(string='Does the system allow Customer Commitment Vouchers ?'),
2899 'signature': fields.boolean(string='Activate Electronic Validation ?'),
2900+ 'esc_line': fields.boolean(string='Activate International Invoices Lines ?'),
2901 }
2902
2903 _defaults = {
2904@@ -79,6 +80,7 @@
2905 'previous_fy_dates_allowed': lambda *a: False,
2906 'customer_commitment': False,
2907 'signature': False,
2908+ 'esc_line': False,
2909 }
2910
2911 _constraints = [

Subscribers

People subscribed via source and target branches