chore: import enterprise addons 19.0 bulk snapshot

This commit is contained in:
1b-agent committed 2026-09-16 10:13:08 +00:00
commit ca4af030d3
39951 files changed
+15570005

No files matched your search

+1
View File
@@ -0,0 +1 @@
from . import account_accountant_demo
@@ -0,0 +1,47 @@
import time
from odoo import api, models, Command, _
class AccountChartTemplate(models.AbstractModel):
_inherit = "account.chart.template"
@api.model
def _account_accountant_install_demo(self, companies):
if not isinstance(companies, models.BaseModel):
companies = self.env['res.company'].browse(companies)
for company in companies:
self.with_company(company).sudo()._load_data({
'account.move': {
'demo_invoice_deferred': {
'move_type': 'out_invoice',
'partner_id': 'base.res_partner_1',
'invoice_user_id': 'base.user_demo',
'invoice_date': time.strftime('%Y-01-01'),
'invoice_line_ids': [
Command.create({
'name': _('Subscription 12 months'),
'quantity': 1,
'price_unit': 120,
'deferred_start_date': time.strftime('%Y-01-01'),
'deferred_end_date': time.strftime('%Y-12-31'),
}),
]
},
'demo_bill_deferred': {
'move_type': 'in_invoice',
'partner_id': 'base.res_partner_1',
'invoice_user_id': 'base.user_demo',
'invoice_date': time.strftime('%Y-01-01'),
'invoice_line_ids': [
Command.create({
'name': _('Insurance 12 months'),
'quantity': 1,
'price_unit': 1200,
'deferred_start_date': time.strftime('%Y-01-01'),
'deferred_end_date': time.strftime('%Y-12-31'),
}),
]
},
},
})
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<function model="account.chart.template" name="_account_accountant_install_demo">
<value model="res.company" search="[('chart_template', '!=', False)]"/>
</function>
</odoo>