mirror of
https://github.com/bringout/oca-ocb-l10n_americas.git
synced 2026-04-27 14:12:02 +02:00
19.0 vanilla
This commit is contained in:
parent
89c6e82fe7
commit
1b82c20a58
572 changed files with 43570 additions and 53303 deletions
|
|
@ -0,0 +1,19 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo import fields, models, api
|
||||
|
||||
|
||||
class AccountJournal(models.Model):
|
||||
_inherit = 'account.journal'
|
||||
|
||||
l10n_br_invoice_serial = fields.Char(
|
||||
'Series', copy=False,
|
||||
help='Brazil: Series number associated with this Journal. If more than one Series needs to be used, duplicate this Journal and assign the new Series to the duplicated Journal.'
|
||||
)
|
||||
|
||||
@api.depends('l10n_br_invoice_serial')
|
||||
def _compute_display_name(self):
|
||||
res = super()._compute_display_name()
|
||||
for journal in self.filtered('l10n_br_invoice_serial'):
|
||||
journal.display_name = f'{journal.l10n_br_invoice_serial}-{journal.display_name}'
|
||||
|
||||
return res
|
||||
Loading…
Add table
Add a link
Reference in a new issue