[IMP] l10n_{dz,in,ua,ma}: invoice amount in words

As it is now possible to activate the total amount of an invoice in letters, these localizations (dz,in,ua,ma) need by default the feature to be activated. In addition, some of them had aleady such feature which has therefore been removed to accommodate the new generic feature.

The indian localization also has a different message on the right side of QR code on invoices

closes odoo/odoo#107714

Task: 3097097
Pr: 107714
Related: odoo/enterprise#35959
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
This commit is contained in:
hupo-odoo
2023-02-09 08:46:45 +01:00
parent 3764914c86
commit 014590a005
25 changed files with 158 additions and 140 deletions
+3 -1
View File
@@ -19,7 +19,9 @@ This module applies to companies based in Algeria.
'data/account_tax_data.xml',
'data/account_fiscal_position_template_data.xml',
'data/account_chart_template_configuration_data.xml',
'report/account_move_report.xml',
],
'demo': [
'demo/demo_company.xml',
],
'license': 'LGPL-3',
}
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="l10n_dz_demo_company" model="res.partner">
<field name="name">DZ Company</field>
<field name="street">3233 Green Acres Road</field>
<field name="street2">Unit 07</field>
<field name="city">Algier</field>
<field name="zip">1000</field>
<field name="country_id" ref="base.dz"/>
<field name="phone">+04334934343</field>
<field name="email">info@company.algerianbestcompany.com</field>
<field name="website">www.algerianbestcompany.com</field>
<field name="vat">12312312312</field>
</record>
<record id="l10n_dz_demo_company_company" model="res.company">
<field name="name">DZ Company</field>
<field name="partner_id" ref="l10n_dz_demo_company"/>
</record>
<function model="res.company" name="_onchange_country_id">
<value eval="[ref('l10n_dz_demo_company_company')]"/>
</function>
<function model="res.users" name="write">
<value eval="[ref('base.user_root'), ref('base.user_admin'), ref('base.user_demo')]"/>
<value eval="{'company_ids': [(4, ref('l10n_dz.l10n_dz_demo_company_company'))]}"/>
</function>
<function model="account.chart.template" name="try_loading">
<value eval="[ref('l10n_dz.l10n_dz_pcg_chart_template')]"/>
<value model="res.company" eval="obj().env.ref('l10n_dz.l10n_dz_demo_company_company')"/>
</function>
</odoo>
-35
View File
@@ -1,35 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_dz
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-29 13:57+0000\n"
"PO-Revision-Date: 2022-11-29 13:57+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_dz
#: model_terms:ir.ui.view,arch_db:l10n_dz.invoice_report_amount_in_words_inherit
msgid "Arranged the present invoice in the amount of :"
msgstr "رتبت هذه الفاتورة بمبلغ: "
#. module: l10n_dz
#: model:ir.model.fields,field_description:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_payment__amount_sentence
msgid "Arranged the present invoice in the amount of : "
msgstr "رتبت هذه الفاتورة بمبلغ: "
#. module: l10n_dz
#: model:ir.model.fields,help:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_payment__amount_sentence
msgid "The amount is automatically generated by the software"
msgstr "يتم إنشاء المبلغ تلقائيًا بواسطة البرنامج"
-35
View File
@@ -1,35 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_dz
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-29 13:57+0000\n"
"PO-Revision-Date: 2022-11-29 13:57+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_dz
#: model_terms:ir.ui.view,arch_db:l10n_dz.invoice_report_amount_in_words_inherit
msgid "Arranged the present invoice in the amount of :"
msgstr "Arrêtée la présente facture à la somme de : "
#. module: l10n_dz
#: model:ir.model.fields,field_description:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_payment__amount_sentence
msgid "Arranged the present invoice in the amount of : "
msgstr "Arrêtée la présente facture à la somme de : "
#. module: l10n_dz
#: model:ir.model.fields,help:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_payment__amount_sentence
msgid "The amount is automatically generated by the software"
msgstr "Le montant est automatiquement généré par le programme"
-35
View File
@@ -1,35 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_dz
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-29 14:39+0000\n"
"PO-Revision-Date: 2022-11-29 14:39+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_dz
#: model_terms:ir.ui.view,arch_db:l10n_dz.invoice_report_amount_in_words_inherit
msgid "Arranged the present invoice in the amount of :"
msgstr ""
#. module: l10n_dz
#: model:ir.model.fields,field_description:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_payment__amount_sentence
msgid "Arranged the present invoice in the amount of : "
msgstr ""
#. module: l10n_dz
#: model:ir.model.fields,help:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_payment__amount_sentence
msgid "The amount is automatically generated by the software"
msgstr ""
+1 -1
View File
@@ -1 +1 @@
from . import account_move
from . import company
-12
View File
@@ -1,12 +0,0 @@
from odoo import api, models, fields
class AccountMove(models.Model):
_inherit = 'account.move'
amount_total_words = fields.Char("Amount total in words", compute="_compute_amount_total_words")
@api.depends('amount_total', 'currency_id')
def _compute_amount_total_words(self):
for record in self:
record.amount_total_words = record.currency_id.amount_to_text(record.amount_total)
+13
View File
@@ -0,0 +1,13 @@
from odoo import api, models
class ResCompany(models.Model):
_inherit = 'res.company'
@api.model_create_multi
def create(self, vals_list):
companies = super().create(vals_list)
for company in companies:
if company.account_fiscal_country_id.code == 'DZ':
company.display_invoice_amount_total_words = True
return companies
@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="invoice_report_amount_in_words_inherit" inherit_id="account.report_invoice_document">
<xpath expr="//div[hasclass('clearfix')]" position="after">
<div style="margin-top:30px; margin-bottom:20px;">
<p class="fw-bold">
Arranged the present invoice in the amount of : <span t-field="o.amount_total_words"/>
</p>
</div>
</xpath>
</template>
</odoo>
+1
View File
@@ -4,6 +4,7 @@
from . import account
from . import account_invoice
from . import chart_template
from . import company
from . import product_template
from . import port_code
from . import res_config_settings
-1
View File
@@ -8,7 +8,6 @@ from odoo.exceptions import ValidationError, RedirectWarning
class AccountMove(models.Model):
_inherit = "account.move"
amount_total_words = fields.Char("Total (In Words)", compute="_compute_amount_total_words")
l10n_in_gst_treatment = fields.Selection([
('regular', 'Registered Business - Regular'),
('composition', 'Registered Business - Composition'),
+13
View File
@@ -0,0 +1,13 @@
from odoo import api, models
class ResCompany(models.Model):
_inherit = 'res.company'
@api.model_create_multi
def create(self, vals_list):
companies = super().create(vals_list)
for company in companies:
if company.account_fiscal_country_id.code == 'IN':
company.display_invoice_amount_total_words = True
return companies
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="800" width="1200" class="main-header__logo-image" fill="#A1A1A1" viewBox="-65.39955 -43.28375 566.7961 259.7025"><path fill="#5f6368" d="M206.197 84.585v50.75h-16.1V10.005h42.7a38.61 38.61 0 0127.65 10.85 34.88 34.88 0 0111.55 26.45 34.72 34.72 0 01-11.55 26.6q-11.2 10.68-27.65 10.67h-26.6zm0-59.15v43.75h27a21.28 21.28 0 0015.93-6.48 21.36 21.36 0 000-30.63 21 21 0 00-15.93-6.65h-27zm102.9 21.35q17.85 0 28.18 9.54 10.33 9.54 10.32 26.16v52.85h-15.4v-11.9h-.7q-10 14.7-26.6 14.7-14.17 0-23.71-8.4a26.82 26.82 0 01-9.54-21q0-13.31 10.06-21.17 10.06-7.86 26.86-7.88 14.34 0 23.62 5.25v-3.68a18.33 18.33 0 00-6.65-14.25 22.8 22.8 0 00-15.54-5.87q-13.49 0-21.35 11.38l-14.18-8.93q11.7-16.8 34.63-16.8zm-20.83 62.3a12.86 12.86 0 005.34 10.5 19.64 19.64 0 0012.51 4.2 25.67 25.67 0 0018.11-7.52q8-7.53 8-17.67-7.53-6-21-6-9.81 0-16.36 4.73c-4.41 3.2-6.6 7.09-6.6 11.76zm147.73-59.5l-53.76 123.55h-16.62l19.95-43.23-35.35-80.32h17.5l25.55 61.6h.35l24.85-61.6z"/><path fill="#4285f4" d="M141.137 73.645a85.79 85.79 0 00-1.24-14.64h-67.9v27.73h38.89a33.33 33.33 0 01-14.38 21.88v18h23.21c13.59-12.53 21.42-31.06 21.42-52.97z"/><path fill="#34a853" d="M71.997 144.005c19.43 0 35.79-6.38 47.72-17.38l-23.21-18c-6.46 4.38-14.78 6.88-24.51 6.88-18.78 0-34.72-12.66-40.42-29.72H7.667v18.55a72 72 0 0064.33 39.67z"/><path fill="#fbbc04" d="M31.577 85.785a43.14 43.14 0 010-27.56v-18.55H7.667a72 72 0 000 64.66z"/><path fill="#ea4335" d="M71.997 28.505a39.09 39.09 0 0127.62 10.8l20.55-20.55A69.18 69.18 0 0071.997.005a72 72 0 00-64.33 39.67l23.91 18.55c5.7-17.06 21.64-29.72 40.42-29.72z"/></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="800" width="1200" viewBox="-2.5242255 -1.318595 21.876621 7.91157"><g fill="none"><path d="M16.77137 1.55572c-.15275-.43674-.56903-.75036-1.05798-.75036h-.01023c-.31785 0-.6043.13229-.80821.34466-.20426-.21237-.49072-.34466-.80822-.34466h-.01023c-.2794 0-.5348.1023-.73095.27164V.99092c-.0067-.08573-.07726-.1531-.1644-.1531h-.75c-.09172 0-.1658.07408-.1658.16615v4.07282c0 .09207.07408.16616.1658.16616h.75c.08361 0 .1524-.06244.16334-.14323l-.00035-2.92382a.26293.26293 0 01.0014-.02928c.012-.13053.1076-.23777.2586-.25118h.13827c.06315.00564.11642.02787.1584.06138.06526.05186.1016.13159.1016.21908l.00282 2.90936c0 .09207.07443.1665.1658.1665h.75c.08856 0 .16052-.07055.16476-.15839l-.00035-2.92135c-.00036-.09596.0441-.18274.12206-.23425.03845-.0247.08467-.04127.13793-.04621h.13829c.16228.01411.26035.13723.26.28046l.00282 2.90548c0 .09207.07444.16615.1658.16615h.75001c.09137 0 .1658-.07408.1658-.16615V1.95259c0-.21308-.02398-.30374-.05679-.39687M11.69398.84843h-.42897V.15134C11.265.06773 11.19727 0 11.11366 0c-.00988 0-.0194.0014-.02857.00317-.47555.13053-.3803.78917-1.24848.84526h-.08432c-.0127 0-.02469.00176-.03633.00423h-.0007l.0007.00035c-.07409.01659-.12982.0822-.12982.16123v.75c0 .09137.07443.1658.16615.1658h.45262l-.0007 3.1803c0 .09066.07337.16404.16403.16404h.74154c.09031 0 .1637-.07338.1637-.16404l.00034-3.1803h.42016c.09137 0 .1658-.07443.1658-.1658v-.75c0-.09137-.07443-.1658-.1658-.1658" fill="#00BAF2"/><path d="M8.99555.84843h-.75c-.09137 0-.16546.07444-.16546.1658v1.55082c-.00176.09595-.07937.17286-.17568.17286h-.31397c-.09737 0-.17604-.07832-.17604-.17569l-.00282-1.54798c0-.09137-.07444-.1658-.1658-.1658h-.75001c-.09172 0-.1658.07443-.1658.1658v1.69968c0 .64558.46037 1.10596 1.1063 1.10596 0 0 .48472 0 .49954.00282.08749.00988.15557.08325.15557.17356 0 .08926-.06667.16228-.1531.17322-.00423.0007-.00811.00176-.0127.00247l-1.09679.00388c-.09172 0-.1658.07443-.1658.1658v.74966c0 .09172.07408.1658.1658.1658h1.22626c.64628 0 1.1063-.46002 1.1063-1.10595v-3.1369c0-.09137-.07408-.1658-.1658-.1658M1.73602 2.22268v.46285c0 .097-.07867.17603-.17568.17603l-.4759.00035v-.92745h.4759c.09701 0 .17568.07831.17568.17568zM1.80199.84825H.16263C.07267.84825 0 .92128 0 1.01088v.73484c0 .00141.00035.00282.00035.00423 0 .00353-.00035.00706-.00035.01023v3.32599c0 .09031.06773.16405.1517.16616h.7641c.09137 0 .1658-.07408.1658-.1658l.00283-1.13983h.71755c.60042 0 1.01882-.41663 1.01882-1.01953V1.8692c0-.6029-.4184-1.02094-1.01882-1.02094zM4.8479 3.98346v.11712c0 .00953-.0014.0187-.00281.02752a.17498.17498 0 01-.00706.02434c-.02329.06562-.0889.11324-.16687.11324h-.3122c-.09737 0-.17674-.07408-.17674-.1651v-.14146c0-.00176-.00036-.00353-.00036-.00529l.00036-.37641v-.11784l.00035-.00105c.00035-.09067.07902-.16404.17639-.16404h.3122c.09772 0 .17675.07373.17675.1651zM4.72868.85256h-1.0407c-.09207 0-.1665.06985-.1665.15557v.29175c0 .00176.00035.00388.00035.00564 0 .00212-.00036.00423-.00036.00635v.3997c0 .09067.07903.16475.1764.16475h.99094c.07832.01235.14041.0695.14923.15875v.09666c-.00882.08502-.0702.1471-.145.15416h-.4907c-.65264 0-1.1176.43357-1.1176 1.04246v.87207c0 .60537.3997 1.0361 1.04774 1.0361h1.35996c.24412 0 .44203-.18485.44203-.41239V1.97827c0-.69003-.3556-1.12571-1.2058-1.12571z" fill="#1F336B"/></g></svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="800" width="1200" xml:space="preserve" y="0" x="0" id="Layer_2" version="1.1" viewBox="-19.77372 -8.949675 171.37224 53.69805"><style id="style28" type="text/css">.st0{fill:#5f259f}</style><g transform="translate(.0248 -6.071)" id="g34"><circle r="17.9" id="ellipse30" cy="24" cx="17.9" class="st0" transform="matrix(.2298 -.9732 .9732 .2298 -9.5957 35.8754)"/><path id="path32" d="M90.5 34.2v-6.5c0-1.6-.6-2.4-2.1-2.4-.6 0-1.3.1-1.7.2V35c0 .3-.3.6-.6.6h-2.3c-.3 0-.6-.3-.6-.6V23.9c0-.4.3-.7.6-.8 1.5-.5 3-.8 4.6-.8 3.6 0 5.6 1.9 5.6 5.4v7.4c0 .3-.3.6-.6.6H92c-.9 0-1.5-.7-1.5-1.5zm9-3.9l-.1.9c0 1.2.8 1.9 2.1 1.9 1 0 1.9-.3 2.9-.8.1 0 .2-.1.3-.1.2 0 .3.1.4.2.1.1.3.4.3.4.2.3.4.7.4 1 0 .5-.3 1-.7 1.2-1.1.6-2.4.9-3.8.9-1.6 0-2.9-.4-3.9-1.2-1-.9-1.6-2.1-1.6-3.6v-3.9c0-3.1 2-5 5.4-5 3.3 0 5.2 1.8 5.2 5v2.4c0 .3-.3.6-.6.6h-6.3zm-.1-2.2h3.8v-1c0-1.2-.7-2-1.9-2s-1.9.7-1.9 2zm25.5 2.2l-.1.9c0 1.2.8 1.9 2.1 1.9 1 0 1.9-.3 2.9-.8.1 0 .2-.1.3-.1.2 0 .3.1.4.2.1.1.3.4.3.4.2.3.4.7.4 1 0 .5-.3 1-.7 1.2-1.1.6-2.4.9-3.8.9-1.6 0-2.9-.4-3.9-1.2-1-.9-1.6-2.1-1.6-3.6v-3.9c0-3.1 2-5 5.4-5 3.3 0 5.2 1.8 5.2 5v2.4c0 .3-.3.6-.6.6h-6.3zm-.1-2.2h3.8v-1c0-1.2-.7-2-1.9-2s-1.9.7-1.9 2zM66 35.7h1.4c.3 0 .6-.3.6-.6v-7.4c0-3.4-1.8-5.4-4.8-5.4-.9 0-1.9.2-2.5.4V19c0-.8-.7-1.5-1.5-1.5h-1.4c-.3 0-.6.3-.6.6v17c0 .3.3.6.6.6h2.3c.3 0 .6-.3.6-.6v-9.4c.5-.2 1.2-.3 1.7-.3 1.5 0 2.1.7 2.1 2.4v6.5c.1.7.7 1.4 1.5 1.4zm15.1-8.4V31c0 3.1-2.1 5-5.6 5-3.4 0-5.6-1.9-5.6-5v-3.7c0-3.1 2.1-5 5.6-5 3.5 0 5.6 1.9 5.6 5zm-3.5 0c0-1.2-.7-2-2-2s-2 .7-2 2V31c0 1.2.7 1.9 2 1.9s2-.7 2-1.9zm-22.3-1.7c0 3.2-2.4 5.4-5.6 5.4-.8 0-1.5-.1-2.2-.4v4.5c0 .3-.3.6-.6.6h-2.3c-.3 0-.6-.3-.6-.6V19.2c0-.4.3-.7.6-.8 1.5-.5 3-.8 4.6-.8 3.6 0 6.1 2.2 6.1 5.6zM51.7 23c0-1.6-1.1-2.4-2.6-2.4-.9 0-1.5.3-1.5.3v6.6c.6.3.9.4 1.6.4 1.5 0 2.6-.9 2.6-2.4V23zm68.2 2.6c0 3.2-2.4 5.4-5.6 5.4-.8 0-1.5-.1-2.2-.4v4.5c0 .3-.3.6-.6.6h-2.3c-.3 0-.6-.3-.6-.6V19.2c0-.4.3-.7.6-.8 1.5-.5 3-.8 4.6-.8 3.6 0 6.1 2.2 6.1 5.6zm-3.6-2.6c0-1.6-1.1-2.4-2.6-2.4-.9 0-1.5.3-1.5.3v6.6c.6.3.9.4 1.6.4 1.5 0 2.6-.9 2.6-2.4V23z" class="st0"/></g><path id="path36" d="M26.0248 13.229c0-.7-.6-1.3-1.3-1.3h-2.4l-5.5-6.3c-.5-.6-1.3-.8-2.1-.6l-1.9.6c-.3.1-.4.5-.2.7l6 5.7h-9.1c-.3 0-.5.2-.5.5v1c0 .7.6 1.3 1.3 1.3h1.4v4.8c0 3.6 1.9 5.7 5.1 5.7 1 0 1.8-.1 2.8-.5v3.2c0 .9.7 1.6 1.6 1.6h1.4c.3 0 .6-.3.6-.6v-14.3h2.3c.3 0 .5-.2.5-.5zm-6.4 8.6c-.6.3-1.4.4-2 .4-1.6 0-2.4-.8-2.4-2.6v-4.8h4.4z" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="60" fill-rule="evenodd"><path d="M95.678 42.9L110 29.835l-6.784-13.516z" fill="#097939"/><path d="M90.854 42.9l14.322-13.065-6.784-13.516z" fill="#ed752e"/><path d="M22.41 16.47l-6.03 21.475 21.407.15 5.88-21.625h5.427l-7.05 25.14c-.27.96-1.298 1.74-2.295 1.74H12.31c-1.664 0-2.65-1.3-2.2-2.9l6.724-23.98zm66.182-.15h5.427l-7.538 27.03h-5.58zM49.698 27.582l27.136-.15 1.81-5.707H51.054l1.658-5.256 29.4-.27c1.83-.017 2.92 1.4 2.438 3.167L81.78 29.49c-.483 1.766-2.36 3.197-4.19 3.197H53.316L50.454 43.8h-5.28z" fill="#747474"/></svg>

After

Width:  |  Height:  |  Size: 593 B

+22 -8
View File
@@ -9,14 +9,6 @@
Place of supply: <span t-esc="o.l10n_in_state_id.name"/>
</t>
</xpath>
<xpath expr="//div[@t-if='not is_html_empty(o.narration)']" position="before">
<t t-if="o.company_id.account_fiscal_country_id.code == 'IN'">
<p id="total_in_words" class="mb16">
<strong>Total (In Words): </strong>
<span t-field="o.amount_total_words"/>
</p>
</t>
</xpath>
<xpath expr="//table[@name='invoice_line_table']/thead/tr/th[1]" position="after">
<t t-if="o.company_id.account_fiscal_country_id.code == 'IN'">
@@ -30,6 +22,28 @@
</td>
</xpath>
<xpath expr="//div[@id='qrcode_info']" position="attributes">
<attribute name="t-if" add="and o.company_id.account_fiscal_country_id.code != 'IN'" separator=" "/>
</xpath>
<xpath expr="//div[@id='qrcode_info']" position="after">
<t t-if="o.company_id.account_fiscal_country_id.code == 'IN'">
<div style="display:-webkit-flex;" class="flex-column">
<strong>PAYMENT QR CODE</strong>
<div t-if="o.company_id.l10n_in_upi_id" class="mt-1 mb-1">
<p class="mb-0">UPI ID:</p>
<span class="mb-0" t-field="o.company_id.l10n_in_upi_id"/>
</div>
<div class="d-flex flex-row" t-attf-style="#{'-webkit-transform:translateX(-0.5rem);' if report_type != 'html' else '-webkit-transform:translate(-0.5rem,-0.8rem);'}">
<img src="/l10n_in/static/src/img/PhonePe-Logo.svg" style="width:4.5rem;"/>
<img src="/l10n_in/static/src/img/Google_Pay-Logo.svg" style="width:3.5rem;"/>
<img src="/l10n_in/static/src/img/Paytm-Logo.svg" style="width:4rem;"/>
<img src="/l10n_in/static/src/img/Upi-logo.svg" t-attf-style="#{'' if report_type != 'html' else 'padding:0.5rem;'} width:4rem;"/>
</div>
</div>
</t>
</xpath>
<xpath expr="//h2" position="replace">
<h2>
<span t-if="o.move_type == 'out_invoice' and o.state == 'posted'" t-field="o.journal_id.name"/>
+1
View File
@@ -1,2 +1,3 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
+3
View File
@@ -25,5 +25,8 @@ Seddik au cours du troisième trimestre 2010.""",
'data/account_tax_data.xml',
'data/account_chart_template_data.xml',
],
'demo': [
'demo/demo_company.xml',
],
'license': 'LGPL-3',
}
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="l10n_ma_demo_company" model="res.partner">
<field name="name">MA Company</field>
<field name="street">3233 Green Acres Road</field>
<field name="street2">Unit 07</field>
<field name="city">Marrakech</field>
<field name="zip">1000</field>
<field name="country_id" ref="base.ma"/>
<field name="phone">+04334934343</field>
<field name="email">info@company.morocobestcompany.com</field>
<field name="website">www.morocobestcompany.com</field>
<field name="vat">12312312312</field>
</record>
<record id="l10n_ma_demo_company_company" model="res.company">
<field name="name">MA Company</field>
<field name="partner_id" ref="l10n_ma_demo_company"/>
</record>
<function model="res.company" name="_onchange_country_id">
<value eval="[ref('l10n_ma_demo_company_company')]"/>
</function>
<function model="res.users" name="write">
<value eval="[ref('base.user_root'), ref('base.user_admin'), ref('base.user_demo')]"/>
<value eval="{'company_ids': [(4, ref('l10n_ma.l10n_ma_demo_company_company'))]}"/>
</function>
<function model="account.chart.template" name="try_loading">
<value eval="[ref('l10n_ma.l10n_ma_chart_template')]"/>
<value model="res.company" eval="obj().env.ref('l10n_ma.l10n_ma_demo_company_company')"/>
</function>
</odoo>
+1
View File
@@ -0,0 +1 @@
from . import company
+13
View File
@@ -0,0 +1,13 @@
from odoo import api, models
class ResCompany(models.Model):
_inherit = 'res.company'
@api.model_create_multi
def create(self, vals_list):
companies = super().create(vals_list)
for company in companies:
if company.account_fiscal_country_id.code == 'MA':
company.display_invoice_amount_total_words = True
return companies
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2019 Bohdan Lisnenko <bohdan.lisnenko@erp.co.ua>, ERP Ukraine
from . import models
+1
View File
@@ -0,0 +1 @@
from . import company
+13
View File
@@ -0,0 +1,13 @@
from odoo import api, models
class ResCompany(models.Model):
_inherit = 'res.company'
@api.model_create_multi
def create(self, vals_list):
companies = super().create(vals_list)
for company in companies:
if company.account_fiscal_country_id.code == 'UA':
company.display_invoice_amount_total_words = True
return companies