Merge lp:~dorian-kemps/unifield-server/US-7530 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5863
Proposed branch: lp:~dorian-kemps/unifield-server/US-7530
Merge into: lp:unifield-server
Diff against target: 178 lines (+46/-24) (has conflicts)
4 files modified
bin/addons/base/rng/view.rng (+1/-0)
bin/addons/msf_profile/i18n/fr_MF.po (+15/-6)
bin/addons/product/wizard/product_mass_update.py (+17/-10)
bin/addons/product/wizard/product_mass_update_view.xml (+13/-8)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-7530
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+393176@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/base/rng/view.rng'
2--- bin/addons/base/rng/view.rng 2020-06-15 15:01:06 +0000
3+++ bin/addons/base/rng/view.rng 2020-11-02 12:52:59 +0000
4@@ -495,6 +495,7 @@
5 <rng:optional><rng:attribute name="filter_selector"/></rng:optional>
6 <rng:optional><rng:attribute name="default_selector"/></rng:optional>
7 <rng:optional><rng:attribute name="o2m_selectable"/></rng:optional>
8+ <rng:optional><rng:attribute name="m2m_selectable"/></rng:optional>
9 <rng:optional><rng:attribute name="required_error_msg"/></rng:optional>
10 <rng:optional><rng:attribute name="truncate"/></rng:optional>
11 <rng:optional><rng:attribute name="tooltip"/></rng:optional>
12
13=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
14--- bin/addons/msf_profile/i18n/fr_MF.po 2020-10-28 17:16:11 +0000
15+++ bin/addons/msf_profile/i18n/fr_MF.po 2020-11-02 12:52:59 +0000
16@@ -76468,7 +76468,7 @@
17 msgid "Indicative Total Value"
18 msgstr "Valeur totale"
19
20-#. modules: tender_flow, account_override, purchase_allocation_report, register_accounting, msf_accrual, stock_forecast, analytic, msf_supply_doc_export, stock, msf_order_date, sales_followup, consumption_calculation, purchase_override, specific_rules, kit, out_step, base, purchase, account, msf_outgoing, sale, procurement, sourcing, stock_override, procurement_cycle
21+#. modules: tender_flow, account_override, purchase_allocation_report, register_accounting, msf_accrual, stock_forecast, analytic, msf_supply_doc_export, stock, msf_order_date, sales_followup, consumption_calculation, purchase_override, specific_rules, kit, out_step, base, purchase, account, msf_outgoing, sale, procurement, sourcing, stock_override, procurement_cycle, product
22 #: selection:account.invoice,state:0
23 #: selection:account.invoice.report,state:0
24 #: selection:report.invoice.created,state:0
25@@ -76545,6 +76545,7 @@
26 #: selection:replenishment.segment,state:0
27 #: view:product.stock_out:0
28 #: selection:product.stock_out,state:0
29+#: selection:product.mass.update,state:0
30 #, python-format
31 msgid "Cancelled"
32 msgstr "Annulé"
33@@ -101973,11 +101974,6 @@
34
35 #. module: product
36 #: view:product.mass.update:0
37-msgid "Delete Update"
38-msgstr "Supprimer la Mise à Jour"
39-
40-#. module: product
41-#: view:product.mass.update:0
42 msgid "Apply Update"
43 msgstr "Appliquer la Mise à Jour"
44
45@@ -110285,6 +110281,7 @@
46 #, python-format
47 msgid "Writing file report at %s"
48 msgstr "Écriture du fichier rapport sur %s"
49+<<<<<<< TREE
50
51 #. module: msf_tools
52 #: view:automated.import:0
53@@ -110306,3 +110303,15 @@
54 #: view:stock.move:0
55 msgid "Ship Closed Date"
56 msgstr "Date de Clôture de l'Expédition"
57+=======
58+
59+#. module: product
60+#: view:product.mass.update:0
61+msgid "Cancel Update"
62+msgstr "Annuler la Mise à Jour"
63+
64+#. module: product
65+#: view:product.mass.update:0
66+msgid "Delete Selected Products"
67+msgstr "Supprimer les Produits Sélectionnés"
68+>>>>>>> MERGE-SOURCE
69
70=== modified file 'bin/addons/product/wizard/product_mass_update.py'
71--- bin/addons/product/wizard/product_mass_update.py 2020-08-13 15:49:56 +0000
72+++ bin/addons/product/wizard/product_mass_update.py 2020-11-02 12:52:59 +0000
73@@ -38,7 +38,7 @@
74
75 _columns = {
76 'name': fields.char(size=64, string='Update Reference'),
77- 'state': fields.selection(selection=[('draft', 'Draft'), ('in_progress', 'In Progress'), ('error', 'Error'), ('done', 'Done')], string='Status', readonly=True),
78+ 'state': fields.selection(selection=[('draft', 'Draft'), ('in_progress', 'In Progress'), ('error', 'Error'), ('done', 'Done'), ('cancel', 'Cancelled')], string='Status', readonly=True),
79 'date_done': fields.datetime(string='Date of the update', readonly=True),
80 'user_id': fields.many2one('res.users', string='User who Updated', readonly=True),
81 'import_in_progress': fields.boolean(string='Import in progress'),
82@@ -164,22 +164,29 @@
83 return {'value': {'property_account_expense': False}}
84 return {'value': {}}
85
86+ def delete_products(self, cr, uid, ids, context=None):
87+ '''
88+ Delete the selected products
89+ '''
90+ if context is None:
91+ context = {}
92+ if not context.get('button_selected_ids'):
93+ raise osv.except_osv(_('Warning'), _('Please select at least one line'))
94+
95+ self.write(cr, uid, ids, {'product_ids': [(3, x) for x in context['button_selected_ids']]}, context=context)
96+
97+ return True
98+
99 def cancel_update(self, cr, uid, ids, context=None):
100 '''
101- Delete the current Product Mass Update
102+ Cancel the current Product Mass Update
103 '''
104 if context is None:
105 context = {}
106
107- self.unlink(cr, uid, ids, context=context)
108+ self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
109
110- return {
111- 'type': 'ir.actions.act_window',
112- 'res_model': 'product.mass.update',
113- 'view_type': 'form',
114- 'view_mode': 'tree,form',
115- 'target': 'crush',
116- }
117+ return True
118
119 def dummy(self, cr, uid, ids, context=None):
120 """
121
122=== modified file 'bin/addons/product/wizard/product_mass_update_view.xml'
123--- bin/addons/product/wizard/product_mass_update_view.xml 2020-08-13 15:49:56 +0000
124+++ bin/addons/product/wizard/product_mass_update_view.xml 2020-11-02 12:52:59 +0000
125@@ -71,7 +71,7 @@
126 <group name="import" string=" Import Lines " colspan="4" attrs="{'invisible':[('state', '!=', 'draft')]}">
127 <button name="wizard_import_products" string="Import products" icon="gtk-dnd" colspan="2" type="object"/>
128 </group>
129- <field name="product_ids" colspan="4" nolabel="1" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('active', 'in', ['t', 'f']), ('expected_prod_creator', '=', True)]">
130+ <field name="product_ids" colspan="4" nolabel="1" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('active', 'in', ['t', 'f']), ('expected_prod_creator', '=', True)]" m2m_selectable="2">
131 <tree string="Products" hide_edit_button="1" colors="grey:active == False">
132 <field name="default_code" />
133 <field name="name" />
134@@ -97,10 +97,11 @@
135 </field>
136 </page>
137 </notebook>
138- <group colspan="4">
139- <field name="state" colspan="2" />
140- <button name="cancel_update" string="Delete Update" icon="gtk-cancel" colspan="1" type="object" attrs="{'invisible':[('state', '!=', 'draft')]}"/>
141- <button name="launch_update" string="Apply Update" icon="gtk-go-forward" colspan="1" type="object" attrs="{'invisible': [('state', '!=', 'draft')]}"/>
142+ <field name="state" />
143+ <group col="3" colspan="6">
144+ <button name="cancel_update" string="Cancel Update" icon="gtk-cancel" type="object" attrs="{'invisible':[('state', '!=', 'draft')]}"/>
145+ <button name="delete_products" string="Delete Selected Products" icon="gtk-del" type="object" attrs="{'invisible':[('state', '!=', 'draft')]}" set_ids="product_ids"/>
146+ <button name="launch_update" string="Apply Update" icon="gtk-go-forward" type="object" attrs="{'invisible': [('state', '!=', 'draft')]}"/>
147 </group>
148 </form>
149 </field>
150@@ -111,7 +112,7 @@
151 <field name="model">product.mass.update</field>
152 <field name="type">tree</field>
153 <field name="arch" type="xml">
154- <tree string="Product Mass Update" noteditable="state!='draft'" hide_delete_button="1" colors="blue:state in ('draft');red:state in ('error')">
155+ <tree string="Product Mass Update" noteditable="state!='draft'" hide_delete_button="1" colors="blue:state in ('draft');red:state in ('error');grey:state in ('cancel')">
156 <field name="name"/>
157 <field name="product_ids"/>
158 <field name="date_done"/>
159@@ -184,13 +185,17 @@
160 <field name="date_done" attrs="{'invisible': [('state', '!=', 'done')]}" />
161 <field name="user_id" attrs="{'invisible': [('state', '!=', 'done')]}" />
162 </group>
163- <button name="change_bn_ed" string="Apply Update" icon="gtk-go-forward" colspan="4" type="object" attrs="{'invisible': [('state', '!=', 'draft')]}"/>
164+ <group colspan="4" col="6">
165+ <button name="cancel_update" string="Cancel Update" icon="gtk-cancel" type="object" attrs="{'invisible':[('state', '!=', 'draft')]}"/>
166+ <button name="delete_products" string="Delete Selected Products" icon="gtk-del" type="object" attrs="{'invisible':[('state', '!=', 'draft')]}" set_ids="product_ids"/>
167+ <button name="change_bn_ed" string="Apply Update" icon="gtk-go-forward" type="object" attrs="{'invisible': [('state', '!=', 'draft')]}"/>
168+ </group>
169 <notebook colspan="4">
170 <page string="Products" attrs="{'invisible': [('state', '=', 'done')]}">
171 <group name="import" string=" Import Lines " colspan="4" attrs="{'invisible':[('state', '!=', 'draft')]}">
172 <button name="wizard_import_products" string="Import products" icon="gtk-dnd" colspan="2" type="object"/>
173 </group>
174- <field name="product_ids" colspan="4" nolabel="1" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('expected_prod_creator', '=', 'bned')]" context="{'display_batch_attr': 1}">
175+ <field name="product_ids" colspan="4" nolabel="1" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('expected_prod_creator', '=', 'bned')]" context="{'display_batch_attr': 1}" m2m_selectable="2">
176 <tree string="Products" hide_edit_button="1" colors="grey:active == False">
177 <field name="default_code" />
178 <field name="name" />

Subscribers

People subscribed via source and target branches