[FIX] delivery: reactivate update soline on shipper

install delivery
Create a SO with a shipper
Validate it
validate the delivery

Before this commit it was:
- impossible to do the setup for the delivery cost on the SO to get updated with the delivery validation
- the delivery cost on the SO did not update

This was because the stock API changed a bit a some functions were not here anymore

OPW 786500
This commit is contained in:
Lucas Perais (lpe)
2018-01-05 11:18:05 +01:00
committed by Pierre Masereel
parent e441f348ba
commit 47e2521d94
2 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -106,10 +106,10 @@ class StockPicking(models.Model):
picking.weight = sum(move.weight for move in picking.move_lines if move.state != 'cancel')
@api.multi
def do_transfer(self):
def action_done(self):
# TDE FIXME: should work in batch
self.ensure_one()
res = super(StockPicking, self).do_transfer()
res = super(StockPicking, self).action_done()
if self.carrier_id and self.carrier_id.integration_level == 'rate_and_ship':
self.send_to_shipper()
+6 -1
View File
@@ -635,7 +635,12 @@ class Picking(models.Model):
self.write({'date_done': fields.Datetime.now()})
return True
do_transfer = action_done #TODO:replace later
# Backward compatibility
# Problem with fixed reference to a function:
# it doesn't allow for overriding action_done() through do_transfer
# get rid of me in master (and make me private ?)
def do_transfer(self):
return self.action_done()
def _check_move_lines_map_quant_package(self, package):
""" This method checks that all product of the package (quant) are well present in the move_line_ids of the picking. """