odoo / odoo

Odoo. Open Source Apps To Grow Your Business.

Home Page:https://www.odoo.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[17.0] account: debit, credit can be modified even if is posted (Big, Big Issue)

fmdl opened this issue · comments

Impacted versions: 17.0, 16.0 and maybe other

Steps to reproduce:
Create an account.move with line and balance !=0.
Post entry
Execute record.line_ids.write({'balance':0})
--> Issue debit credit is now zero, WTF !!!!!!

Note: after a migration V8 to V17, if you open (in V17) an posted invoice with an attachment, register_main_attachment is triggered, then a write appear, and sync_line is recomputed (it is useless because the invoice is posted). During the recomputing if there are some mitshmatch data, Odoo update the account.move.line. (same case if you reconcile)

@qdp-odoo @alexis-via @sla-subteno-it @Whenrow

Reset aml
https://github.com/odoo/odoo/assets/16716992/4c9a9914-52db-4d58-b13f-ab1862ee5583

Lines are updated when open invoice
https://github.com/odoo/odoo/assets/16716992/0f03a8d9-e8fd-425b-b5e2-338d6b0b4022

Did you post the entry? maybe the expected behavior is that it can be modified if not posted yet.

Yes on posted entry (see video)