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

Proposed by jftempo
Status: Merged
Merged at revision: 5860
Proposed branch: lp:~dorian-kemps/unifield-server/US-7306
Merge into: lp:unifield-server
Diff against target: 45 lines (+5/-7)
2 files modified
bin/addons/stock_override/wizard/stock_card_view.xml (+1/-1)
bin/addons/stock_override/wizard/stock_card_wizard.py (+4/-6)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-7306
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+392849@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/stock_override/wizard/stock_card_view.xml'
2--- bin/addons/stock_override/wizard/stock_card_view.xml 2019-08-29 13:46:55 +0000
3+++ bin/addons/stock_override/wizard/stock_card_view.xml 2020-10-27 10:14:32 +0000
4@@ -20,7 +20,7 @@
5 <field name="perishable" invisible="1" />
6 <field name="prodlot_id"
7 domain="[('product_id', '=', product_id)]"
8- attrs="{'invisible': [('perishable', '=', False)], 'required': [('perishable', '=', True)]}" />
9+ attrs="{'invisible': [('perishable', '=', False)]}" />
10 <separator colspan="4" string="Period" />
11 <field name="from_date" />
12 <field name="to_date" />
13
14=== modified file 'bin/addons/stock_override/wizard/stock_card_wizard.py'
15--- bin/addons/stock_override/wizard/stock_card_wizard.py 2020-07-29 15:36:49 +0000
16+++ bin/addons/stock_override/wizard/stock_card_wizard.py 2020-10-27 10:14:32 +0000
17@@ -100,7 +100,6 @@
18 # 'Old' physical inventories
19 oldinv_line_obj = self.pool.get('stock.inventory.line')
20
21-
22 if not context:
23 context = {}
24
25@@ -120,16 +119,15 @@
26 context.update({'to_date': card.from_date})
27
28 prodlot_id = card.prodlot_id and card.prodlot_id.id or False
29- product = product_obj.browse(cr, uid, card.product_id.id,
30- context=context)
31+ product = product_obj.browse(cr, uid, card.product_id.id, context=context)
32 if not card.from_date:
33 initial_stock = 0.00
34 else:
35 initial_stock = product.qty_available
36
37- domain = [('product_id', '=', product.id),
38- ('prodlot_id', '=', prodlot_id),
39- ('state', '=', 'done')]
40+ domain = [('product_id', '=', product.id), ('state', '=', 'done')]
41+ if prodlot_id:
42+ domain.append(('prodlot_id', '=', prodlot_id))
43
44 # "Old" physical inventory
45 inv_dom = [

Subscribers

People subscribed via source and target branches