summaryrefslogtreecommitdiff
path: root/addons/l10n_in
diff options
context:
space:
mode:
authorAnkita Raval <anr@odoo.com>2019-10-30 06:11:02 +0000
committerJigar Vaghela <jva@odoo.com>2020-02-19 09:09:20 +0000
commitd675dbaa4c7174591e0e7c1a3caf3e76877312ce (patch)
tree40840df0a36cb9a6ba3b918835da2a40a07e3a3b /addons/l10n_in
parent8f6bf2087e50020bfad4e336b1d4c5a98a4fa84f (diff)
[IMP] account,* : Change type field to move_type in account.move
task-id: 2028z813
Diffstat (limited to 'addons/l10n_in')
-rw-r--r--addons/l10n_in/data/account_invoice_demo.xml16
-rw-r--r--addons/l10n_in/report/account_invoice_report.py10
-rw-r--r--addons/l10n_in/views/account_invoice_views.xml10
-rw-r--r--addons/l10n_in/views/report_invoice.xml12
4 files changed, 24 insertions, 24 deletions
diff --git a/addons/l10n_in/data/account_invoice_demo.xml b/addons/l10n_in/data/account_invoice_demo.xml
index cbe683333fa..f4607661fd2 100644
--- a/addons/l10n_in/data/account_invoice_demo.xml
+++ b/addons/l10n_in/data/account_invoice_demo.xml
@@ -3,7 +3,7 @@
<!-- Demo of B2B (business-to-business) Taxable supplies made to other registered person.-->
<record id="demo_invoice_b2b" model="account.move">
- <field name="type">out_invoice</field>
+ <field name="move_type">out_invoice</field>
<field name="partner_id" ref="l10n_in.res_partner_registered_customer"/>
<field name="l10n_in_reseller_partner_id" ref="l10n_in.res_partner_reseller"/>
<field name="invoice_user_id" ref="base.user_demo"/>
@@ -48,7 +48,7 @@
<!-- Demo of B2CS (business to consumer small) Taxable supplies made to other unregistered Person and below INR 2.5 lakhs invoice value.-->
<record id="demo_invoice_b2cs" model="account.move">
- <field name="type">out_invoice</field>
+ <field name="move_type">out_invoice</field>
<field name="partner_id" ref="l10n_in.res_partner_unregistered_customer"/>
<field name="invoice_user_id" ref="base.user_demo"/>
<field name="invoice_payment_term_id" ref="account.account_payment_term_end_following_month"/>
@@ -95,7 +95,7 @@
<!-- Demo of B2CL (business to consumer - Large) Taxable supplies made to other unregistered Person and invoice value is more than INR 2.5 lakhs.-->
<record id="demo_invoice_b2cl" model="account.move">
- <field name="type">out_invoice</field>
+ <field name="move_type">out_invoice</field>
<field name="partner_id" ref="l10n_in.res_partner_unregistered_customer_out_state"/>
<field name="invoice_user_id" ref="base.user_demo"/>
<field name="invoice_payment_term_id" ref="account.account_payment_term_end_following_month"/>
@@ -115,7 +115,7 @@
<!-- Demo of EXP(Export) supplies including supplies to SEZ/SEZ Developer or deemed exports.-->
<record id="demo_invoice_exp" model="account.move">
- <field name="type">out_invoice</field>
+ <field name="move_type">out_invoice</field>
<field name="partner_id" ref="base.res_partner_3"/>
<field name="invoice_user_id" ref="base.user_demo"/>
<field name="invoice_payment_term_id" ref="account.account_payment_term_end_following_month"/>
@@ -145,7 +145,7 @@
<!-- Demo of exemp(Nil Rated, Exempted and Non GST supplies). Set Nill rated and Exempted tax in line.-->
<record id="demo_invoice_nill" model="account.move">
- <field name="type">out_invoice</field>
+ <field name="move_type">out_invoice</field>
<field name="partner_id" ref="l10n_in.res_partner_registered_customer"/>
<field name="invoice_user_id" ref="base.user_demo"/>
<field name="invoice_payment_term_id" ref="account.account_payment_term_end_following_month"/>
@@ -172,7 +172,7 @@
<!-- Demo of cdnr(Credit/ Debit Note for registered person). Create credit note for demo b2b invoice.-->
<record id="demo_invoice_cdnr" model="account.move">
- <field name="type">out_refund</field>
+ <field name="move_type">out_refund</field>
<field name="partner_id" ref="l10n_in.res_partner_registered_customer"/>
<field name="l10n_in_reseller_partner_id" ref="l10n_in.res_partner_reseller"/>
<field name="invoice_user_id" ref="base.user_demo"/>
@@ -218,7 +218,7 @@
<!-- Demo of cdnr(Credit/ Debit Note for unregistered person). Create credit note for demo b2cl invoice.-->
<record id="demo_invoice_cdnur" model="account.move">
- <field name="type">out_refund</field>
+ <field name="move_type">out_refund</field>
<field name="partner_id" ref="l10n_in.res_partner_unregistered_customer"/>
<field name="invoice_user_id" ref="base.user_demo"/>
<field name="invoice_payment_term_id" ref="account.account_payment_term_end_following_month"/>
@@ -240,7 +240,7 @@
<!-- Demo of atadj(Advance adjustments). When invoice is reconcile against Advance payment.
Reconciled invoice consideration for which payment have been received in the past months.-->
<record id="demo_invoice_atadj" model="account.move">
- <field name="type">out_invoice</field>
+ <field name="move_type">out_invoice</field>
<field name="partner_id" ref="l10n_in.res_partner_registered_customer"/>
<field name="invoice_user_id" ref="base.user_demo"/>
<field name="invoice_payment_term_id" ref="account.account_payment_term_end_following_month"/>
diff --git a/addons/l10n_in/report/account_invoice_report.py b/addons/l10n_in/report/account_invoice_report.py
index 65a98083b4b..fc8de7c7cfa 100644
--- a/addons/l10n_in/report/account_invoice_report.py
+++ b/addons/l10n_in/report/account_invoice_report.py
@@ -126,7 +126,7 @@ class L10nInAccountInvoiceReport(models.Model):
am.amount_total AS total,
am.journal_id,
aj.company_id,
- am.type AS move_type,
+ am.move_type AS move_type,
am.reversed_entry_id AS reversed_entry_id,
p.vat AS partner_vat,
CASE WHEN rp.vat IS NULL THEN '' ELSE rp.vat END AS ecommerce_vat,
@@ -140,7 +140,7 @@ class L10nInAccountInvoiceReport(models.Model):
THEN concat(cps.l10n_in_tin,'-',cps.name)
ELSE ''
END) AS place_of_supply,
- (CASE WHEN am.type in ('out_refund', 'in_refund') and refund_am.date <= to_date('2017-07-01', 'YYYY-MM-DD')
+ (CASE WHEN am.move_type in ('out_refund', 'in_refund') and refund_am.date <= to_date('2017-07-01', 'YYYY-MM-DD')
THEN 'Y'
ELSE 'N'
END) as is_pre_gst,
@@ -187,9 +187,9 @@ class L10nInAccountInvoiceReport(models.Model):
WHEN am.l10n_in_export_type = 'sez_without_igst'
THEN 'SEZ without IGST payment'
END) AS b2b_type,
- (CASE WHEN am.type = 'out_refund'
+ (CASE WHEN am.move_type = 'out_refund'
THEN 'C'
- WHEN am.type = 'in_refund'
+ WHEN am.move_type = 'in_refund'
THEN 'D'
ELSE ''
END) as refund_invoice_type,
@@ -232,7 +232,7 @@ class L10nInAccountInvoiceReport(models.Model):
THEN NULL
ELSE (CASE WHEN aml.tax_base_amount <> 0 THEN aml.tax_base_amount ELSE NULL END)
END AS price_total,
- (CASE WHEN aj.type = 'sale' AND (am.type IS NULL OR am.type != 'out_refund') THEN -1 ELSE 1 END) AS amount_sign,
+ (CASE WHEN aj.type = 'sale' AND (am.move_type IS NULL OR am.move_type != 'out_refund') THEN -1 ELSE 1 END) AS amount_sign,
(CASE WHEN atr.parent_tax IS NOT NULL THEN atr.parent_tax
ELSE at.id END) AS tax_id,
(CASE WHEN atr.parent_tax IS NOT NULL THEN parent_at.amount
diff --git a/addons/l10n_in/views/account_invoice_views.xml b/addons/l10n_in/views/account_invoice_views.xml
index 41549a72267..676159126a0 100644
--- a/addons/l10n_in/views/account_invoice_views.xml
+++ b/addons/l10n_in/views/account_invoice_views.xml
@@ -9,19 +9,19 @@
<group string="Import/Export India">
<field name="l10n_in_import_export" invisible="1"/>
<field name="l10n_in_export_type"
- attrs="{'invisible': [('l10n_in_import_export', '!=', True), ('type', 'not in', ('out_invoice', 'out_refund'))]}"/>
+ attrs="{'invisible': [('l10n_in_import_export', '!=', True), ('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<field name="l10n_in_shipping_bill_number"
- attrs="{'invisible': [('l10n_in_import_export', '!=', True), ('type', 'not in', ('out_invoice', 'out_refund'))]}"/>
+ attrs="{'invisible': [('l10n_in_import_export', '!=', True), ('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<field name="l10n_in_shipping_bill_date"
- attrs="{'invisible': [('l10n_in_import_export', '!=', True), ('type', 'not in', ('out_invoice', 'out_refund'))]}"/>
+ attrs="{'invisible': [('l10n_in_import_export', '!=', True), ('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<field name="l10n_in_shipping_port_code_id"
- attrs="{'invisible': [('l10n_in_import_export', '!=', True), ('type', 'not in', ('out_invoice', 'out_refund'))]}"/>
+ attrs="{'invisible': [('l10n_in_import_export', '!=', True), ('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
</group>
</xpath>
<xpath expr="//field[@name='partner_id']" position="after">
<field name="l10n_in_reseller_partner_id"
groups="l10n_in.group_l10n_in_reseller"
- attrs="{'invisible': [('type', 'not in', ('out_invoice', 'out_refund'))]}"
+ attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"
/>
</xpath>
</field>
diff --git a/addons/l10n_in/views/report_invoice.xml b/addons/l10n_in/views/report_invoice.xml
index 80a58ee145e..0856519ad66 100644
--- a/addons/l10n_in/views/report_invoice.xml
+++ b/addons/l10n_in/views/report_invoice.xml
@@ -26,12 +26,12 @@
<xpath expr="//h2" position="replace">
<h2>
- <span t-if="o.type == 'out_invoice' and o.state in ('open', 'in_payment', 'paid')" t-field="o.journal_id.name"/>
- <span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft <span t-field="o.journal_id.name"/></span>
- <span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Cancelled <span t-field="o.journal_id.name"/></span>
- <span t-if="o.type == 'out_refund'">Credit Note</span>
- <span t-if="o.type == 'in_refund'">Vendor Credit Note</span>
- <span t-if="o.type == 'in_invoice'">Vendor Bill</span>
+ <span t-if="o.move_type == 'out_invoice' and o.state in ('open', 'in_payment', 'paid')" t-field="o.journal_id.name"/>
+ <span t-if="o.move_type == 'out_invoice' and o.state == 'draft'">Draft <span t-field="o.journal_id.name"/></span>
+ <span t-if="o.move_type == 'out_invoice' and o.state == 'cancel'">Cancelled <span t-field="o.journal_id.name"/></span>
+ <span t-if="o.move_type == 'out_refund'">Credit Note</span>
+ <span t-if="o.move_type == 'in_refund'">Vendor Credit Note</span>
+ <span t-if="o.move_type == 'in_invoice'">Vendor Bill</span>
<span t-field="o.name"/>
</h2>
</xpath>