mirror of
https://github.com/bringout/oca-ocb-l10n_me-africa.git
synced 2026-04-28 05:42:08 +02:00
19.0 vanilla
This commit is contained in:
parent
c5006a6999
commit
80293571e7
420 changed files with 21812 additions and 44297 deletions
28
odoo-bringout-oca-ocb-l10n_ae/l10n_ae/models/account_move.py
Normal file
28
odoo-bringout-oca-ocb-l10n_ae/l10n_ae/models/account_move.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
from odoo import models
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
_inherit = "account.move"
|
||||
|
||||
def _get_name_invoice_report(self):
|
||||
# EXTENDS account
|
||||
self.ensure_one()
|
||||
if self.company_id.country_code == 'AE':
|
||||
return 'l10n_ae.l10n_ae_report_invoice_document'
|
||||
return super()._get_name_invoice_report()
|
||||
|
||||
def _l10n_gcc_get_invoice_title(self):
|
||||
# EXTENDS l10n_gcc_invoice
|
||||
self.ensure_one()
|
||||
if self.company_id.country_code != 'AE':
|
||||
return super()._l10n_gcc_get_invoice_title()
|
||||
|
||||
if self._l10n_ae_is_simplified():
|
||||
return self.env._('Simplified Tax Invoice')
|
||||
|
||||
return self.env._('Tax Invoice')
|
||||
|
||||
def _l10n_ae_is_simplified(self):
|
||||
"""Returns True if the customer is an individual, i.e: The invoice is B2C"""
|
||||
self.ensure_one()
|
||||
return not self.commercial_partner_id.is_company
|
||||
Loading…
Add table
Add a link
Reference in a new issue