Daily updates from Odoo
Saturday, July 18, 2026
2 changes
1 change
Resolved issues and error corrections
Point of Sale Avatax tax calculations now use the company/shop location instead of requiring a customer address. This makes checkout tax behavior simpler and more accurate for typical in-store sales, especially for businesses with multiple shop locations.
Original PR description
The module behaves in an unexpected way: - Tax is based on a customer's home address, - To calculate tax a customer must be selected, - Tax is calculated as if shipped from the warehouse selected on…
The module behaves in an unexpected way: - Tax is based on a customer's home address, - To calculate tax a customer must be selected, - Tax is calculated as if shipped from the warehouse selected on pos_warehouse_id This could be useful in very obscure scenarios (B2B sales, traveling salesmen), but for those cases customers can already use our Avatax integration on sale orders. We want this module to be useful for normal B2C POS sales. Taxes they charge are the same regardless of where the customer may live. This commit makes many changes: - Stop requiring a customer to be selected, - Always calculate local sales (from company location to company location) if the Avatax option is enabled on pos.config, - Fix a bug where price_subtotal is not multiplied by quantity, - Removes copy/pasted code from sale.order that serves no purpose, This makes the module useful for companies that don't want to manually figure out what taxes to charge. This could be especially useful for companies with many shops in different locations. A tour test was added to make sure the module keeps working. The test added before [1] was removed because it was redundant and less complete than the one included here. This is deliberately not backported to Odoo 18 [2]. We keep the current behavior there. [1] https://github.com/odoo/odoo/commit/3e94fe90ded58d498f0098cd9ed8679cbe500b8f Closes odoo/enterprise#82779 task-4710463 Forward-Port-Of: odoo/enterprise#124778 Forward-Port-Of: odoo/enterprise#123190
1 change
Code cleanup and technical improvements
This change restructures how Point of Sale accounting entries, invoices, refunds, cash handling, and customer-account payments are recorded. It reduces duplicate setup fields and makes invoice settlement clearer by settling invoices directly instead of creating extra POS orders, which should improve accounting consistency across POS sessions and localizations.
Original PR description
One of the major changes here is `pos_settle_due` in which is now only possible to settle invoices and not pos order. That's because when paying by customer account it will create an invoice each…
One of the major changes here is `pos_settle_due` in which is now only possible to settle invoices and not pos order. That's because when paying by customer account it will create an invoice each time. ### Removed fields - `invoice_journal_id` and `pos_invoice_journal_id` because now all invoice are created with the same journal, the one defined on the pos config. - `account_default_pos_receivable_account_id` because now the receivable account is defined though a default partner on the pos.config - `cash_real_transaction`, `cash_register_balance_start`, `cash_register_balance_end_real and `cash_journal_id` all these infos are now handled though the cash statement and its lines, so no need to have them on the session - `is_online_payment` because online payment method is now identified by type == 'online' and not by a boolean field - `settle_invoice_product_id`, `deposit_product_id` and `settle_due_product_id` because we don't create a pos.order when settling an invoice, so no need to have these products. - `settled_invoice_id` and `settled_order_id` because we don't create a pos.order when settling an invoice, so no need to link them anymore. - `init_customer_due_total`, `customer_due_total`, `settled_order_line_ids`, `settled_orders_count`, `commercial_partner_id` because we don't settle pos.order anymore ### Test tracking A lot of tests were replaced because all accounting entries for order and session closing are now refactored. Some tests were also removed because they were not relevant anymore with the new way of handling payment and invoicing on pos.order. #### Replaced tests `test_classic_sale_order` replace: - `test_state_when_closing_register` `test_fifo_valuation_with_invoice` replace: - `test_fifo_valuation_with_invoice_when_pos_customer_is_delivery_type` `test_fixed_tax_negative_qty_should_be_negative` replace: - `test_fixed_tax_negative_qty` - `test_fixed_tax_positive_qty` `test_user_right_on_statement_line_for_pos_user` replace: - `test_pos_closing_cash_details` `test_rounding_when_closing_session` replace: - `test_invoice_rounding_overpaid_backend` - `test_pos_create_account_move_round_globally` - `test_rounding_method` Moved in `test_pos_accounting.py`: `test_journal_entries_category_without_account` `test_tax_change_blocked_when_open_pos_session` `test_order_partial_refund_rounding` Test suite in `test_pos_accounting.py` replace: - `test_pos_simple_invoiced_orders.py` - `test_orders_no_invoiced` - `test_orders_with_invoiced` - `test_01_invoiced_order_from_other_customer` - `test_02_all_orders_invoiced_mixed_customers` - `test_total_due.py` - `test_02_orders_without_invoice` - `test_03_orders_with_invoice` `test_invoice_a_negative_order_should_create_credit_note` replace: - `test_manual_refund_negative_qty_invoice_creates_credit_note` `test_invoice_an_order_from_closed_session` replace: - `test_invoice_past_order_affecting_taxes` - `test_invoice_past_refund` - `test_invoice_past_order` - `test_sale_order_postponed_invoicing` - `test_order_invoiced_after_session_closed` - `test_order_invoiced_customer_account_after_session_closed` - `test_sale_order_postponed_invoicing` `test_pos_order_sale_and_refund_with_taxes` replace: - `test_orders_with_invoiced` - `test_return_order` `test_pos_order_sale_and_refund_with_taxes_invoiced` replace: - `test_pos_create_correct_account_move` - `test_return_order_invoiced` `test_pos_order_sale_and_refund_with_taxes_not_invoiced` replace: - `test_pos_create_correct_account_move` - `test_return_order` `test_invoiced_order_with_discount_sale_and_refund_with_tax` replace: - `test_pos_create_correct_account_move_round_globally_discount` - `test_pos_create_correct_account_move_round_globally_discount_real_use_case` `test_tax_change_blocked_when_open_pos_session` replace: - `test_tax_is_used_when_in_transactions` `test_pos_payment_direction_and_account` replace: - `test_pos_payment_direction_and_accounts` `test_cash_statement_opening_and_closing_consistency` replace: - `test_cash_register_if_no_order` - `test_cash_payments_should_reflect_on_next_opening` `test_invoicing_zero_amount_pos_order` replace: - `test_orders_with_zero_valued_invoiced` `test_order_partial_refund_rounding` replace: - `test_refund_rounding_backend` - `test_order_partial_refund` `test_pos_config_with_other_currency_than_company` replace: - `test_order_to_payment_currency` `test_accounting_items_when_closing_with_bank_difference` replace: - `test_payment_difference_accounting_items` - `test_state_when_closing_register` `test_pos_order_with_closing_storno` replace: - `test_sale_order_postponed_invoicing_storno` `test_various_orders` replace: - `test_correct_partner_on_invoice_receivables` `test_pos_order_session_closing_with_fp` replace: - `test_01_no_invoice_fpos` - `test_02_no_invoice_fpos_no_tax_dest` `test_available_stock_order_no_invoice` replace: - `test_orders_no_invoiced` - `test_return_order` `test_available_stock_order_with_invoice` replace: - `test_orders_with_invoiced` - `test_return_order` `test_pos_order_with_company_branch` replace: - `test_pos_branch_account` #### Removed tests `test_split_payment_linked_to_accounting_partner` split transaction is now only available when using customer account (type == pay_layer) `test_pos_hr_session_name_gap` removed not useful `test_order_to_invoice_no_tax` not useful `test_order_invoiced_customer_account_after_session_closed` not useful, customer account payment are always invoiced but this test is almost the same `test_invoice_an_order_from_closed_session` `test_start_balance_with_two_pos` useless test, cash payment cannot be shared. `test_different_customer_invoices_settlement_same_session_reconciled_separately` settling an invoice doesn't create `pos.order` anymore `test_split_cash_payments` removed because split on customer account is now available only when using `pay_later` payment method. `test_receivable_account_reconciliation.py`, `test_pos_reconcile` no more necessary, payment are now directly added to the account.move `test_pos_settling_account_resets_on_payment_screen_unmount` removed because now when leaving payment screen it will delete the order if its a settling one. `test_pos_settle_due_with_rounding` deleted, wtf we round on a money deposit ? `test_split_payment_linked_to_accounting_partner` split_transactions is no more available with classic pm, only with pay_later. `test_05_tax_base_amount` removed tax base amount are handled and tested by accounting helpers `test_no_kitchen_confirmation_for_deposit_money` removed because deposit money doesn't create a pos.order anymore. `test_order_with_deleted_tax` is now not possible to archive a tax used by an open order. `fastValidate` hoot deleted in pos_settle_due because isn't possible to use fast validation with settle customer invoice anymore. `test_double_syncing_same_order` removed, sync data with the same UUID will update the same order, but since a payment_ids create command is in the data, its normal that this payment is created two times.