Debian Codegraph @

addons/l10n_in/demo/account_demo.py

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2 # Part of Odoo. See LICENSE file for full copyright and licensing details.
3 import logging
4 import time
5 from datetime import datetime, timedelta
6
7 from odoo import api, models, Command
8 from odoo.exceptions import UserError, ValidationError
9 from odoo.tools.misc import file_open
10
11 _logger = logging.getLogger(__name__)
12
13
14 class AccountChartTemplate(models.AbstractModel):
15 _inherit = "account.chart.template"
16
17 @api.model
18 def _get_demo_data(self, company=False):
19 demo_data = {}
20 if company.account_fiscal_country_id.code == "IN":
21 if company.state_id:
22 company.write({
23 'l10n_in_is_gst_registered': True,
24 'l10n_in_tcs_feature': True,
25 'l10n_in_tds_feature': True,
26 'l10n_in_edi_production_env': False,
27 })
28 demo_data = {
29 'res.partner.category': self._get_demo_data_res_partner_category(company),
30 'res.partner': self._get_demo_data_partner(),
31 'account.move': self._get_demo_data_move(company),
32 'res.config.settings': self._get_demo_data_config_settings(company),
33 'ir.attachment': self._get_demo_data_attachment(company),
34 'mail.message': self._get_demo_data_mail_message(company),
35 }
36 else:
37 _logger.warning('Error while loading Indian-Accounting demo data in the company "%s".State is not set in the company.', company.name)
38 else:
39 demo_data = super()._get_demo_data(company)
40 return demo_data
41
42 @api.model
43 def _get_demo_data_config_settings(self, company=False):
44 return{
45 'sales_credit_limit':{
46 'account_use_credit_limit': True,
47 'account_default_credit_limit': '10000'
48 }
49 }
50
51 @api.model
52 def _get_demo_data_res_partner_category(self, company=False):
53 return{
54 'res_partner_category_registered': {
55 'name': 'Registered',
56 'color': 2,
57 },
58 'res_partner_category_unregistered': {
59 'name': 'Unregistered',
60 'color': 3,
61 },
62 }
63
64 @api.model
65 def _get_demo_data_partner(self):
66 company = self.env.company
67 if company.account_fiscal_country_id.code != "IN" or not company.state_id:
68 return super()._get_demo_data_partner()
69 inter_state_ref = 'base.state_in_ts'
70 intra_state_ref = 'base.state_in_gj'
71 default_partner_dict = {'country_id': 'base.in', 'is_company': True, 'company_id': company.id}
72 return{
73 'res_partner_registered_customer': {
74 **default_partner_dict,
75 'name': 'B2B Customer Intra State',
76 'category_id': 'res_partner_category_registered',
77 'l10n_in_gst_treatment': 'regular',
78 'street': '201, Second Floor, IT Tower 4',
79 'street2': 'InfoCity Gate - 1, Infocity',
80 'city': 'Gandhinagar',
81 'state_id': 'base.state_in_gj',
82 'zip': '382010',
83 'vat': '24AABCT1332L2ZD',
84 },
85 'res_partner_registered_customer_inter_state': {
86 **default_partner_dict,
87 'name': 'B2B Customer Inter State',
88 'category_id': 'res_partner_category_registered',
89 'l10n_in_gst_treatment': 'regular',
90 'street': 'floor-1, Maddikunta-Ankanpally Village',
91 'street2': 'Post box No 2, NH-65',
92 'city': 'Hyderabad',
93 'state_id': inter_state_ref,
94 'zip': '500014',
95 'vat': '36AAACM4154G1ZO',
96 },
97 'res_partner_unregistered_customer':{
98 **default_partner_dict,
99 'name': 'B2C Customer Intra State',
100 'category_id': 'res_partner_category_unregistered',
101 'l10n_in_gst_treatment': 'unregistered',
102 'street': 'B105, yogeshwar Tower',
103 'state_id': intra_state_ref,
104 'city': 'Rajkot',
105 'zip': '360001'
106 },
107 'res_partner_unregistered_customer_inter_state':{
108 **default_partner_dict,
109 'name': 'B2C Customer Inter State',
110 'category_id': 'res_partner_category_unregistered',
111 'l10n_in_gst_treatment': 'unregistered',
112 'street': '80, Sarojini Devi Road',
113 'city': 'Hyderabad',
114 'state_id': inter_state_ref,
115 'zip': '500003'
116 },
117 'res_partner_registered_supplier_1': {
118 **default_partner_dict,
119 'name': 'Supplier',
120 'category_id': 'res_partner_category_registered',
121 'l10n_in_gst_treatment': 'regular',
122 'street': '19, Ground Floor',
123 'street2': 'Survey Road,Vadipatti',
124 'city': 'Madurai',
125 'state_id': 'base.state_in_tn',
126 'zip': '625218',
127 'vat': '33AACCT6304M1DB',
128 },
129 'res_partner_registered_supplier_2': {
130 **default_partner_dict,
131 'name': 'Odoo In Private Limited',
132 'category_id': 'res_partner_category_registered',
133 'l10n_in_gst_treatment': 'regular',
134 'street': '401, Fourth Floor, IT Tower 4',
135 'street2': 'InfoCity Gate - 1, Infocity',
136 'city': 'Hyderabad',
137 'state_id': inter_state_ref,
138 'zip': '500014',
139 'vat': '36AACCT6304M1ZB',
140 },
141 'res_partner_overseas': {
142 'name': 'Supplier Overseas',
143 'l10n_in_gst_treatment': 'overseas',
144 'street': '142 Street, Rigas building',
145 'street2': 'Survey Road,',
146 'city': 'City',
147 'zip': '000000',
148 'state_id': 'base.state_us_5',
149 'country_id': 'base.us',
150 'is_company': True,
151 'company_id': company.id,
152 },
153 }
154
155 @api.model
156 def _get_demo_data_move(self, company=False):
157 cid = company.id or self.env.company.id
158 def _get_tax_by_id(tax_id):
159 tax = self.env.ref('account.%s_%s'%((cid), (tax_id)))
160 return tax.id
161 if company.account_fiscal_country_id.code == "IN":
162 sale_journal = self.env['account.journal'].search(
163 domain=[
164 *self.env['account.journal']._check_company_domain(cid),
165 ('type', '=', 'sale'),
166 ], limit=1)
167 return {
168 # Demo of B2B (business-to-business) Taxable supplies made to other registered person.
169 self.company_xmlid('demo_invoice_b2b_1'): {
170 'move_type': 'out_invoice',
171 'partner_id': 'res_partner_registered_customer',
172 'invoice_user_id': 'base.user_demo',
173 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
174 'invoice_date': datetime.now(),
175 'l10n_in_gst_treatment': 'regular',
176 'journal_id': sale_journal.id,
177 'invoice_line_ids': [
178 Command.create({
179 'product_id': 'product.product_product_8',
180 'quantity': 2,
181 'price_unit': 40000.0,
182 'tax_ids': [Command.set([_get_tax_by_id('sgst_sale_28')])],
183 }),
184 Command.create({
185 'product_id': 'product.product_product_9',
186 'quantity': 3,
187 'price_unit': 400.0,
188 'tax_ids': [Command.set([_get_tax_by_id('sgst_sale_28'), _get_tax_by_id('cess_5_plus_1591_sale')])],
189 }),
190 Command.create({
191 'product_id': 'product.product_product_10',
192 'quantity': 4,
193 'price_unit': 300.0,
194 'tax_ids':[Command.set([_get_tax_by_id('sgst_sale_18')])],
195 }),
196 ],
197 },
198 self.company_xmlid('demo_invoice_b2b_2'): {
199 'move_type': 'out_invoice',
200 'partner_id': 'res_partner_registered_customer_inter_state',
201 'invoice_user_id': 'base.user_demo',
202 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
203 'invoice_date': datetime.now(),
204 'l10n_in_gst_treatment': 'regular',
205 'journal_id': sale_journal.id,
206 'invoice_line_ids': [
207 Command.create({
208 'product_id': 'product.product_product_9',
209 'quantity': 2,
210 'price_unit': 4000.0,
211 'tax_ids': [Command.set([_get_tax_by_id('igst_sale_5')])],
212 }),
213 Command.create({
214 'product_id': 'product.product_product_10',
215 'quantity': 3,
216 'price_unit': 300.0,
217 'tax_ids': [Command.set([_get_tax_by_id('igst_sale_5')])],
218 }),
219 ],
220 },
221 self.company_xmlid('demo_bill_b2b_1'): {
222 'ref': 'INV/001',
223 'move_type': 'in_invoice',
224 'partner_id': 'res_partner_registered_supplier_2',
225 'invoice_user_id': 'base.user_demo',
226 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
227 'invoice_date': datetime.now(),
228 'invoice_line_ids': [
229 Command.create({
230 'product_id': 'product.consu_delivery_01',
231 'quantity': 1,
232 'price_unit': 1000.0,
233 'tax_ids': [Command.set([_get_tax_by_id('igst_purchase_18')])],
234 }),
235 Command.create({
236 'product_id': 'product.consu_delivery_03',
237 'quantity': 1,
238 'price_unit': 2000.0,
239 'tax_ids': [Command.set([_get_tax_by_id('igst_purchase_18')])],
240 }),
241 ]
242 },
243 self.company_xmlid('demo_bill_b2b_2'): {
244 'ref': 'INV/002',
245 'move_type': 'in_invoice',
246 'partner_id': 'res_partner_registered_supplier_2',
247 'invoice_user_id': 'base.user_demo',
248 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
249 'invoice_date': datetime.now(),
250 'invoice_line_ids': [
251 Command.create({
252 'product_id': 'product.consu_delivery_01',
253 'quantity': 4,
254 'price_unit': 1000.0,
255 'tax_ids': [Command.set([_get_tax_by_id('sgst_purchase_18')])],
256 }),
257 Command.create({
258 'product_id': 'product.consu_delivery_03',
259 'quantity': 3,
260 'price_unit': 2000.0,
261 'tax_ids': [Command.set([_get_tax_by_id('sgst_purchase_18')])],
262 }),
263 ]
264 },
265 self.company_xmlid('demo_bill_b2b_3'): {
266 'ref': 'INV/003',
267 'move_type': 'in_invoice',
268 'partner_id': 'res_partner_registered_supplier_1',
269 'invoice_user_id': 'base.user_demo',
270 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
271 'invoice_date': datetime.now(),
272 'invoice_line_ids': [
273 Command.create({
274 'product_id': 'product.consu_delivery_01',
275 'quantity': 2,
276 'price_unit': 1000.0,
277 'tax_ids': [Command.set([_get_tax_by_id('sgst_purchase_18')])],
278 }),
279 Command.create({
280 'product_id': 'product.consu_delivery_03',
281 'quantity': 3,
282 'price_unit': 2000.0,
283 'tax_ids': [Command.set([_get_tax_by_id('sgst_purchase_18')])],
284 }),
285 ]
286 },
287 self.company_xmlid('demo_invoice_to_extract'): {
288 'move_type': 'in_invoice',
289 'message_main_attachment_id': 'ir_attachment_in_invoice_1',
290 },
291 self.company_xmlid('demo_invoice_service'): {
292 'ref': 'MYS-91021146',
293 'move_type': 'in_invoice',
294 'partner_id': 'res_partner_registered_supplier_2',
295 'invoice_user_id': False,
296 'invoice_date': datetime.now(),
297 'invoice_line_ids': [
298 Command.create({
299 'name': 'Integrated Managed Infrastructure Service',
300 'quantity': 1,
301 'price_unit': 69132.78,
302 'tax_ids': [Command.set([_get_tax_by_id('sgst_purchase_18')])],
303 }),
304 ],
305 'message_main_attachment_id': 'ir_attachment_in_invoice_2',
306 },
307 # Demo of IMP(Import) of supplies.
308 self.company_xmlid('demo_bill_imp'): {
309 'ref': 'BOE/123',
310 'move_type': 'in_invoice',
311 'partner_id': 'res_partner_overseas',
312 'invoice_user_id': 'base.user_demo',
313 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
314 'invoice_date': datetime.now(),
315 'invoice_line_ids': [
316 Command.create({
317 'product_id': 'product.product_product_4',
318 'quantity': 30,
319 'price_unit': 9000.0,
320 'tax_ids': [Command.set([_get_tax_by_id('sgst_purchase_18')])],
321 }),
322 ]
323 },
324 # Demo of cdnr(Credit/ Debit Note for registered business). Create credit note for demo b2b bill.
325 self.company_xmlid('demo_bill_cdnr_1'): {
326 'ref': 'CR/001',
327 'move_type': 'in_refund',
328 'partner_id': 'res_partner_registered_supplier_2',
329 'invoice_user_id': 'base.user_demo',
330 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
331 'invoice_date': datetime.now() - timedelta(days=1),
332 'l10n_in_gst_treatment': 'regular',
333 'invoice_line_ids': [
334 Command.create({
335 'product_id': 'product.consu_delivery_01',
336 'quantity': 1,
337 'price_unit': 1000.0,
338 'tax_ids': [Command.set([_get_tax_by_id('sgst_purchase_18')])],
339 }),
340 Command.create({
341 'product_id': 'product.consu_delivery_03',
342 'quantity': 1,
343 'price_unit': 2000.0,
344 'tax_ids': [Command.set([_get_tax_by_id('sgst_purchase_18')])],
345 }),
346 ]
347 },
348 self.company_xmlid('demo_bill_cdnr_2'): {
349 'ref': '000072',
350 'move_type': 'in_refund',
351 'partner_id': 'res_partner_registered_supplier_1',
352 'invoice_user_id': 'base.user_demo',
353 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
354 'invoice_date': datetime.now(),
355 'l10n_in_gst_treatment': 'regular',
356 'invoice_line_ids': [
357 Command.create({
358 'product_id': 'product.consu_delivery_01',
359 'quantity': 1,
360 'price_unit': 1000.0,
361 'tax_ids': [Command.set([_get_tax_by_id('igst_purchase_18')])],
362 }),
363 ]
364 },
365 # Demo of B2CS (business to consumer small) Taxable supplies made to other unregistered Person and below INR 2.5 lakhs invoice value.
366 self.company_xmlid('demo_invoice_b2cs'): {
367 'move_type': 'out_invoice',
368 'partner_id': 'res_partner_unregistered_customer_inter_state',
369 'invoice_user_id': 'base.user_demo',
370 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
371 'invoice_date': datetime.now(),
372 'l10n_in_gst_treatment': 'consumer',
373 'journal_id': sale_journal.id,
374 'invoice_line_ids': [
375 Command.create({
376 'product_id': 'product.product_product_16',
377 'quantity': 1,
378 'price_unit': 1500.0,
379 'tax_ids': [Command.set([_get_tax_by_id('igst_sale_18')])],
380 }),
381 Command.create({
382 'product_id': 'product.product_product_20',
383 'quantity': 1,
384 'price_unit': 2300.0,
385 'tax_ids': [Command.set([_get_tax_by_id('igst_sale_18')])],
386 }),
387 Command.create({
388 'product_id': 'product.product_product_22',
389 'quantity': 1,
390 'price_unit': 2600.0,
391 'tax_ids': [Command.set([_get_tax_by_id('igst_sale_18')])],
392 }),
393 Command.create({
394 'product_id': 'product.product_product_24',
395 'quantity': 2,
396 'price_unit': 1655.0,
397 'tax_ids': [Command.set([_get_tax_by_id('igst_sale_5')])],
398 }),
399 ]
400 },
401 # Demo of B2CL (business to consumer - Large) Taxable supplies made to other unregistered Person and invoice value is more than INR 2.5 lakhs.
402 self.company_xmlid('demo_invoice_b2cl'): {
403 'move_type': 'out_invoice',
404 'partner_id': 'res_partner_unregistered_customer',
405 'invoice_user_id': 'base.user_demo',
406 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
407 'invoice_date': datetime.now(),
408 'l10n_in_gst_treatment': 'consumer',
409 'journal_id': sale_journal.id,
410 'invoice_line_ids': [
411 Command.create({
412 'product_id': 'product.consu_delivery_01',
413 'quantity': 3,
414 'price_unit': 90000.0,
415 'tax_ids': [Command.set([_get_tax_by_id('sgst_sale_18')])],
416 }),
417 ]
418 },
419 # Demo of EXP(Export) supplies including supplies to SEZ/SEZ Developer or deemed exports.
420 self.company_xmlid('demo_invoice_exp'): {
421 'move_type': 'out_invoice',
422 'partner_id': 'base.res_partner_3',
423 'invoice_user_id': 'base.user_demo',
424 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
425 'invoice_date': datetime.now(),
426 'l10n_in_gst_treatment': 'overseas',
427 'l10n_in_shipping_bill_number': '999704',
428 'l10n_in_shipping_bill_date': time.strftime('%Y-%m-02'),
429 'l10n_in_shipping_port_code_id': 'l10n_in.port_code_inixy1',
430 'journal_id': sale_journal.id,
431 'invoice_line_ids': [
432 Command.create({
433 'product_id': 'product.product_product_4',
434 'quantity': 30,
435 'price_unit': 8000.0,
436 'tax_ids': [Command.set([_get_tax_by_id('igst_sale_18_sez_exp')])],
437 }),
438 ]
439 },
440 # Demo of exempt(Nil Rated, Exempted and Non GST supplies). Set Nill rated and Exempted tax in line.
441 self.company_xmlid('demo_invoice_nill'): {
442 'move_type': 'out_invoice',
443 'partner_id': 'res_partner_registered_customer',
444 'invoice_user_id': 'base.user_demo',
445 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
446 'invoice_date': datetime.now(),
447 'l10n_in_gst_treatment': 'regular',
448 'journal_id': sale_journal.id,
449 'invoice_line_ids': [
450 Command.create({
451 'product_id': 'product.product_product_1',
452 'quantity': 2,
453 'price_unit': 25000.0,
454 'tax_ids': [Command.set([_get_tax_by_id('exempt_sale')])],
455 }),
456 Command.create({
457 'product_id': 'product.product_product_5',
458 'quantity': 1,
459 'price_unit': 400.0,
460 'tax_ids': [Command.set([_get_tax_by_id('nil_rated_sale')])],
461 }),
462 ]
463 },
464 # Demo of cdnr(Credit/ Debit Note for registered person). Create credit note for demo b2b invoice.
465 self.company_xmlid('demo_invoice_cdnr_1'): {
466 'move_type': 'out_refund',
467 'partner_id': 'res_partner_registered_customer',
468 'invoice_user_id': 'base.user_demo',
469 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
470 'invoice_date': datetime.now(),
471 'l10n_in_gst_treatment': 'regular',
472 'reversed_entry_id': 'demo_invoice_b2b_1',
473 'journal_id': sale_journal.id,
474 'invoice_line_ids': [
475 Command.create({
476 'product_id': 'product.product_product_8',
477 'quantity': 2,
478 'price_unit': 40000.0,
479 'tax_ids': [Command.set([_get_tax_by_id('sgst_sale_28')])],
480 }),
481 Command.create({
482 'product_id': 'product.product_product_9',
483 'quantity': 3,
484 'price_unit': 400.0,
485 'tax_ids': [Command.set([_get_tax_by_id('sgst_sale_28'), _get_tax_by_id('cess_5_plus_1591_sale')])],
486 }),
487 Command.create({
488 'product_id': 'product.product_product_10',
489 'quantity': 4,
490 'price_unit': 300.0,
491 'tax_ids': [Command.set([_get_tax_by_id('sgst_sale_18')])],
492 }),
493 ]
494 },
495 self.company_xmlid('demo_invoice_cdnr_2'): {
496 'move_type': 'out_refund',
497 'partner_id': 'res_partner_registered_customer',
498 'invoice_user_id': 'base.user_demo',
499 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
500 'invoice_date': datetime.now(),
501 'l10n_in_gst_treatment': 'regular',
502 'journal_id': sale_journal.id,
503 'invoice_line_ids': [
504 Command.create({
505 'product_id': 'product.consu_delivery_01',
506 'quantity': 1,
507 'price_unit': 1000.0,
508 'tax_ids': [Command.set([_get_tax_by_id('sgst_sale_18')])],
509 }),
510 Command.create({
511 'product_id': 'product.consu_delivery_03',
512 'quantity': 1,
513 'price_unit': 2000.0,
514 'tax_ids': [Command.set([_get_tax_by_id('sgst_sale_18')])],
515 }),
516 ]
517 },
518 # Demo of cdnr(Credit/ Debit Note for unregistered person). Create credit note for demo b2cl invoice.
519 self.company_xmlid('demo_invoice_cdnur'): {
520 'move_type': 'out_refund',
521 'partner_id': 'res_partner_unregistered_customer',
522 'invoice_user_id': 'base.user_demo',
523 'invoice_payment_term_id': 'account.account_payment_term_end_following_month',
524 'invoice_date': datetime.now(),
525 'l10n_in_gst_treatment': 'consumer',
526 'reversed_entry_id': 'demo_invoice_b2cl',
527 'journal_id': sale_journal.id,
528 'invoice_line_ids': [
529 Command.create({
530 'product_id': 'product.consu_delivery_01',
531 'quantity': 3,
532 'price_unit': 90000.0,
533 'tax_ids': [Command.set([_get_tax_by_id('sgst_sale_18')])],
534 }),
535 ]
536 },
537 }
538 else:
539 return super()._get_demo_data_move(company)
540
541 @api.model
542 def _get_demo_data_attachment(self, company=False):
543 if company.account_fiscal_country_id.code == "IN":
544 return{
545 'ir_attachment_in_invoice_1': {
546 'type': 'binary',
547 'name': 'in_invoice_demo_1.pdf',
548 'res_model': 'account.move',
549 'res_id': 'demo_invoice_to_extract',
550 'raw': file_open(
551 'l10n_in/static/demo/in_invoice_demo_1.pdf', 'rb'
552 ).read()
553 },
554 'ir_attachment_in_invoice_2': {
555 'type': 'binary',
556 'name': 'in_invoice_demo_2.pdf',
557 'res_model': 'account.move',
558 'res_id': 'demo_invoice_service',
559 'raw': file_open(
560 'l10n_in/static/demo/in_invoice_demo_2.pdf', 'rb'
561 ).read()
562 }
563 }
564 else:
565 return super()._get_demo_data_attachment(company)
566
567
568 @api.model
569 def _get_demo_data_mail_message(self, company=False):
570 if company.account_fiscal_country_id.code == "IN":
571 return {
572 'mail_message_in_invoice_1': {
573 'model': 'account.move',
574 'res_id': 'demo_invoice_to_extract',
575 'body': 'Vendor Bill attachment',
576 'message_type': 'comment',
577 'author_id': 'base.partner_demo',
578 'attachment_ids': [Command.set([
579 'ir_attachment_in_invoice_1',
580 ])]
581 },
582 'mail_message_in_invoice_2': {
583 'model': 'account.move',
584 'res_id': 'demo_invoice_service',
585 'body': 'Vendor Bill attachment',
586 'message_type': 'comment',
587 'author_id': 'base.partner_demo',
588 'attachment_ids': [Command.set([
589 'ir_attachment_in_invoice_2',
590 ])]
591 },
592 }
593 else:
594 return super()._get_demo_data_mail_message(company)
595
596 def _post_load_demo_data(self, company=False):
597 if company.account_fiscal_country_id.code == "IN":
598 if company.state_id:
599 invoices = (
600 self.ref('demo_invoice_b2b_1')
601 + self.ref('demo_invoice_b2b_2')
602 + self.ref('demo_invoice_b2cs')
603 + self.ref('demo_invoice_b2cl')
604 + self.ref('demo_invoice_exp')
605 + self.ref('demo_invoice_nill')
606 + self.ref('demo_invoice_cdnr_1')
607 + self.ref('demo_invoice_cdnr_2')
608 + self.ref('demo_invoice_cdnur')
609 + self.ref('demo_bill_b2b_1')
610 + self.ref('demo_bill_b2b_2')
611 + self.ref('demo_bill_b2b_3')
612 + self.ref('demo_bill_imp')
613 + self.ref('demo_bill_cdnr_1')
614 + self.ref('demo_bill_cdnr_2')
615 + self.ref('demo_invoice_service')
616 )
617 for move in invoices:
618 try:
619 move.action_post()
620 except (UserError, ValidationError):
621 _logger.exception('Error while posting demo data')
622 else:
623 return super()._post_load_demo_data(company)