Issue 10494

Title
Crash scenario account_fr that you cannot modify posted move "2"
Priority
bug
Status
resolved
Nosy list
ced, resteve, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2021-06-08.12:26:00 by resteve, last changed 3 weeks ago by roundup-bot.

Messages

New changeset 723c3beefbf9 by Cédric Krier in branch 'default':
Open move as balance action
https://hg.tryton.org/tryton-env/rev/723c3beefbf9
New changeset 33ff022b4928 by Cédric Krier in branch 'default':
Open move as balance action
https://hg.tryton.org/modules/analytic_account/rev/33ff022b4928
New changeset a20f2eac6af7 by Cédric Krier in branch 'default':
Open move as balance action
https://hg.tryton.org/modules/account_fr/rev/a20f2eac6af7
New changeset 3df66b89233b by Cédric Krier in branch 'default':
Open move as balance action
https://hg.tryton.org/modules/account/rev/3df66b89233b
Author: [hidden] (resteve)
Date: 2021-06-08.12:26:00
File "/home/raimon/projectes/nandev/nancore/trytond/trytond/modules/account_fr/tests/scenario_fec.rst", line 187, in scenario_fec.rst
Failed example:
    move_line.move.click('post')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.7/doctest.py", line 1329, in __run
        compileflags, 1), test.globs)
      File "<doctest scenario_fec.rst[118]>", line 1, in <module>
        move_line.move.click('post')
      File "/home/raimon/projectes/nandev/nancore/proteus/proteus/__init__.py", line 102, in newfunc
        return self.func(owner, [instance], *args, **kwargs)
      File "/home/raimon/projectes/nandev/nancore/proteus/proteus/__init__.py", line 908, in click
        return getattr(proxy, button)([r.id for r in records], context)
      File "/home/raimon/projectes/nandev/nancore/proteus/proteus/config.py", line 188, in __call__
        result = rpc.result(meth(*args, **kwargs))
      File "/home/raimon/projectes/nandev/nancore/trytond/trytond/model/modelview.py", line 774, in wrapper
        return func(cls, records, *args, **kwargs)
      File "/home/raimon/projectes/nandev/nancore/trytond/trytond/modules/account/move.py", line 442, in post
        cls.save(moves)
      File "/home/raimon/projectes/nandev/nancore/trytond/trytond/model/descriptors.py", line 33, in newfunc
        return self.func(owner, *args, **kwargs)
      File "/home/raimon/projectes/nandev/nancore/trytond/trytond/model/modelstorage.py", line 1792, in save
        (([r], save_values[r]) for r in to_write), ()))
      File "/home/raimon/projectes/nandev/nancore/trytond/trytond/modules/account/move.py", line 263, in write
        cls.check_modify(moves)
      File "/home/raimon/projectes/nandev/nancore/trytond/trytond/modules/account/move.py", line 239, in check_modify
        move=move.rec_name))
    trytond.model.modelstorage.AccessError: You cannot modify posted move "2". - 

Debug:

> <doctest scenario_fec.rst[118]>(1)<module>()->None
-> import pdb;pdb.set_trace()
(Pdb) move_line.state
'valid'
(Pdb) move_line.move.state
'posted'
(Pdb) move_line.move.click('post')
*** trytond.model.modelstorage.AccessError: You cannot modify posted move "2". -
History
Date User Action Args
2021-07-02 11:51:41roundup-botsetmessages: + msg68512
2021-07-02 11:50:32roundup-botsetmessages: + msg68511
2021-07-02 11:50:27roundup-botsetmessages: + msg68510
2021-07-02 11:50:25roundup-botsetmessages: + msg68509
nosy: + roundup-bot
status: testing -> resolved
2021-06-21 18:03:54reviewbotsetmessages: + msg68374
2021-06-21 17:31:07cedsetkeyword: - backport
2021-06-17 13:05:44reviewbotsetmessages: + msg68326
nosy: + reviewbot
2021-06-17 12:57:35cedsetkeyword: + backport, review
reviews: 369161002
status: in-progress -> testing
2021-06-17 12:56:13cedsetassignedto: ced
component: + account, - account_fr
nosy: + ced
status: unread -> in-progress
2021-06-10 08:33:40pokolisetstatus: chatting -> unread
2021-06-08 12:26:00restevecreate