[IMP] commission_simple: validation from list view

This commit is contained in:
Alexis de Lattre
2025-10-10 14:21:31 +00:00
parent 9769393759
commit 7b0b738510
3 changed files with 9 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ class CommissionResult(models.Model):
def draft2done(self):
for result in self:
if result.assign_type == 'agent':
if result.state == "draft" and result.assign_type == 'agent':
if not result.purchase_id:
vals = result._prepare_purchase_order()
po = self.env['purchase.order'].create(vals)