mirror of
https://github.com/bringout/oca-ocb-l10n_americas.git
synced 2026-04-26 15:52:01 +02:00
19.0 vanilla
This commit is contained in:
parent
89c6e82fe7
commit
1b82c20a58
572 changed files with 43570 additions and 53303 deletions
|
|
@ -0,0 +1,11 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo import SUPERUSER_ID, api
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
for company in env['res.company'].search([('chart_template', '=', 'ca_2023')], order="parent_path"):
|
||||
fiscal_position = env['account.chart.template'].with_company(company).ref('fiscal_position_template_ns', raise_if_not_found=False)
|
||||
if fiscal_position:
|
||||
fiscal_position.tax_ids = False
|
||||
env['account.chart.template'].try_loading('ca_2023', company)
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
def migrate(cr, version):
|
||||
# Set noupdate property of "account.tax.template" records to False
|
||||
cr.execute(
|
||||
"""UPDATE ir_model_data
|
||||
SET noupdate=false
|
||||
WHERE module='l10n_ca'
|
||||
AND model='account.tax.template'
|
||||
"""
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue