Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Instantiate Books properly #5

Open
pierre-malis-coopengo opened this issue Oct 24, 2019 · 0 comments
Open

Cannot Instantiate Books properly #5

pierre-malis-coopengo opened this issue Oct 24, 2019 · 0 comments

Comments

@pierre-malis-coopengo
Copy link

Cannot Instantiate Books using the book form
This is because exmplary needs to have a unique identifer
This is because the One2Many exemplaries field has a wrong default value
Possible solution:
go from

    @classmethod
    def default_exemplaries(cls):
        return [{}]

to

    @classmethod
    def default_exemplaries(cls):
        return []

https://github.com/coopengo/tryton-training/blob/5.0/step10/modules/library/library.py

this issue is simple to understand but might affect quite a lot of branches
this is especially troubling toward the end of the tutorial since the book form has been stripped from the exemplary page:

https://github.com/coopengo/tryton-training/blob/5.0/step10/modules/library/view/book_form.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant