Merge lp:~dorian-kemps/unifield-server/US-5357 into lp:~jfb-tempo-consulting/unifield-server/trunk

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~dorian-kemps/unifield-server/US-5357
Merge into: lp:~jfb-tempo-consulting/unifield-server/trunk
Diff against target: 159 lines (+26/-9)
6 files modified
bin/addons/msf_profile/i18n/fr_MF.po (+14/-4)
bin/addons/msf_profile/msf_profile.py (+1/-2)
bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv (+2/-2)
bin/addons/product_nomenclature/product_nomenclature.py (+6/-0)
bin/addons/product_nomenclature/product_nomenclature_view.xml (+2/-0)
bin/unifield-version.txt (+1/-1)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-5357
Reviewer Review Type Date Requested Status
jftempo Pending
Review via email: mp+362528@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
2--- bin/addons/msf_profile/i18n/fr_MF.po 2019-01-17 15:11:02 +0000
3+++ bin/addons/msf_profile/i18n/fr_MF.po 2019-02-04 14:49:54 +0000
4@@ -34818,7 +34818,7 @@
5 msgid "IR/FO Order"
6 msgstr "IR/FO Order"
7
8-#. modules: purchase, account, analytic_distribution_supply, msf_homere_interface, res_currency_tables, register_accounting, account_hq_entries, account_corrections, product_attributes, base, account_subscription, analytic_distribution, purchase_override
9+#. modules: purchase, account, analytic_distribution_supply, msf_homere_interface, res_currency_tables, register_accounting, account_hq_entries, account_corrections, product_attributes, base, account_subscription, analytic_distribution, purchase_override, product_nomenclature
10 #: selection:account.entries.report,move_line_state:0
11 #: selection:account.move.line,state:0
12 #: selection:wizard.journal.items.corrections.lines,analytic_distribution_state:0
13@@ -34841,6 +34841,7 @@
14 #: selection:wizard.advance.line,analytic_distribution_state:0
15 #: selection:res.currency.table,state:0
16 #: selection:purchase.order.merged.line,analytic_distribution_state:0
17+#: selection:product.nomenclature,status:0
18 msgid "Valid"
19 msgstr "Valide"
20
21@@ -36103,7 +36104,7 @@
22 msgid "cancel_voucher - (account.voucher)"
23 msgstr "cancel_voucher - (account.voucher)"
24
25-#. modules: sales_followup, msf_homere_interface, msf_field_access_rights, consumption_calculation, sale, update_client, product_attributes, purchase_followup, sf_doc_import, register_accounting, finance, msf_supply_doc_export
26+#. modules: sales_followup, msf_homere_interface, msf_field_access_rights, consumption_calculation, sale, update_client, product_attributes, purchase_followup, sf_doc_import, register_accounting, finance, msf_supply_doc_export, product_nomenclature
27 #: field:cash.request.liquidity,status:0
28 #: field:cash.request.liquidity.bank,status:0
29 #: field:cash.request.liquidity.cash,status:0
30@@ -36134,6 +36135,7 @@
31 #: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:224
32 #: report:addons/register_accounting/report/fully_report_xls.mako:590
33 #: report:addons/msf_supply_doc_export/report/report_internal_request_xls.mako:65
34+#: field:product.nomenclature,status:0
35 #, python-format
36 msgid "Status"
37 msgstr "Statut"
38@@ -99555,10 +99557,12 @@
39 msgid "Available Shipped"
40 msgstr "Disponible expédié"
41
42-#. module: product_attributes
43+#. modules: product_attributes, product_nomenclature
44 #: selection:product.product,state_ud:0
45+#: view:product.nomenclature:0
46+#: selection:product.nomenclature,status:0
47 msgid "Archived"
48-msgstr "Archived"
49+msgstr "Archivé"
50
51 #. module: base
52 #: selection:res.config.users,context_tz:0
53@@ -103843,3 +103847,9 @@
54 #, python-format
55 msgid "Partner %s (%s): you can not use %s currency"
56 msgstr "Partenaire %s (%s): vous ne pouvez pas utiliser la devise %s"
57+
58+#. module: product_nomenclature
59+#: code:addons/product_nomenclature/product_nomenclature.py:857
60+#, python-format
61+msgid "You can not create a product with an archived Root Nomenclature."
62+msgstr "Vous ne pouvez pas créer un produit avec une Nomenclature Origine archivée."
63
64=== modified file 'bin/addons/msf_profile/msf_profile.py'
65--- bin/addons/msf_profile/msf_profile.py 2019-01-17 11:32:56 +0000
66+++ bin/addons/msf_profile/msf_profile.py 2019-02-04 14:49:54 +0000
67@@ -63,8 +63,7 @@
68 so_id = data_obj.get_object_reference(cr, uid, 'product', 'list0')[1]
69
70 c = self.pool.get('res.users').browse(cr, uid, uid).company_id
71- instance_name = c and c.instance_id and c.instance_id.name or ''
72- if instance_name.startswith('OCG'):
73+ if c.currency_id and c.currency_id.name =='CHF':
74 ch_po_id = data_obj.get_object_reference(cr, uid, 'sd', 'CHF_purchase')[1]
75 ch_so_id = data_obj.get_object_reference(cr, uid, 'sd', 'CHF_sale')[1]
76 to_fix = [(po_id, so_id, ['section']), (ch_po_id, ch_so_id, ['intermission'])]
77
78=== modified file 'bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv'
79--- bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2018-12-18 14:28:37 +0000
80+++ bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2019-02-04 14:49:54 +0000
81@@ -109,7 +109,7 @@
82 msf_sync_data_server.state,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],"['code', 'country_id/id', 'name']",OC,res.country.state,,State,Valid,,501
83 msf_sync_data_server.uom_categories,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],['name'],OC,product.uom.categ,,UoM Categories,Valid,,510
84 msf_sync_data_server.uom,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],"['category_id/id', 'factor', 'factor_inv', 'name', 'rounding', 'uom_type']",OC,product.uom,,UoM,Valid,,511
85-msf_sync_data_server.nomenclature,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],"['level', 'name', 'type', 'msfid', 'sequence']",OC,product.nomenclature,,Nomenclature,Valid,,520
86+msf_sync_data_server.nomenclature,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],"['level', 'name', 'type', 'msfid', 'sequence', 'status']",OC,product.nomenclature,,Nomenclature,Valid,,520
87 msf_sync_data_server.nomenclature_tree,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"[('parent_id', '!=', '')]",['parent_id/id'],OC,product.nomenclature,,Nomenclature Tree,Valid,,521
88 msf_sync_data_server.product_category,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,[],"['active', 'donation_expense_account/id', 'family_id/id', 'name', 'property_account_expense_categ/id', 'property_account_income_categ/id', 'property_stock_account_input_categ/id', 'property_stock_account_output_categ/id', 'property_stock_journal/id', 'property_stock_variation/id', 'type', 'msfid']",OC,product.category,,Product Category,Valid,,530
89 msf_sync_data_server.product_category_tree,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"[('parent_id', '!=', '')]",['parent_id/id'],OC,product.category,,Product Category Tree,Valid,,531
90@@ -214,7 +214,7 @@
91 msf_usb_sync_data_server.cp_state,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['code', 'country_id/id', 'name']",USB,res.country.state,,[MASTER] State,Valid,,1601
92 msf_usb_sync_data_server.cp_uom_categories,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],['name'],USB,product.uom.categ,,[MASTER] UoM Categories,Valid,,1610
93 msf_usb_sync_data_server.cp_uom,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['category_id/id', 'factor', 'factor_inv', 'name', 'rounding', 'uom_type']",USB,product.uom,,[MASTER] UoM,Valid,,1611
94-msf_usb_sync_data_server.cp_nomenclature,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['level', 'name', 'type', 'msfid']",USB,product.nomenclature,,[MASTER] Nomenclature,Valid,,1620
95+msf_usb_sync_data_server.cp_nomenclature,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['level', 'name', 'type', 'msfid', 'status']",USB,product.nomenclature,,[MASTER] Nomenclature,Valid,,1620
96 msf_usb_sync_data_server.cp_nomenclature_tree,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"[('parent_id', '!=', '')]",['parent_id/id'],USB,product.nomenclature,,[MASTER] Nomenclature Tree,Valid,,1621
97 msf_usb_sync_data_server.cp_product_category,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['active', 'donation_expense_account/id', 'family_id/id', 'name', 'property_account_expense_categ/id', 'property_account_income_categ/id', 'property_stock_account_input_categ/id', 'property_stock_account_output_categ/id', 'property_stock_journal/id', 'property_stock_variation/id', 'type', 'msfid']",USB,product.category,,[MASTER] Product Category,Valid,,1630
98 msf_usb_sync_data_server.cp_product_category_tree,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"[('parent_id', '!=', '')]",['parent_id/id'],USB,product.category,,[MASTER] Product Category Tree,Valid,,1631
99
100=== modified file 'bin/addons/product_nomenclature/product_nomenclature.py'
101--- bin/addons/product_nomenclature/product_nomenclature.py 2018-04-16 15:03:05 +0000
102+++ bin/addons/product_nomenclature/product_nomenclature.py 2019-02-04 14:49:54 +0000
103@@ -481,6 +481,7 @@
104
105 'nomen_type_s': fields.function(_get_fake, method=True, type='selection', selection=[('mandatory', 'Mandatory'), ('optional', 'Optional')], string='Nomenclature type', fnct_search=_search_nomen_type_s),
106 'msfid': fields.char('MSFID', size=128, select=True),
107+ 'status': fields.selection([('valid', 'Valid'), ('archived', 'Archived')], 'Status', readonly=True),
108 }
109
110 _defaults = {
111@@ -489,6 +490,7 @@
112 'sub_level': lambda *a: '0',
113 'sequence': _getDefaultSequence,
114 'active': True,
115+ 'status': 'valid',
116 }
117
118 _order = "sequence, level, msfid, id"
119@@ -850,6 +852,10 @@
120
121 sale._setNomenclatureInfo(cr, uid, vals, context)
122
123+ if self.pool.get('product.nomenclature').browse(cr, uid, vals['nomen_manda_3']).status != 'valid' and\
124+ not (context.get('sync_update_creation') or context.get('sync_update_execution')):
125+ raise osv.except_osv(_('Error'), _('You can not create a product with an archived Root Nomenclature.'))
126+
127 res = super(product_product, self).create(cr, uid, vals, context=context)
128
129 prod_default_code = default_code or self.read(cr, uid, res, ['default_code'], context=context)['default_code']
130
131=== modified file 'bin/addons/product_nomenclature/product_nomenclature_view.xml'
132--- bin/addons/product_nomenclature/product_nomenclature_view.xml 2017-02-24 11:04:21 +0000
133+++ bin/addons/product_nomenclature/product_nomenclature_view.xml 2019-02-04 14:49:54 +0000
134@@ -158,6 +158,7 @@
135 <field name="level" invisible="1" />
136 <field name="category_id"
137 attrs="{'invisible': ['|', ('level', '!=', '2'), ('type', '!=', 'mandatory')]}"/>
138+ <field name="status" attrs="{'invisible': [('level', '!=', '3')]}"/>
139 <field name="sequence" invisible="1" />
140 <newline />
141 </form>
142@@ -251,6 +252,7 @@
143 <field name="priority" eval="99" />
144 <field name="arch" type="xml">
145 <search string="Link nomenclature/category">
146+ <filter string="Archived" icon="terp-accessories-archiver" domain="[('status','=','archived')]"/>
147 <field name="msfid" string="Nomenclature MSFID" />
148 <field name="custom_name" />
149 <field name="category_id" />
150
151=== modified file 'bin/unifield-version.txt'
152--- bin/unifield-version.txt 2019-01-14 09:55:12 +0000
153+++ bin/unifield-version.txt 2019-02-04 14:49:54 +0000
154@@ -64,4 +64,4 @@
155 29e4964f3a8687b7885ea6a152c4a9b2 2018-07-30 09:00:00 UF9.1
156 e3ac670362f91ef56cdf96baed4685d6 2018-09-14 10:30:00 UF10.0
157 9db21738f7a95facfad6df88242c357c 2018-12-10 18:00:00 UF11.0
158-98d36ef554795747b35ab9b4bc7feced 2019-01-14 11:00:00 UF11.1rc2
159+97c38a1125125c6b69d0c4b1f7950bfa 2019-01-18 11:00:00 UF11.1

Subscribers

People subscribed via source and target branches

to all changes: