Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Tryton Tryton
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 707
    • Issues 707
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 54
    • Merge requests 54
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TrytonTryton
  • TrytonTryton
  • Issues
  • #4948
Closed
Open
Issue created Sep 02, 2015 by Raimon Esteve@resteve

Buttons list of wizard.State is not copied by deepcopy

I have a module add new class wizard:

class TestClass(Wizard):
__name__ = 'test.class'
start = StateTransition()
picking = StateView('test.class.view',
......
tasktodo = StateTransition()
result = StateView('test.class.result',
'module.test_class_result', [
Button('Done', 'end', 'tryton-ok'),
])

I have three modules inherit TestClass to do more features.

One module, add new btn in result view.

@classmethod
def __setup__(cls):
super(TestClass, cls).__setup__()
# add new button: Save Photo
cls.result.buttons.insert(0,
Button('Save Photo', 'photo', 'tryton-go-next', True))

When I installed three modules inherit TestClass , I detect this new button (Save Photo), are duplicated (three modules = three buttons = three registration class).

It looks like the buttons list of wizard.State is not copied by deepcopy:

http://hg.tryton.org/trytond/file/4ff4668e7f2c/trytond/wizard/wizard.py#l186

( Start feedback in https://groups.google.com/forum/#!topic/tryton/6iSP5hm0oAM )

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking