diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-10-21 09:19:50 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-10-21 09:19:50 +0700 |
| commit | eadc70481dd65dd7483aa2ae5c9bcc68bb274f3e (patch) | |
| tree | 359149627df1163af7c89d4606f28573ee29e19f /indoteknik_custom/models/sale_order.py | |
| parent | a4006a9c7f57bbc11ba0c519e69719ded8248ad3 (diff) | |
fix bug vendor approval
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index cb7d1782..891482cb 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -873,6 +873,9 @@ class SaleOrder(models.Model): }).send() def validate_different_vendor(self): + if self.vendor_approval_id and self.vendor_approval: + return False + different_vendor = self.order_line.filtered(lambda l: l.vendor_id and l.vendor_md_id and l.vendor_id.id != l.vendor_md_id.id) if self.vendor_approval_id and self.vendor_approval_id.state == 'draft': |
