19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:16 +01:00
parent 89c6e82fe7
commit 1b82c20a58
572 changed files with 43570 additions and 53303 deletions

View file

@ -0,0 +1,20 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, api
class AccountChartTemplate(models.AbstractModel):
_inherit = 'account.chart.template'
@api.model
def _get_demo_data_move(self, company=False):
""" Set the l10n_latam_document_number on demo invoices """
move_data = super()._get_demo_data_move(company)
if company.account_fiscal_country_id.code == 'BR':
number = 0
for move in move_data.values():
# vendor bills and refund must be manually numbered (l10n_br uses the standard AccountMove._is_manual_document_number())
if move['move_type'] in ('in_invoice', 'in_refund'):
move['l10n_latam_document_number'] = f'{number:08d}'
number += 1
return move_data