diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2020-01-02 09:23:08 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-01-02 12:49:13 +0000 |
| commit | dc55cc6468bf9d2fddc47cb5f135af7016ed2a50 (patch) | |
| tree | 3d1c7cb17b26617378c382dbb0bc57d4ef20e6a9 /addons/mail/static/src/xml/chatter.xml | |
| parent | 3a541a8ae1aa272847f71829dc5e8af512472d20 (diff) | |
[FIX] base, account: fix test for 2020
When `invoice_sequence_number_next` is set in [1], the move date is not
taken into account to find a corresponding `ir.sequence.date_range` in
[2]. We use the current date instead.
However, when the move is posted we use its date to find the
`ir.sequence.date_range` [3]. This leads to an inconsistency: we set
`invoice_sequence_number_next` on the `ir.sequence.date_range` of the
current date, but at posting we use the `ir.sequence.date_range` of the
move date.
The fix is to take into account the move date when we set
`invoice_sequence_number_next`.
[1] https://github.com/odoo/odoo/blob/40c8da4bd47d99a97b7231f2749c8e981f35a1a0/addons/account/tests/test_account_move_in_invoice.py#L829
[2] https://github.com/odoo/odoo/blob/40c8da4bd47d99a97b7231f2749c8e981f35a1a0/addons/account/models/account_move.py#L1153
[3] https://github.com/odoo/odoo/blob/40c8da4bd47d99a97b7231f2749c8e981f35a1a0/addons/account/models/account_move.py#L2096
closes odoo/odoo#42580
X-original-commit: 45d126405b030610fc66b8557a668f0d61e129dc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/mail/static/src/xml/chatter.xml')
0 files changed, 0 insertions, 0 deletions
