Skip to content

[19.0][MIG] purchase_unreconciled: Migration to 19.0 - #7

Open
dnplkndll wants to merge 18 commits into
19.0from
19.0-mig-purchase_unreconciled
Open

[19.0][MIG] purchase_unreconciled: Migration to 19.0#7
dnplkndll wants to merge 18 commits into
19.0from
19.0-mig-purchase_unreconciled

Conversation

@dnplkndll

@dnplkndll dnplkndll commented May 19, 2026

Copy link
Copy Markdown

Port of purchase_unreconciled from 18.0 to 19.0.

What changed

  • Drop the account_move_line_purchase_info dependency — Odoo 19's purchase_stock provides account.move.line.purchase_line_id natively, so the one reference (groupby in action_reconcile) now uses the standard field. The OCA module was 18.0-era plumbing that's no longer needed.
  • read_group_read_group: signature drops fields= / lazy=, returns tuples of records (not dicts of (id, name)). Iteration loop updated.
  • odoo.osv.expressionodoo.fields.Domain: import + 9 call sites rewritten as variadic Domain.AND(...). The one place that mutates via list.remove() (action_view_unreconciled) casts the immutable Domain back to a prefix-notation list before mutating.
  • Translation calls use self.env._(...) (W8161); lazy substitution via kwargs (W8301).
  • tracking_disable=True in test setUpClass.
  • Manifest bumped to 19.0.1.0.0; README regenerated.

AaronHForgeFlow and others added 17 commits May 19, 2026 09:38
Currently translated at 90.2% (37 of 41 strings)

Translation: account-financial-tools-17.0/account-financial-tools-17.0-purchase_unreconciled
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-purchase_unreconciled/it/
Currently translated at 100.0% (41 of 41 strings)

Translation: account-financial-tools-17.0/account-financial-tools-17.0-purchase_unreconciled
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-purchase_unreconciled/it/
[MIG] purchase_unreconciled: Migration to 18.0

[MIG] purchase_unreconciled: Migration to 18.0

[MIG] purchase_unreconciled: Migration to 18.0

[MIG] purchase_unreconciled: Migration to 18.0

[MIG] purchase_unreconciled: Migration to 18.0

[MIG] purchase_unreconciled: Migration to 18.0
```
 Traceback (most recent call last):
  File "/__w/account-financial-tools/account-financial-tools/purchase_unreconciled/tests/test_purchase_unreconciled.py", line 354, in test_07_multicompany
    invoice.action_post()
  File "/__w/account-financial-tools/account-financial-tools/account_spread_cost_revenue/models/account_move.py", line 13, in action_post
    res = super().action_post()
  File "/__w/account-financial-tools/account-financial-tools/account_lock_to_date/models/account_move.py", line 36, in action_post
    return super().action_post()
  File "/__w/account-financial-tools/account-financial-tools/account_loan/models/account_move.py", line 23, in action_post
    res = super().action_post()
  File "/__w/account-financial-tools/account-financial-tools/account_asset_management/models/account_move.py", line 94, in action_post
    ret_val = super().action_post()
  File "/opt/odoo/addons/sale/models/account_move.py", line 66, in action_post
    res = super(AccountMove, self).action_post()
  File "/opt/odoo/addons/account/models/account_move.py", line 4186, in action_post
    other_moves._post(soft=False)
  File "/__w/account-financial-tools/account-financial-tools/account_move_post_date_user/models/account_move.py", line 11, in _post
    res = super()._post(soft)
  File "/opt/odoo/addons/sale/models/account_move.py", line 100, in _post
    posted = super()._post(soft)
  File "/opt/odoo/addons/purchase_stock/models/account_invoice.py", line 137, in _post
    posted = super(AccountMove, self.with_context(skip_cogs_reconciliation=True))._post(soft)
  File "/opt/odoo/addons/stock_account/models/account_move.py", line 51, in _post
    posted = super()._post(soft)
  File "/opt/odoo/addons/account/models/account_move.py", line 3940, in _post
    raise UserError(_(
odoo.exceptions.UserError: The entry ref/2025/11/0001 (id 650) is using accounts from a different company.
```
* Manifest version → 19.0.1.0.0; drop dependency on
  account_move_line_purchase_info — Odoo 19's purchase_stock provides
  account.move.line.purchase_line_id natively, so the field this module
  used to import via the OCA module (oca_purchase_line_id) is no longer
  needed. Replaced the one reference (in action_reconcile's groupby)
  with the standard purchase_line_id.
* read_group → _read_group: signature drops fields= / lazy=, returns
  tuples of records (not dicts of (id, name)); iteration loop updated.
* odoo.osv.expression → odoo.fields.Domain: import + 9 call sites
  rewritten as variadic Domain.AND(...). One call site that mutates
  the result via list.remove() casts the immutable Domain back to a
  prefix-notation list before mutating.
* Translation calls migrated to self.env._(...) (W8161); lazy
  substitution via kwargs (W8301).
* tracking_disable=True in test setUpClass.
* README regenerated.

Signed-off-by: Don Kendall <dkendall@ledoweb.com>
@dnplkndll
dnplkndll force-pushed the 19.0-mig-purchase_unreconciled branch from be7395c to 83ba85e Compare May 19, 2026 14:48
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.

9 participants