Commit Graph

22 Commits

Author SHA1 Message Date
Moises Lopez - https://www.vauxoo.com/
47ccda91fc [FW] account_move_name_sequence: Forward-Port of 15.0 to 16.0 2024-04-17 13:13:15 -06:00
Pierre Verkest
f08cd868ea [FIX] account_move_name_sequence: avoid fallback on odoo sequence name
In case an alias is configured to fecth email to generate
account entries. the new_message method directly call the
_compute_name on account move which call the legacy code
provide by account odoo module which should be avoid here.

To reproduce:

* configure an alias on your purchase journal
* send an email to that alias
* the invoice is draft with a number

to mitigate this behavior the suggested patch overwritte
the former method '_compute_name' and call the new implemented
method '_compute_name_by_sequence'.
2024-04-17 13:13:15 -06:00
Fernanda Hernández
5095705fad [FIX] account_move_name_sequence: call flush before to post the moves 2024-04-17 13:13:15 -06:00
mde-spring
27e59d504e [FIX] account_move_name_sequence: redefine _onchange_journal_id
In v16, _onchange_journal_id is defined to update name when journal_id is modified
During the creation of new account.move, this onchange is triggered and called the standard _compute_name method

How to reproduce issue:
* Create new invoice
=> Name is defined instead of to be 'Draft'
2024-04-17 13:13:14 -06:00
Marcos Oitaben
d95f747d39 [MIG] account_move_name_sequence: Migration to 17.0 2024-03-11 20:03:01 +01:00
BT-anieto
bff4a13d8e [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.
2023-11-13 12:19:44 +01:00
Andrea Stirpe
5448606e20 [FIX] account_move_name_sequence: do not create duplicated sequences 2023-11-13 12:19:44 +01:00
remi-filament
0d22f0a6cc [FIX] account_move_name_sequence: computed fields raising warning 2023-11-13 12:19:44 +01:00
Rodrigo
bbd92d6963 [FIX] account_move_name_sequence: With the "account_move_name_sequence" module the "_get_last_sequence" method does not have to propagate the with_prefix parameter. The sequence_prefix parameter will not be completed and will give error as it is False in this line of code. https://github.com/OCA/OCB/blob/16.0/addons/account/models/sequence_mixin.py#L169 2023-11-13 12:19:44 +01:00
Rodrigo
d53b8698ec [FIX] account_move_name_sequence: call flush before _fetch_duplicate_supplier_reference method
same issue https://github.com/OCA/account-financial-tools/issues/1501
this fix not working for v16 https://github.com/OCA/account-financial-tools/pull/1514
2023-11-13 12:19:44 +01:00
Rodrigo
6eeafb3177 [FIX] account_move_name_sequence: issue #1465 vals get refund_sequence true if value not get in vals 2023-11-13 12:19:44 +01:00
Rodrigo
59d6c06c3d [FIX] account_move_name_sequence: return sequence names do not add a space between name and returns. 2023-11-13 12:19:44 +01:00
Rodrigo
3b477f3b86 [MIG] account_move_name_sequence: Migration to 16.0 2023-11-13 12:19:44 +01:00
Pierre Verkest
defe3d4903 [FIX] account_move_name_sequence: Use account move date to compute prefix
In case you want name your invoice YYYY-MM-SEQ (ie: 2022-07-00001)
where:
 * YYYY: is the account move year
 * MM: is the account move month
 * SEQ: is a numerical sequence that is continue along the fiscal year
   assuming fiscal year is over two years (ie: from july to june next year)

Before this commit the sequence prefix use now() to be compute but the
range is selected with the account move date.

This commit make consistency computing prefix with the account
move date as well.

So account move manage the first janunary for the last day of
the previous year will properly use the account move date.

Co-authored-by: Alexis de Lattre <alexis.delattre@akretion.com>
2023-11-13 12:19:44 +01:00
Francisco Javier Luna Vazquez
0dc729c886 [FIX] account_move_name_sequence: Exclude no_gap sequences from _is_end_of_seq_chain 2023-11-13 12:19:44 +01:00
Francisco Javier Luna Vazquez
522afcd487 [MIG] account_move_name_sequence: Migration to 15.0 2023-11-13 12:19:44 +01:00
Francisco Javier Luna Vazquez
425e29ba2d [REF] account_move_name_sequence: Use Odoo native methods + Typos 2023-11-13 12:19:44 +01:00
Moises Lopez
8f518c23ba [REF] account_move_name_sequence: Moves with name '/' can not be posted
After remove required=True for journal.sequence_id field it is possible to post an invoice with misconfigured journal with empty sequence

So, this constraint will raise an error for this kind of cases since that using '/' could raise the unique constraint for all other moves
2023-11-13 12:19:44 +01:00
Moises Lopez
a8800c9c62 [FIX] ir_sequence: Fix creating date_range_seq with range_month and range_day
More info about:
 - https://github.com/odoo/odoo/pull/91019

TODO: Revert this commit after it is merged
2023-11-13 12:14:34 +01:00
Moises Lopez
d7a7e368c3 [REF] account_move_name_sequence: Add number_next_actual and date range lines data based on current moves 2023-11-13 12:14:34 +01:00
Alexis de Lattre
e6ae066a47 sequence is now required on journals
Add post-install script to create a sequence for all existing journals
Update README accordingly
2023-11-13 12:14:34 +01:00
Alexis de Lattre
9c250274c6 Add module account_move_name_sequence
This module restores the good old behavior where journal entry numbers
were generated from a sequence configured on the journal.
2023-11-13 12:14:34 +01:00