diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-08-14 16:12:14 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-08-14 16:12:14 +0700 |
| commit | d47eb069978ce67bce1a19b6c824a53ca3d68801 (patch) | |
| tree | 2427f680d68c8b136531d392eb36cf4262c7d35b /indoteknik_custom/models/automatic_purchase.py | |
| parent | 2513b765773fca587dbd298e77732d2d005949c8 (diff) | |
| parent | d4df708e5195e1c0c3b8e0ad90b7518e5d4d48c2 (diff) | |
<iman> Merge branch 'production' of https://bitbucket.org/altafixco/indoteknik-addons into feature/tracking-order
# 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/automatic_purchase.py')
| -rw-r--r-- | indoteknik_custom/models/automatic_purchase.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index 73416c48..f5b1baf9 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -396,7 +396,7 @@ class AutomaticPurchase(models.Model): domain = [ ('product_id', '=', line.product_id.id) ] - sale = self.env['v.sales.outstanding'].search(domain, limit=1) + sale = self.env['v.sales.outstanding'].search(domain, order='sale_order_create_date desc', limit=1) existing_match = self.env['automatic.purchase.sales.match'].search([ ('automatic_purchase_id', '=', self.id), |
