Merge lp:~dorian-kemps/unifield-server/US-8428 into lp:unifield-server
- US-8428
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 6280 |
Proposed branch: | lp:~dorian-kemps/unifield-server/US-8428 |
Merge into: | lp:unifield-server |
Diff against target: |
308 lines (+94/-44) (has conflicts) 6 files modified
bin/addons/msf_profile/data/patches.xml (+8/-0) bin/addons/msf_profile/i18n/fr_MF.po (+28/-15) bin/addons/msf_profile/msf_profile.py (+12/-0) bin/addons/stock/physical_inventory.py (+38/-20) bin/addons/stock/physical_inventory_view.xml (+7/-8) bin/addons/stock/wizard/physical_inventory_select_products.py (+1/-1) 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:~dorian-kemps/unifield-server/US-8428 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+425392@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bin/addons/msf_profile/data/patches.xml' | |||
2 | --- bin/addons/msf_profile/data/patches.xml 2022-05-30 15:32:49 +0000 | |||
3 | +++ bin/addons/msf_profile/data/patches.xml 2022-06-27 14:49:29 +0000 | |||
4 | @@ -787,9 +787,17 @@ | |||
5 | 787 | <field name="method">us_5722_update_accruals</field> | 787 | <field name="method">us_5722_update_accruals</field> |
6 | 788 | </record> | 788 | </record> |
7 | 789 | 789 | ||
8 | 790 | <<<<<<< TREE | ||
9 | 790 | <record id="us_8259_remove_currency_table_wkf" model="patch.scripts"> | 791 | <record id="us_8259_remove_currency_table_wkf" model="patch.scripts"> |
10 | 791 | <field name="method">us_8259_remove_currency_table_wkf</field> | 792 | <field name="method">us_8259_remove_currency_table_wkf</field> |
11 | 792 | </record> | 793 | </record> |
12 | 793 | 794 | ||
13 | 795 | ======= | ||
14 | 796 | <!-- UF26.0 --> | ||
15 | 797 | <record id="us_8428_pi_type_migration" model="patch.scripts"> | ||
16 | 798 | <field name="method">us_8428_pi_type_migration</field> | ||
17 | 799 | </record> | ||
18 | 800 | |||
19 | 801 | >>>>>>> MERGE-SOURCE | ||
20 | 794 | </data> | 802 | </data> |
21 | 795 | </openerp> | 803 | </openerp> |
22 | 796 | 804 | ||
23 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' | |||
24 | --- bin/addons/msf_profile/i18n/fr_MF.po 2022-06-20 12:58:24 +0000 | |||
25 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2022-06-27 14:49:29 +0000 | |||
26 | @@ -10132,11 +10132,6 @@ | |||
27 | 10132 | msgid "Nauru" | 10132 | msgid "Nauru" |
28 | 10133 | msgstr "Nauru" | 10133 | msgstr "Nauru" |
29 | 10134 | 10134 | ||
30 | 10135 | #. module: stock | ||
31 | 10136 | #: field:physical.inventory.select.products,full_inventory:0 | ||
32 | 10137 | msgid "Full Inventory" | ||
33 | 10138 | msgstr "Inventaire Complet" | ||
34 | 10139 | |||
35 | 10140 | #. module: purchase | 10135 | #. module: purchase |
36 | 10141 | #: model:ir.actions.act_window,name:purchase.action_purchase_order_report_all | 10136 | #: model:ir.actions.act_window,name:purchase.action_purchase_order_report_all |
37 | 10142 | #: model:ir.ui.menu,name:purchase.menu_action_purchase_order_report_all | 10137 | #: model:ir.ui.menu,name:purchase.menu_action_purchase_order_report_all |
38 | @@ -45790,11 +45785,6 @@ | |||
39 | 45790 | msgid "Anguilla" | 45785 | msgid "Anguilla" |
40 | 45791 | msgstr "Anguille" | 45786 | msgstr "Anguille" |
41 | 45792 | 45787 | ||
42 | 45793 | #. module: stock | ||
43 | 45794 | #: view:physical.inventory:0 | ||
44 | 45795 | msgid "Set as full inventory" | ||
45 | 45796 | msgstr "Marquer comme inventaire complet" | ||
46 | 45797 | |||
47 | 45798 | #. module: msf_doc_import | 45788 | #. module: msf_doc_import |
48 | 45799 | #: code:addons/msf_doc_import/wizard/wizard_import_fo_line.py:134 | 45789 | #: code:addons/msf_doc_import/wizard/wizard_import_fo_line.py:134 |
49 | 45800 | #: code:addons/msf_doc_import/wizard/wizard_import_product_line.py:124 | 45790 | #: code:addons/msf_doc_import/wizard/wizard_import_product_line.py:124 |
50 | @@ -79033,11 +79023,6 @@ | |||
51 | 79033 | msgid "Sourced" | 79023 | msgid "Sourced" |
52 | 79034 | msgstr "Sourcé" | 79024 | msgstr "Sourcé" |
53 | 79035 | 79025 | ||
54 | 79036 | #. module: stock | ||
55 | 79037 | #: view:physical.inventory:0 | ||
56 | 79038 | msgid "Setting as 'full inventory' is irreversible. Do you confirm ?" | ||
57 | 79039 | msgstr "Marquer comme étant 'inventaire complet' est irréversible. Voulez-vous continuer ?" | ||
58 | 79040 | |||
59 | 79041 | #. module: consumption_calculation | 79026 | #. module: consumption_calculation |
60 | 79042 | #: model:ir.actions.report.xml,name:consumption_calculation.report_incoming_consumption_xls | 79027 | #: model:ir.actions.report.xml,name:consumption_calculation.report_incoming_consumption_xls |
61 | 79043 | #: model:ir.actions.server,name:consumption_calculation.action_incoming_print_xml_export | 79028 | #: model:ir.actions.server,name:consumption_calculation.action_incoming_print_xml_export |
62 | @@ -115057,6 +115042,7 @@ | |||
63 | 115057 | #, python-format | 115042 | #, python-format |
64 | 115058 | msgid "Cannot update these products, ED/BN attributes have not changed since the KCL creation" | 115043 | msgid "Cannot update these products, ED/BN attributes have not changed since the KCL creation" |
65 | 115059 | msgstr "Impossible de mettre à jour ces produits. Les attributs NL/DE n'ont pas changé depuis la création du Kit" | 115044 | msgstr "Impossible de mettre à jour ces produits. Les attributs NL/DE n'ont pas changé depuis la création du Kit" |
66 | 115045 | <<<<<<< TREE | ||
67 | 115060 | 115046 | ||
68 | 115061 | #. module: board | 115047 | #. module: board |
69 | 115062 | #: report:addons/board/report/integrity.mako:83 | 115048 | #: report:addons/board/report/integrity.mako:83 |
70 | @@ -115185,3 +115171,30 @@ | |||
71 | 115185 | #, python-format | 115171 | #, python-format |
72 | 115186 | msgid "Import error for account \"%s\" : Listing both Accounts/Destinations and G/L Accounts is not allowed" | 115172 | msgid "Import error for account \"%s\" : Listing both Accounts/Destinations and G/L Accounts is not allowed" |
73 | 115187 | msgstr "Erreur lors de l'import du compte \"%s\" : Lister à la fois les Comptes/Destinations et les Comptes Grand Livre n'est pas permis" | 115173 | msgstr "Erreur lors de l'import du compte \"%s\" : Lister à la fois les Comptes/Destinations et les Comptes Grand Livre n'est pas permis" |
74 | 115174 | ======= | ||
75 | 115175 | |||
76 | 115176 | #. module: stock | ||
77 | 115177 | #: selection:physical.inventory,type:0 | ||
78 | 115178 | msgid "Full Inventory count (planned)" | ||
79 | 115179 | msgstr "Comptage complet de l'Inventaire (planifié)" | ||
80 | 115180 | |||
81 | 115181 | #. module: stock | ||
82 | 115182 | #: selection:physical.inventory,type:0 | ||
83 | 115183 | msgid "Partial Inventory count (planned)" | ||
84 | 115184 | msgstr "Comptage partiel de l'Inventaire (planifié)" | ||
85 | 115185 | |||
86 | 115186 | #. module: stock | ||
87 | 115187 | #: selection:physical.inventory,type:0 | ||
88 | 115188 | msgid "Stock correction (unplanned)" | ||
89 | 115189 | msgstr "Correction du Stock (non planifiée)" | ||
90 | 115190 | |||
91 | 115191 | #. module: stock | ||
92 | 115192 | #: field:physical.inventory,products_added:0 | ||
93 | 115193 | msgid "Has products" | ||
94 | 115194 | msgstr "A des produits" | ||
95 | 115195 | |||
96 | 115196 | #. module: stock | ||
97 | 115197 | #: field:physical.inventory,type:0 | ||
98 | 115198 | msgid "Inventory Type" | ||
99 | 115199 | msgstr "Type d'Inventaire" | ||
100 | 115200 | >>>>>>> MERGE-SOURCE | ||
101 | 115188 | 115201 | ||
102 | === modified file 'bin/addons/msf_profile/msf_profile.py' | |||
103 | --- bin/addons/msf_profile/msf_profile.py 2022-05-30 15:32:49 +0000 | |||
104 | +++ bin/addons/msf_profile/msf_profile.py 2022-06-27 14:49:29 +0000 | |||
105 | @@ -56,12 +56,24 @@ | |||
106 | 56 | 'model': lambda *a: 'patch.scripts', | 56 | 'model': lambda *a: 'patch.scripts', |
107 | 57 | } | 57 | } |
108 | 58 | 58 | ||
109 | 59 | <<<<<<< TREE | ||
110 | 59 | def us_8259_remove_currency_table_wkf(self, cr, uid, *a, **b): | 60 | def us_8259_remove_currency_table_wkf(self, cr, uid, *a, **b): |
111 | 60 | cr.execute("delete from wkf_workitem where act_id in (select id from wkf_activity where wkf_id = (select id from wkf where name='wkf.res.currency.table' and osv='res.currency.table'))") | 61 | cr.execute("delete from wkf_workitem where act_id in (select id from wkf_activity where wkf_id = (select id from wkf where name='wkf.res.currency.table' and osv='res.currency.table'))") |
112 | 61 | cr.execute("delete from wkf_activity where wkf_id = (select id from wkf where name='wkf.res.currency.table' and osv='res.currency.table')") | 62 | cr.execute("delete from wkf_activity where wkf_id = (select id from wkf where name='wkf.res.currency.table' and osv='res.currency.table')") |
113 | 62 | cr.execute("delete from wkf where name='wkf.res.currency.table' and osv='res.currency.table'") | 63 | cr.execute("delete from wkf where name='wkf.res.currency.table' and osv='res.currency.table'") |
114 | 63 | return True | 64 | return True |
115 | 64 | 65 | ||
116 | 66 | ======= | ||
117 | 67 | # UF26.0 | ||
118 | 68 | def us_8428_pi_type_migration(self, cr, uid, *a, **b): | ||
119 | 69 | ''' | ||
120 | 70 | In PIs, if full_inventory == True, set the type to 'full' | ||
121 | 71 | ''' | ||
122 | 72 | cr.execute("""UPDATE physical_inventory SET type = 'full' WHERE full_inventory = 't'""") | ||
123 | 73 | |||
124 | 74 | return True | ||
125 | 75 | |||
126 | 76 | >>>>>>> MERGE-SOURCE | ||
127 | 65 | # UF25.0 | 77 | # UF25.0 |
128 | 66 | def us_8451_split_rr(self, cr, uid, *a, **b): | 78 | def us_8451_split_rr(self, cr, uid, *a, **b): |
129 | 67 | if not cr.column_exists('replenishment_segment_line', 'rr_fmc_1') or not cr.column_exists('replenishment_segment_line', 'rr_max_1'): | 79 | if not cr.column_exists('replenishment_segment_line', 'rr_fmc_1') or not cr.column_exists('replenishment_segment_line', 'rr_max_1'): |
130 | 68 | 80 | ||
131 | === modified file 'bin/addons/stock/physical_inventory.py' | |||
132 | --- bin/addons/stock/physical_inventory.py 2022-05-19 09:23:30 +0000 | |||
133 | +++ bin/addons/stock/physical_inventory.py 2022-06-27 14:49:29 +0000 | |||
134 | @@ -105,6 +105,25 @@ | |||
135 | 105 | 105 | ||
136 | 106 | return totals | 106 | return totals |
137 | 107 | 107 | ||
138 | 108 | def _get_products_added(self, cr, uid, ids, field_name, arg, context=None): | ||
139 | 109 | if not ids: | ||
140 | 110 | return False | ||
141 | 111 | |||
142 | 112 | cr.execute(""" | ||
143 | 113 | SELECT pi.id, count(rel.product_id) | ||
144 | 114 | FROM | ||
145 | 115 | physical_inventory pi | ||
146 | 116 | LEFT JOIN | ||
147 | 117 | physical_inventory_product_rel rel ON rel.product_id = pi.id | ||
148 | 118 | WHERE | ||
149 | 119 | pi.id in %s | ||
150 | 120 | GROUP BY pi.id | ||
151 | 121 | """, (tuple(ids), )) | ||
152 | 122 | ret = {} | ||
153 | 123 | for x in cr.fetchall(): | ||
154 | 124 | ret[x[0]] = x[1] > 0 | ||
155 | 125 | |||
156 | 126 | return ret | ||
157 | 108 | 127 | ||
158 | 109 | _columns = { | 128 | _columns = { |
159 | 110 | 'ref': fields.char('Reference', size=64, readonly=True, sort_column='id'), | 129 | 'ref': fields.char('Reference', size=64, readonly=True, sort_column='id'), |
160 | @@ -113,6 +132,7 @@ | |||
161 | 113 | 'responsible': fields.char('Responsible', size=128, required=False, states={'closed': [('readonly',True)], 'cancel': [('readonly',True)]}), | 132 | 'responsible': fields.char('Responsible', size=128, required=False, states={'closed': [('readonly',True)], 'cancel': [('readonly',True)]}), |
162 | 114 | 'date_done': fields.datetime('Date done', readonly=True), | 133 | 'date_done': fields.datetime('Date done', readonly=True), |
163 | 115 | 'date_confirmed': fields.datetime('Date confirmed', readonly=True), | 134 | 'date_confirmed': fields.datetime('Date confirmed', readonly=True), |
164 | 135 | # 'inventory_id' and 'product_id' seem to be inverted in product_ids | ||
165 | 116 | 'product_ids': fields.many2many('product.product', 'physical_inventory_product_rel', | 136 | 'product_ids': fields.many2many('product.product', 'physical_inventory_product_rel', |
166 | 117 | 'product_id', 'inventory_id', string="Product selection", domain=[('type', 'not in', ['service_recep', 'consu'])], order_by="default_code"), | 137 | 'product_id', 'inventory_id', string="Product selection", domain=[('type', 'not in', ['service_recep', 'consu'])], order_by="default_code"), |
167 | 118 | 'discrepancy_line_ids': fields.one2many('physical.inventory.discrepancy', 'inventory_id', 'Discrepancy lines', | 138 | 'discrepancy_line_ids': fields.one2many('physical.inventory.discrepancy', 'inventory_id', 'Discrepancy lines', |
168 | @@ -127,6 +147,8 @@ | |||
169 | 127 | 'company_id': fields.many2one('res.company', 'Company', readonly=True, select=True, required=True, | 147 | 'company_id': fields.many2one('res.company', 'Company', readonly=True, select=True, required=True, |
170 | 128 | states={'draft': [('readonly', False)]}), | 148 | states={'draft': [('readonly', False)]}), |
171 | 129 | 'full_inventory': fields.boolean('Full inventory', readonly=True), | 149 | 'full_inventory': fields.boolean('Full inventory', readonly=True), |
172 | 150 | 'type': fields.selection([('full', 'Full Inventory count (planned)'), ('partial', 'Partial Inventory count (planned)'), | ||
173 | 151 | ('correction', 'Stock correction (unplanned)')], 'Inventory Type', required=True, select=True), | ||
174 | 130 | 'discrepancies_generated': fields.boolean('Discrepancies Generated', readonly=True), | 152 | 'discrepancies_generated': fields.boolean('Discrepancies Generated', readonly=True), |
175 | 131 | 'file_to_import': fields.binary(string='File to import', filters='*.xml'), | 153 | 'file_to_import': fields.binary(string='File to import', filters='*.xml'), |
176 | 132 | 'file_to_import2': fields.binary(string='File to import', filters='*.xml'), | 154 | 'file_to_import2': fields.binary(string='File to import', filters='*.xml'), |
177 | @@ -143,8 +165,9 @@ | |||
178 | 143 | 'discrepancy_lines_percent_absvalue': fields.function(_inventory_totals, multi="inventory_total", method=True, type='float', string=_("Percent of absolute value of discrepancies")), | 165 | 'discrepancy_lines_percent_absvalue': fields.function(_inventory_totals, multi="inventory_total", method=True, type='float', string=_("Percent of absolute value of discrepancies")), |
179 | 144 | 'bad_stock_msg': fields.text('Bad Stock', readonly=1), | 166 | 'bad_stock_msg': fields.text('Bad Stock', readonly=1), |
180 | 145 | 'has_bad_stock': fields.boolean('Has bad Stock', readonly=1), | 167 | 'has_bad_stock': fields.boolean('Has bad Stock', readonly=1), |
183 | 146 | 'max_filter_months': fields.integer('Months selected in "Products with recent movement at location" during Product Selection', readonly=1), | 168 | 'max_filter_months': fields.integer('Months selected in "Products with recent movement at location" during Product Selection'), |
184 | 147 | 'multiple_filter_months': fields.boolean('Multiple Selection', readonly=1), | 169 | 'multiple_filter_months': fields.boolean('Multiple Selection'), |
185 | 170 | 'products_added': fields.function(_get_products_added, method=True, type='boolean', string='Has products'), | ||
186 | 148 | } | 171 | } |
187 | 149 | 172 | ||
188 | 150 | _defaults = { | 173 | _defaults = { |
189 | @@ -152,14 +175,15 @@ | |||
190 | 152 | 'date': lambda *a: time.strftime(DEFAULT_SERVER_DATETIME_FORMAT), | 175 | 'date': lambda *a: time.strftime(DEFAULT_SERVER_DATETIME_FORMAT), |
191 | 153 | 'state': 'draft', | 176 | 'state': 'draft', |
192 | 154 | 'full_inventory': False, | 177 | 'full_inventory': False, |
193 | 178 | 'type': 'partial', | ||
194 | 155 | 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'physical.inventory', context=c), | 179 | 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'physical.inventory', context=c), |
195 | 156 | 'has_bad_stock': False, | 180 | 'has_bad_stock': False, |
196 | 157 | 'discrepancies_generated': False, | 181 | 'discrepancies_generated': False, |
197 | 158 | 'max_filter_months': -1, | 182 | 'max_filter_months': -1, |
198 | 159 | 'multiple_filter_months': False, | 183 | 'multiple_filter_months': False, |
199 | 184 | 'products_added': False, | ||
200 | 160 | } | 185 | } |
201 | 161 | 186 | ||
202 | 162 | |||
203 | 163 | def create(self, cr, uid, values, context): | 187 | def create(self, cr, uid, values, context): |
204 | 164 | context = context is None and {} or context | 188 | context = context is None and {} or context |
205 | 165 | values["ref"] = self.pool.get('ir.sequence').get(cr, uid, 'physical.inventory') | 189 | values["ref"] = self.pool.get('ir.sequence').get(cr, uid, 'physical.inventory') |
206 | @@ -170,7 +194,6 @@ | |||
207 | 170 | raise osv.except_osv(_('Warning'), _("Location is inactive")) | 194 | raise osv.except_osv(_('Warning'), _("Location is inactive")) |
208 | 171 | return new_id | 195 | return new_id |
209 | 172 | 196 | ||
210 | 173 | |||
211 | 174 | def copy(self, cr, uid, id_, default=None, context=None): | 197 | def copy(self, cr, uid, id_, default=None, context=None): |
212 | 175 | default = default is None and {} or default | 198 | default = default is None and {} or default |
213 | 176 | context = context is None and {} or context | 199 | context = context is None and {} or context |
214 | @@ -178,6 +201,7 @@ | |||
215 | 178 | 201 | ||
216 | 179 | default['state'] = 'draft' | 202 | default['state'] = 'draft' |
217 | 180 | default['date'] = time.strftime(DEFAULT_SERVER_DATETIME_FORMAT) | 203 | default['date'] = time.strftime(DEFAULT_SERVER_DATETIME_FORMAT) |
218 | 204 | default['type'] = 'partial' | ||
219 | 181 | fields_to_empty = ["ref", | 205 | fields_to_empty = ["ref", |
220 | 182 | "full_inventory", | 206 | "full_inventory", |
221 | 183 | "date_done", | 207 | "date_done", |
222 | @@ -197,19 +221,14 @@ | |||
223 | 197 | 221 | ||
224 | 198 | return super(PhysicalInventory, self).copy(cr, uid, id_, default, context=context) | 222 | return super(PhysicalInventory, self).copy(cr, uid, id_, default, context=context) |
225 | 199 | 223 | ||
226 | 200 | |||
227 | 201 | def perm_write(self, cr, user, ids, fields, context=None): | 224 | def perm_write(self, cr, user, ids, fields, context=None): |
228 | 202 | pass | 225 | pass |
229 | 203 | 226 | ||
239 | 204 | 227 | def onchange_products(self, cr, uid, ids, product_ids, context=None): | |
240 | 205 | def set_full_inventory(self, cr, uid, ids, context=None): | 228 | res = {'value': {'products_added': product_ids != [(6, 0, [])]}} |
241 | 206 | context = context is None and {} or context | 229 | if product_ids == [(6, 0, [])]: |
242 | 207 | 230 | res['value'].update({'max_filter_months': -1, 'multiple_filter_months': False}) | |
243 | 208 | # Set full inventory as true and unlink all products already selected | 231 | return res |
235 | 209 | self.write(cr, uid, ids, {'full_inventory': True, | ||
236 | 210 | 'product_ids': [(5)]}, context=context) | ||
237 | 211 | return {} | ||
238 | 212 | |||
244 | 213 | 232 | ||
245 | 214 | def action_select_products(self, cr, uid, ids, context=None): | 233 | def action_select_products(self, cr, uid, ids, context=None): |
246 | 215 | """ | 234 | """ |
247 | @@ -229,13 +248,12 @@ | |||
248 | 229 | assert len(ids) == 1 | 248 | assert len(ids) == 1 |
249 | 230 | inventory_id = ids[0] | 249 | inventory_id = ids[0] |
250 | 231 | 250 | ||
255 | 232 | # Is it a full inventory ? | 251 | # Create the wizard, check if it is a full inventory |
252 | 233 | full_inventory = read_single(self._name, inventory_id, 'full_inventory') | ||
253 | 234 | |||
254 | 235 | # Create the wizard | ||
256 | 236 | wiz_model = 'physical.inventory.select.products' | 252 | wiz_model = 'physical.inventory.select.products' |
259 | 237 | wiz_values = {"inventory_id": inventory_id, | 253 | wiz_values = { |
260 | 238 | "full_inventory": full_inventory } | 254 | "inventory_id": inventory_id, |
261 | 255 | "full_inventory": read_single(self._name, inventory_id, 'type') == 'full' | ||
262 | 256 | } | ||
263 | 239 | wiz_id = create(wiz_model, wiz_values) | 257 | wiz_id = create(wiz_model, wiz_values) |
264 | 240 | context['wizard_id'] = wiz_id | 258 | context['wizard_id'] = wiz_id |
265 | 241 | 259 | ||
266 | 242 | 260 | ||
267 | === modified file 'bin/addons/stock/physical_inventory_view.xml' | |||
268 | --- bin/addons/stock/physical_inventory_view.xml 2020-11-30 15:46:46 +0000 | |||
269 | +++ bin/addons/stock/physical_inventory_view.xml 2022-06-27 14:49:29 +0000 | |||
270 | @@ -25,18 +25,17 @@ | |||
271 | 25 | <field name="date" attrs="{'readonly': [('state', '!=', 'draft')]}"/> | 25 | <field name="date" attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
272 | 26 | <field name="responsible"/> | 26 | <field name="responsible"/> |
273 | 27 | <field name="date_done"/> | 27 | <field name="date_done"/> |
275 | 28 | <field name="full_inventory"/> | 28 | <field name="type" attrs="{'readonly': ['|', ('state', '!=', 'draft'), ('products_added', '=', True)]}"/> |
276 | 29 | <field name="discrepancies_generated" invisible="1" readonly="1"/> | 29 | <field name="discrepancies_generated" invisible="1" readonly="1"/> |
281 | 30 | <button colspan="2" name="set_full_inventory" states="draft" string="Set as full inventory" type="object" | 30 | <field name="max_filter_months" invisible="1"/> |
282 | 31 | icon="gtk-about" | 31 | <field name="multiple_filter_months" invisible="1"/> |
283 | 32 | confirm="Setting as 'full inventory' is irreversible. Do you confirm ?" | 32 | <field name="products_added" invisible="1" readonly="1"/> |
280 | 33 | attrs="{'invisible': [('full_inventory', '=', True)]}"/> | ||
284 | 34 | <notebook colspan="4"> | 33 | <notebook colspan="4"> |
285 | 35 | <page string="Products" attrs="{'readonly': [('state', 'not in', ['draft'])]}"> | 34 | <page string="Products" attrs="{'readonly': [('state', 'not in', ['draft'])]}"> |
286 | 36 | <button name="action_select_products" states="draft" string="Products Selection" type="object" | 35 | <button name="action_select_products" states="draft" string="Products Selection" type="object" |
290 | 37 | icon="gtk-add"/> | 36 | icon="gtk-add" attrs="{'invisible': [('type', '=', 'correction')]}"/> |
291 | 38 | <field colspan="4" name="product_ids" nolabel="1" | 37 | <field colspan="4" name="product_ids" nolabel="1" on_change="onchange_products(product_ids)" |
292 | 39 | attrs="{'readonly': ['|', ('full_inventory', '=', True), ('state', 'not in', ['draft'])]}"> | 38 | attrs="{'readonly': ['|', ('type', '=', 'full'), ('state', '!=', 'draft')]}"> |
293 | 40 | <tree string="Products" noteditable="1"> | 39 | <tree string="Products" noteditable="1"> |
294 | 41 | <field name="default_code"/> | 40 | <field name="default_code"/> |
295 | 42 | <field name="name"/> | 41 | <field name="name"/> |
296 | 43 | 42 | ||
297 | === modified file 'bin/addons/stock/wizard/physical_inventory_select_products.py' | |||
298 | --- bin/addons/stock/wizard/physical_inventory_select_products.py 2021-08-16 15:44:14 +0000 | |||
299 | +++ bin/addons/stock/wizard/physical_inventory_select_products.py 2022-06-27 14:49:29 +0000 | |||
300 | @@ -393,7 +393,7 @@ | |||
301 | 393 | product_ids = self.pool.get("product.product").search(cr, uid, [("id", 'in', product_ids)], context=context) | 393 | product_ids = self.pool.get("product.product").search(cr, uid, [("id", 'in', product_ids)], context=context) |
302 | 394 | 394 | ||
303 | 395 | # '6' is the code for 'replace all' | 395 | # '6' is the code for 'replace all' |
305 | 396 | vals = {'product_ids': [(6, 0, product_ids)]} | 396 | vals = {'product_ids': [(6, 0, product_ids)], 'products_added': True} |
306 | 397 | 397 | ||
307 | 398 | # Check if 'recent_movements' has been used | 398 | # Check if 'recent_movements' has been used |
308 | 399 | if wiz_data['products_preview'] and (wiz_data['first_filter'] == 'recent_movements' or wiz_data['full_inventory'] and wiz_data['recent_moves_months_fullinvo']): | 399 | if wiz_data['products_preview'] and (wiz_data['first_filter'] == 'recent_movements' or wiz_data['full_inventory'] and wiz_data['recent_moves_months_fullinvo']): |