[FIX] stock: compute location on quant package
The field 'location_id' on quant package is not computed anymore, as all quants of a package are in the same location we take the location of the first quant
This commit is contained in:
@@ -267,6 +267,8 @@ class QuantPackage(models.Model):
|
||||
def _compute_package_info(self):
|
||||
for package in self:
|
||||
values = {'location_id': False, 'company_id': self.env.user.company_id.id, 'owner_id': False}
|
||||
if self.quant_ids:
|
||||
values['location_id'] = self.quant_ids[0].location_id
|
||||
package.location_id = values['location_id']
|
||||
package.company_id = values['company_id']
|
||||
package.owner_id = values['owner_id']
|
||||
|
||||
Reference in New Issue
Block a user