diff options
| author | wan <wan@odoo.com> | 2020-09-28 11:51:08 +0000 |
|---|---|---|
| committer | wan <wan@odoo.com> | 2020-09-28 11:51:08 +0000 |
| commit | 25889e469c063c307fee9c15b48fe4316207aeb3 (patch) | |
| tree | 7c84e4cdf071ef687640afba14c4847e406ea502 /addons/l10n_ar | |
| parent | 4f8c3cc26a9738e67fc7569e1490f6f173c2439b (diff) | |
[FIX] l10n_ar: invoicing tour
The invoicing tour suggests to change the invoice number manualy but it
is not doable with l10n_ar because of the document number mechanism.
The partner needs the AFIP responsability to be set in order to generate
the number.
closes odoo/odoo#58661
Signed-off-by: Josse Colpaert <jco@openerp.com>
Diffstat (limited to 'addons/l10n_ar')
| -rw-r--r-- | addons/l10n_ar/__manifest__.py | 1 | ||||
| -rw-r--r-- | addons/l10n_ar/static/src/js/tours/account.js | 24 | ||||
| -rw-r--r-- | addons/l10n_ar/views/l10n_ar.xml | 8 |
3 files changed, 33 insertions, 0 deletions
diff --git a/addons/l10n_ar/__manifest__.py b/addons/l10n_ar/__manifest__.py index a4c4c381347..5fee05472b1 100644 --- a/addons/l10n_ar/__manifest__.py +++ b/addons/l10n_ar/__manifest__.py @@ -87,6 +87,7 @@ Master Data: 'data/res_partner_data.xml', 'data/res.currency.csv', 'data/res.country.csv', + 'views/l10n_ar.xml', 'views/account_move_view.xml', 'views/res_partner_view.xml', 'views/res_company_view.xml', diff --git a/addons/l10n_ar/static/src/js/tours/account.js b/addons/l10n_ar/static/src/js/tours/account.js new file mode 100644 index 00000000000..ca3e4467bb0 --- /dev/null +++ b/addons/l10n_ar/static/src/js/tours/account.js @@ -0,0 +1,24 @@ +odoo.define('l10n_ar.account_tour', function(require) { +"use strict"; + + let tour = require('web_tour.tour'); + let account_tour = tour.tours.account_tour; + // Remove the step suggesting to change the name as it is done another way (document number) + account_tour.steps = _.filter(account_tour.steps, step => step.trigger != "input[name=name]"); + + // Configure the AFIP Responsibility + let partner_step_idx = _.findIndex(account_tour.steps, step => step.trigger == 'div[name=partner_id] input'); + account_tour.steps.splice(partner_step_idx + 2, 0, { + trigger: "div[name=l10n_ar_afip_responsibility_type_id] input", + extra_trigger: "[name=move_type][raw-value=out_invoice]", + position: "bottom", + content: "Set the AFIP Responsability", + run: "text IVA", + }) + account_tour.steps.splice(partner_step_idx + 3, 0, { + trigger: ".ui-menu-item > a:contains('IVA').ui-state-active", + auto: true, + in_modal: false, + }) + +}) diff --git a/addons/l10n_ar/views/l10n_ar.xml b/addons/l10n_ar/views/l10n_ar.xml new file mode 100644 index 00000000000..08586bf67bf --- /dev/null +++ b/addons/l10n_ar/views/l10n_ar.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="assets_backend" name="account assets" inherit_id="web.assets_backend"> + <xpath expr="." position="inside"> + <script type="text/javascript" src="/l10n_ar/static/src/js/tours/account.js"/> + </xpath> + </template> +</odoo> |
