Debian Codegraph @

addons/l10n_ec/demo/account_demo.py

raw
1 # -*- coding: utf-8 -*-
2
3 from odoo import api, models
4
5
6 class AccountChartTemplate(models.AbstractModel):
7 _inherit = "account.chart.template"
8
9 @api.model
10 def _get_demo_data_move(self, company=False):
11 move_data = super()._get_demo_data_move(company)
12 if company.account_fiscal_country_id.code == 'EC':
13 move_data[self.company_xmlid('demo_invoice_1')]['l10n_latam_document_type_id'] = 'l10n_ec.ec_dt_01'
14 move_data[self.company_xmlid('demo_invoice_2')]['l10n_latam_document_type_id'] = 'l10n_ec.ec_dt_01'
15 move_data[self.company_xmlid('demo_invoice_3')]['l10n_latam_document_type_id'] = 'l10n_ec.ec_dt_01'
16 move_data[self.company_xmlid('demo_invoice_followup')]['l10n_latam_document_type_id'] = 'l10n_ec.ec_dt_01'
17 move_data[self.company_xmlid('demo_invoice_8')]['l10n_latam_document_number'] = '001-001-00001'
18 move_data[self.company_xmlid('demo_invoice_equipment_purchase')]['l10n_latam_document_number'] = '001-001-00002'
19 move_data[self.company_xmlid('demo_move_auto_reconcile_1')]['l10n_latam_document_type_id'] = 'l10n_ec.ec_dt_04'
20 move_data[self.company_xmlid('demo_move_auto_reconcile_2')]['l10n_latam_document_type_id'] = 'l10n_ec.ec_dt_04'
21 move_data[self.company_xmlid('demo_move_auto_reconcile_3')]['l10n_latam_document_number'] = '001-001-00003'
22 move_data[self.company_xmlid('demo_move_auto_reconcile_4')]['l10n_latam_document_number'] = '001-001-00004'
23 move_data[self.company_xmlid('demo_move_auto_reconcile_5')]['l10n_latam_document_type_id'] = 'l10n_ec.ec_dt_04'
24 move_data[self.company_xmlid('demo_move_auto_reconcile_6')]['l10n_latam_document_type_id'] = 'l10n_ec.ec_dt_04'
25 move_data[self.company_xmlid('demo_move_auto_reconcile_7')]['l10n_latam_document_type_id'] = 'l10n_ec.ec_dt_04'
26 return move_data