[12.0 -> 14.0] account.move records created based on account.asset have invalid names
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with _deduce_sequence_number_reset in odoo/addons/account/models/account_move.py, which the issue says picks an existing journal move to infer the sequence format, and with the _setup_move_data to create_move path in account_asset_management. Reproduce by migrating a 12.0 database with asset-generated moves and running Compute Assets. The issue does not say what the fix should be, so agree on an approach with maintainers before coding. Done means asset-created moves no longer block new move creation after migration.
索引モデルが issue の本文から書いたものです。
説明
Module
account_asset_management from 12.0 to 13.0 onward, after the fusion of the account.invoice/account.move tables.
Describe the bug
-
In V12.0,
account.moverecords created fromaccount.assetrecords use the asset's name -
In v13.0 onwards, the fusion of
account.move/account.invoicemean that both table follow the same sequence generator for new invoice/move numbers.
Fittingly, the_setup_move_datamethod used inasset_compute->_compute_entries->create_moveno longer sets thenamefield on newly createdaccount.moverecords. -
However,
account.moverecords created fromaccount.asset(using theCompute Assetsaction) in the version 12.0 can mess with the sequence number generation - Indeed, from Odoo 14.0, the_deduce_sequence_number_resettries to extrapolate the sequence number format by taking an existing move in the journal.
If the createdaccount.moveis not a refund, it looks foraccount.movein the same journal,which are not ofout_refundandin_refund, which incluesentrymoves created from assets, that can have non-standard names if created in previous Odoo versions.
That causes aValidationErrorsince the name is not standard
(see the_deduce_sequence_number_resetmethod inodoo/addons/account/models/account_move.py)
To Reproduce
Affected versions: 14.0 onwards
Steps to reproduce the behavior:
- Create a v12.0 database
- Create assets and moves related to these assets
- Migrated the database to v14.0
- Try to use the Compute Assets action
Expected behavior
The account.move entities created from account.asset in previous Odoo versions, which do not possess standard sequence number names, shouldn't bar the creation of new account.move entities when the database is migrated.
I'm not sure if people have already surrounded the issue (renamed account.move records, simply didn't compute assets before a migration), but I'm interested in people's suggestions which might have migrated an Odoo database with the same module.
- 主要言語
- Python
- スター
- 995
- フォーク
- 837
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OCA/OpenUpgrade のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
OCA/OpenUpgrade#5380 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
OCA/OpenUpgrade#6044 · コメント 6 件 · リアクション 6 件 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
OCA/OpenUpgrade#6004 · コメント 5 件 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
OCA/OpenUpgrade#5594 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
OCA/OpenUpgrade#5592 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
OCA/OpenUpgrade の issue をすべて見る
似ている issue
-
getchaintips leaves out the active tip once a header is staged on it, where Core always lists itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
btclib-org/btclib-node#2158 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
dbt-msft/dbt-sqlserver#897 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Gathin23/cleanyourtv#2770 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
vllm-project/vllm#64845 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
dekobon/big-code-analysis#1729 ·
メンテナーはふだん 1 日以内に返信