Hello,
After adding and printing bill in Odoo POS I'm not able to valide payment anymore. I'm getting the following error:
You cannot edit a payment for a printed order.
I'm using odoo to manage a Bar/restaurant
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
After adding and printing bill in Odoo POS I'm not able to valide payment anymore. I'm getting the following error:
You cannot edit a payment for a printed order.
I'm using odoo to manage a Bar/restaurant
Hi,
This happens because Odoo treats a printed order (bill) as finalized, and blocks further payment edits to prevent inconsistencies.
The validation error is as follows.
If you want to allow payment even after bill is printed, patch the restriction check.
Override or remove this check in a custom module, if your business case allows.
* Warning: Bypassing this check may invalidate fiscal reports or audit trails in regulated regions.
Hope it helps
By default in Odoo (including v18.0), once you print the bill (bill printing) in the Bar/Restaurant POS, the system locks the payment workflow for that order. This is by design to prevent discrepancies between what was given to the customer and what was later charged. That’s why you see the error:
You cannot edit a payment for a printed order.
Restart Odoo after the change.if order.nb_print > 0 and vals.get('payment_ids'): raise UserError(_('You cannot change the payment of a printed order.')) elif payment.pos_order_id.nb_print > 0: raise ValidationError(_('You cannot edit a payment for a printed order.'))
If you really need this behavior changed (e.g., your business process requires printing and still allowing payments), the safest way is to build a small custom module that overrides this restriction cleanly rather than modifying Odoo’s core files.
I don't know why on earth is this logic exists but you can do
from "addons/point_of_sale/models/pos_order.py"
Comment This 2 lines
if order.nb_print > 0 and vals.get('payment_ids'):
raise UserError(_('You cannot change the payment of a printed order.'))
from "addons/point_of_sale/models/pos_payment.py"
Comment This 2 lines
elif payment.pos_order_id.nb_print > 0:
raise ValidationError(_('You cannot edit a payment for a printed order.'))
Save and restart odoo service
Hope it solves
Did you find a solution ?
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
5
Jul 25
|
4327 | ||
|
1
Mar 25
|
1276 | ||
|
1
Nov 24
|
1634 | ||
|
1
Agu 25
|
685 | ||
|
2
Agu 25
|
662 |