Daily updates from Odoo
Tuesday, January 27, 2026
2 changes
1 change
Resolved issues and error corrections
This update fixes a critical accounting error related to Deferred GST (DGST) reporting in Australia. By reversing the tax rate, the system now correctly identifies DGST as a liability, ensuring accurate financial reporting. The changes also improve the display of BAS statements and add support for a key reporting line.
Original PR description
Prior to this commit, the Deferred GST (DGST) tax was configured with a positive rate. When applied to a Vendor Bill, this generated a Debit entry, incorrectly treating the tax as a Receivable rather…
Prior to this commit, the Deferred GST (DGST) tax was configured with a positive rate. When applied to a Vendor Bill, this generated a Debit entry, incorrectly treating the tax as a Receivable rather than a Liability to the ATO. This commit corrects the accounting and reporting logic by: - Inverting the tax rate: The tax now generates a Credit entry on Vendor Bills, correctly recording the Deferred GST as a liability in the General Ledger. - Adjusting BAS formulas: Updated the formulas for labels 7 and 7A to display a positive liability amount on the statement following the change in 1. - Adding Label 7A: Added support for the Deferred GST (7A) line to BAS variations where it was missing. - Reordering WET: Updated the Wine Equalisation Tax (WET) sequence so it no longer appears at the top of the list, as it is not applicable to all businesses. Task-5870092 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245368
1 change
Resolved issues and error corrections
This update resolves a critical issue preventing upgrades for the Dutch accounting module (l10n_nl) due to a conflict between fiscal position creation and account setup. Setting `force_create=True` allows the upgrade to proceed without errors related to missing Dutch accounts. Further investigation suggests this change is a temporary solution while the root cause of the account creation problem is addressed.
Original PR description
`force_create` must be `True` because there are fiscal positions being created that assume the existence of some Dutch accounts. If these accounts don't exist, the ORM will attempt to create fiscal…
`force_create` must be `True` because there are fiscal positions being created that assume the existence of some Dutch accounts. If these accounts don't exist, the ORM will attempt to create fiscal positions with `NULL` values in columns that require `NOT NULL`.
I am still looking into why the fiscal positions are created, while accounts aren't, but I found that setting `force_create=True` solves the problem. Given the argumentation behind having it set to `False`:
> The goal is that we do not need to be more accurate on what we need to update when updating the CoA
(https://github.com/odoo/odoo/commit/a3c57b4f0198236b04486d336d56b25de74677b8)
I believe we can safely set it `True` in order to unblock numerous failing upgrades, for now.
Moreover, I suspect that further investigation into this issue will show that we shouldn't be setting `force_create=False`, ever, therefore rendering the newly introduced argument redundant.
Example traceback from [upg-2736856](https://upgrade.odoo.com/web#id=2736856&cids=1&model=upgrade.request&view_type=form&menu_id=107):
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/18.0/odoo/service/server.py", line 1321, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-13>", line 2, in new
File "/home/odoo/src/odoo/18.0/odoo/tools/func.py", line 97, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/18.0/odoo/modules/registry.py", line 127, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 515, in load_modules
migrations.migrate_module(package, 'end')
File "/home/odoo/src/odoo/18.0/odoo/modules/migration.py", line 254, in migrate_module
mod.migrate(self.cr, installed_version)
File "/home/odoo/src/odoo/18.0/addons/l10n_nl/migrations/3.4/end-migrate.py", line 7, in migrate
env['account.chart.template'].try_loading('nl', company, force_create=False)
File "/home/odoo/src/odoo/18.0/addons/account/models/chart_template.py", line 160, in try_loading
return self._load(template_code, company, install_demo, force_create)
File "/home/odoo/src/odoo/18.0/addons/account/models/chart_template.py", line 227, in _load
self._load_data(data)
File "/tmp/tmpw4wedv5j/migrations/account/0.0.0/pre-ensure-deferred-accounts.py", line 36, in _load_data
return super()._load_data(data, *args, **kwargs)
File "/home/odoo/src/odoo/18.0/addons/account/models/chart_template.py", line 653, in _load_data
created_records[model] = self.with_context(lang='en_US').env[model]._load_records(all_records_vals, ignore_duplicates=ignore_duplicates)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5489, in _load_records
data['record']._load_records_write(data['values'])
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5407, in _load_records_write
self.write(values)
File "/home/odoo/src/odoo/18.0/addons/base_vat/models/account_fiscal_position.py", line 19, in write
return super().write(vals)
File "/home/odoo/src/odoo/18.0/addons/account/models/partner.py", line 196, in write
return super(AccountFiscalPosition, self).write(vals)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 4794, in write
field.write(self, value)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 4508, in write
self.write_batch([(records, value)])
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 4529, in write_batch
self.write_real(records_commands_list, create)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 4725, in write_real
flush()
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 4680, in flush
comodel.create(to_create)
File "<decorator-gen-120>", line 2, in create
File "/home/odoo/src/odoo/18.0/odoo/api.py", line 496, in _model_create_multi
return create(self, arg)
File "/tmp/tmpw4wedv5j/migrations/util/orm.py", line 248, in wrapper
return f(*args, **kwargs)
File "/tmp/tmpw4wedv5j/migrations/base/0.0.0/pre-models-match_uniq.py", line 25, in create
return super().create(vals_list)
File "<decorator-gen-31>", line 2, in create
File "/home/odoo/src/odoo/18.0/odoo/api.py", line 496, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5020, in create
records = self._create(data_list)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5204, in _create
cr.execute(SQL(
File "/home/odoo/src/odoo/18.0/odoo/sql_db.py", line 354, in execute
res = self._obj.execute(query, params)
psycopg2.errors.NotNullViolation: null value in column "account_src_id" of relation "account_fiscal_position_account" violates not-null constraint
DETAIL: Failing row contains (16, 4, 1, null, null, 1, 1, 2025-04-07 06:42:17.6166, 2025-04-07 06:42:17.6166).
```