-
-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by chienandalu
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
||
from . import models | ||
from . import wizard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import pos_order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2023 Jose Zambudio - Aures Tic <[email protected]> | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import api, models | ||
from odoo.osv.expression import AND | ||
|
||
|
||
class PosOrder(models.Model): | ||
_inherit = "pos.order" | ||
|
||
@api.model | ||
def search_paid_order_ids(self, config_id, domain, limit, offset): | ||
"""Orders paid without reference are filtered so that there is no | ||
error when exporting them. | ||
(odoo/odoo/blob/14.0/addons/point_of_sale/models/pos_order.py#L712)""" | ||
with_ref_domain = [ | ||
("pos_reference", "!=", False), | ||
] | ||
new_domain = AND([domain, with_ref_domain]) | ||
return super().search_paid_order_ids( | ||
config_id, | ||
new_domain, | ||
limit, | ||
offset, | ||
) |