Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[12.0 -> 14.0] account.move records created based on account.asset have invalid names

オープン
#5,502 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
18/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
backend

調査の方向性

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 の本文から書いたものです。

説明

bug

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.move records created from account.asset records use the asset's name

  • In v13.0 onwards, the fusion of account.move/account.invoice mean that both table follow the same sequence generator for new invoice/move numbers.
    Fittingly, the _setup_move_data method used in asset_compute->_compute_entries->create_move no longer sets the name field on newly created account.move records.

  • However, account.move records created from account.asset (using the Compute Assets action) in the version 12.0 can mess with the sequence number generation - Indeed, from Odoo 14.0, the _deduce_sequence_number_reset tries to extrapolate the sequence number format by taking an existing move in the journal.
    If the created account.move is not a refund, it looks for account.move in the same journal,which are not of out_refund and in_refund, which inclues entry moves created from assets, that can have non-standard names if created in previous Odoo versions.
    That causes a ValidationError since the name is not standard
    (see the _deduce_sequence_number_reset method in odoo/addons/account/models/account_move.py)

To Reproduce

Affected versions: 14.0 onwards

Steps to reproduce the behavior:

  1. Create a v12.0 database
  2. Create assets and moves related to these assets
  3. Migrated the database to v14.0
  4. 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OCA/OpenUpgrade のほかの issue

OCA/OpenUpgrade の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。