Skip to content

Commit

Permalink
Merge PR #1006 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by chienandalu
  • Loading branch information
OCA-git-bot committed Jun 28, 2023
2 parents 8cf63e2 + db38203 commit f6da7aa
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions pos_session_pay_invoice/__init__.py
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
1 change: 1 addition & 0 deletions pos_session_pay_invoice/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import pos_order
25 changes: 25 additions & 0 deletions pos_session_pay_invoice/models/pos_order.py
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,
)

0 comments on commit f6da7aa

Please sign in to comment.