[19.0][MIG] l10n_es_pos_oca: Migration to 19.0 #5356
All Vouch review confidence checks passed
Residual risk 0.35 = Change Risk (0.66) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.66 · 369 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.354
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.066
Real PR Conversation Timeline
1 comments
"Review active on #5356"
general
weight: 0.35
adasatorres-tecnativa
Migration of
l10n_es_pos_ocato 19.0, keeping the 18.0 behaviour. Only the changes required by 19.0 or by the CI have been made:Required by 19.0
pos.order._update_sequence_numberis now a core method (called fromcreatewith(session, values)), so the module method is renamed to_l10n_es_update_sequence_number. Without it, any POS order creation raises aTypeError.PaymentScreen:get_total_with_tax()no longer exists, replaced bypriceIncl.PosStore: new import path (app/services/pos_store).getReceiptHeaderDatano longer exists, the 19.0 receipt reads the order directly.PosOrder:export_for_printingno longer exists. The tax base per tax is already printed by the 19.0 receipt when the bases differ.TicketScreen: the search field usesmodelFields(list) instead ofmodelField. The order list is now a table without header row, so the simplified invoice number is added as a new cell (and as a block in the mobile layout).account.account.deprecatedno longer exists.Required by the CI
self.env._()instead of_()(pylint-odoo W8161 / W8301).hooks.py(ruff UP031).self.env.contextinstead ofself._context(deprecated since 19.0).Dead code removed (open to other opinions)
models/pos_session.py:_loader_params_res_companydoes not exist in the core since 18.0, so this override was never called.pos.order._order_fields: same, the core method does not exist since 18.0.PosOrder.init_from_JSON/export_as_JSONin JS: not in the core since 18.0.Receipt QR override removed (open to other opinions)
order_receipt.xml(props.data.pos_qr_code or props.data.ticket_code and (...)) only changes the "Need an invoice for your purchase ?" text, not the QR image, and because of the operator precedence that text is shown whenever there is a QR code. So in 18.0 the invoice request QR is printed on simplified invoices too. In 19.0 the QR, the text and the code are a singlepos-receipt-qrblock and the 18.0 xpath no longer matches, so the override is removed to keep the 18.0 behaviour. If hiding the QR on simplified invoices (the 17.0 behaviour) is preferred, it can be done on that block.Tested on a clean 19.0 database (16 tests OK) and on a copy of a production database with 12 POS: sequences and existing numbers are kept after the upgrade, receipts get the next number, orders over the limit are forced to be invoiced, and the number can be seen and searched in the order list.