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

🌈 details_model_record field refactor #634

Merged

Conversation

KolushovAlexandr
Copy link

No description provided.

@ilmir-k
Copy link

ilmir-k commented Aug 8, 2018

@KolushovAlexandr change the version please

details_res_id = fields.Integer(compute="_compute_details", string='Details', store=True)
details_model_exists = fields.Boolean(compute="_compute_details", string='Details Model Exists', store=True)
details_model = fields.Selection(selection="_model_selection", string='Model', store=True)
details_model_record = fields.Reference(selection="_compute_details_model_record", string='Record')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use _compute prefix for selection

@api.depends('details_model_record')
@api.onchange('details_model_record')
def _compute_details(self):
@api.onchange('details_model_exists', 'details_model_record')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it's onchange and not api.depends?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yelizariev Because it should be updated right on the form

@yelizariev yelizariev merged commit 45aea83 into itpp-labs:11.0 Aug 9, 2018
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

Successfully merging this pull request may close these issues.

None yet

3 participants