Add context on product for stock computation in selection view
Add TODO to compute planned date of move
This commit is contained in:
1 parent
967ecad855
commit
9edcfb7b54
1 file changed
+4
-1
+4
-1
@@ -572,7 +572,9 @@ class PurchaseLine(OSV):
|
||||
states={
|
||||
'invisible': "type != 'line'",
|
||||
}, on_change=['product', 'unit', 'quantity', 'description',
|
||||
'parent.party', 'parent.currency'])
|
||||
'parent.party', 'parent.currency'],
|
||||
context="{'locations': [parent.warehouse], " \
|
||||
"'stock_date_end': parent.purchase_date}")
|
||||
unit_price = fields.Numeric('Unit Price', digits=(16, 4),
|
||||
states={
|
||||
'invisible': "type != 'line'",
|
||||
@@ -854,6 +856,7 @@ class PurchaseLine(OSV):
|
||||
vals['company'] = line.purchase.company.id
|
||||
vals['unit_price'] = line.unit_price
|
||||
vals['currency'] = line.purchase.currency.id
|
||||
#TODO compute the planned_date
|
||||
|
||||
move_id = move_obj.create(cursor, user, vals, context=context)
|
||||
|
||||
|
||||
Reference in new issue
Block a user