[FIX] account_move_name_sequence: call _inverse_name after computing the name

The core compute function for the name is calling at the end the function self._inverse_name(),
which updates the payment_reference when required.
This code was currently missing, causing the payment_reference not being properly computed,
for example, when using QR-Bills.
This commit is contained in:
BT-anieto
2023-10-11 15:06:25 +02:00
committed by Marcos Oitaben
parent 168d8372ac
commit bff4a13d8e
4 changed files with 4 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ Account Move Number Sequence
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:24b147ba3451a8084a70152d4337e2ee8d1cd9cd2351f680198a690dae41d573
!! source digest: sha256:b06670c2d2d2da46bb2adb03b7c40fd5cd9bf5bfd4000063131334effdb3fe7e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png

View File

@@ -7,7 +7,7 @@
{
"name": "Account Move Number Sequence",
"version": "16.0.1.1.5",
"version": "16.0.1.1.6",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Generate journal entry number from sequence",

View File

@@ -54,6 +54,7 @@ class AccountMove(models.Model):
# which applies on ir.sequence.date_range selection AND prefix
name = seq.with_context(ir_sequence_date=move.date).next_by_id()
move.name = name
self._inverse_name()
# We must by-pass this constraint of sequence.mixin
def _constrains_date_sequence(self):

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:24b147ba3451a8084a70152d4337e2ee8d1cd9cd2351f680198a690dae41d573
!! source digest: sha256:b06670c2d2d2da46bb2adb03b7c40fd5cd9bf5bfd4000063131334effdb3fe7e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-tools/tree/16.0/account_move_name_sequence"><img alt="OCA/account-financial-tools" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_move_name_sequence"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>In Odoo version 13.0 and previous versions, the number of journal entries was generated from a sequence configured on the journal.</p>