diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-07-21 14:38:41 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-07-21 14:38:41 +0700 |
| commit | 9a1c1f7907a1d504fce1f7ef885fa975efcb1ec5 (patch) | |
| tree | b1fd7cb15add5efd8272dbc9554379f574279e61 /indoteknik_custom/models/purchase_order.py | |
| parent | 6805a54ddeb69e64b1ba5f2d0dd23158aeea29df (diff) | |
| parent | e0e6848123d06c58a506098124d4948fb72e2ba3 (diff) | |
Merge branch 'odoo-backup' of bitbucket.org:altafixco/indoteknik-addons into odoo-backup
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 8e283c45..25f45f6f 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -672,6 +672,13 @@ class PurchaseOrder(models.Model): for order in self: order.has_active_invoice = any(invoice.state != 'cancel' for invoice in order.invoice_ids) + # def _compute_has_active_invoice(self): + # for order in self: + # related_invoices = order.invoice_ids.filtered( + # lambda inv: inv.purchase_order_id.id == order.id and inv.move_type == 'in_invoice' and inv.state != 'cancel' + # ) + # order.has_active_invoice = bool(related_invoices) + def add_product_to_pricelist(self): i = 0 for line in self.order_line: |
