Set planned date of backorder move to today
issue6700 review42581002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Plan backorder moves to today
|
||||
* Add cron task to process confirmed sale
|
||||
* Add report_address property on sale
|
||||
|
||||
|
||||
@@ -1450,6 +1450,7 @@ class SaleLine(sequence_ordered(), ModelSQL, ModelView):
|
||||
'''
|
||||
pool = Pool()
|
||||
Move = pool.get('stock.move')
|
||||
Date = pool.get('ir.date')
|
||||
|
||||
if self.type != 'line':
|
||||
return
|
||||
@@ -1483,7 +1484,11 @@ class SaleLine(sequence_ordered(), ModelSQL, ModelView):
|
||||
move.company = self.sale.company
|
||||
move.unit_price = self.unit_price
|
||||
move.currency = self.sale.currency
|
||||
move.planned_date = self.shipping_date
|
||||
if self.moves:
|
||||
# backorder can not be planned
|
||||
move.planned_date = Date.today()
|
||||
else:
|
||||
move.planned_date = self.shipping_date
|
||||
move.invoice_lines = self._get_move_invoice_lines(shipment_type)
|
||||
move.origin = self
|
||||
return move
|
||||
|
||||
Reference in New Issue
Block a user