Skip to content

Conversation

@Tisho99
Copy link

@Tisho99 Tisho99 commented Jan 12, 2026

Standard migration

  • The pos order is now created in draft state because we can no longer create pos payments in posted pos orders. The 'invoiced' state is assigned after that
  • The refund of the setUpClass is now generated from a new invoice because in v18 the original and refund moves were being automatically conciliated

Depends of OCA/account-payment#820

T-9200

etobella and others added 30 commits January 9, 2026 14:44
Currently translated at 86.6% (26 of 30 strings)

Translation: pos-14.0/pos-14.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_session_pay_invoice/es/
Currently translated at 100.0% (30 of 30 strings)

Translation: pos-14.0/pos-14.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_session_pay_invoice/es/
Currently translated at 100.0% (30 of 30 strings)

Translation: pos-14.0/pos-14.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_session_pay_invoice/it/
Currently translated at 100.0% (30 of 30 strings)

Translation: pos-16.0/pos-16.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-16.0/pos-16.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice/
Currently translated at 100.0% (8 of 8 strings)

Translation: pos-16.0/pos-16.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice/it/
…S session

To prevent mistakes, users must select only the journals available in the pos.payment.method of the POS session.
oca-ci and others added 9 commits January 9, 2026 14:44
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-16.0/pos-16.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice/
… customer transactions

Before this commit, the wizard generated an account.bank.statement.line, but the problem was that when the POS had cash control enabled, all transactions generated by this wizard were displayed under Cash, because Odoo considered such statements as Cash In/Out operations, see https://github.com/odoo/odoo/blob/c1d3153ed564c0f47a201e5751740857a15d7db2/addons/point_of_sale/models/pos_session.py#L557-L567.

Now, the transactions are shown under Cash or Bank depending on the payment method and journal type.

For payments of vendor bills, a statement line will still be created, because the POS only works with receivable accounts and cannot reconcile with payable accounts.
See https://github.com/odoo/odoo/blob/c1d3153ed564c0f47a201e5751740857a15d7db2/addons/point_of_sale/models/pos_order.py#L890-L898
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-16.0/pos-16.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice/
Currently translated at 100.0% (12 of 12 strings)

Translation: pos-16.0/pos-16.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice/it/
@Tisho99 Tisho99 force-pushed the 18.0-mig-pos_session_pay_invoice branch 3 times, most recently from 642bbe1 to 6bfe20c Compare January 16, 2026 14:18
@Tisho99 Tisho99 marked this pull request as ready for review January 16, 2026 14:20
@Tisho99 Tisho99 force-pushed the 18.0-mig-pos_session_pay_invoice branch 2 times, most recently from dd612a9 to 868f215 Compare January 19, 2026 14:48
Copy link

@javierizaca javierizaca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional review completed. The module works as expected, allowing payments to be made from the backend of an active session. LGTM.

"partner_id": self.invoice_id.partner_id.id,
"account_move": self.invoice_id.id,
"state": "invoiced",
"state": "draft",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it validated at some point?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is validated (or set as 'invoiced') here: https://github.com/OCA/pos/pull/1472/files#diff-f228ebf7313229f41451c1c8f72b80d566b40b9075e7fefd8dfac7313711e159R92

I searched for highet level function in pos.order to assign the state, but found anything useful for this case

}
)
cls.invoice_in.action_post()
cls.invoice_out2 = cls.invoice_out.copy()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explain why copy please

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to generate a invoice with the same values as invoice_out, and the copy is the methot that does it with less code

@Tisho99 Tisho99 force-pushed the 18.0-mig-pos_session_pay_invoice branch from 868f215 to 9d88a07 Compare January 21, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.