Skip to content
Snippets Groups Projects
Commit d46279ef authored by amoyaux's avatar amoyaux
Browse files

[FIX] stock: traceback package tree view

_compute_package_info iterate on package but
sometimes self is used resulting in an ensure one
exception.
parent ad4dd224
No related branches found
No related tags found
No related merge requests found
......@@ -330,8 +330,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
if package.quant_ids:
values['location_id'] = package.quant_ids[0].location_id
package.location_id = values['location_id']
package.company_id = values['company_id']
package.owner_id = values['owner_id']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment