Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@codingforfun
Copy link

@codingforfun codingforfun commented Aug 11, 2016

Add option to disable quick create for a complete odoo instance based on the target model of the relation. E.g. for product.product.

Similiar to https://github.com/OCA/server-tools/tree/9.0/base_optional_quick_create but disable quick create completely for that model instead of falling back to full create form.

Same effect as if you would add no_create to all m2x fields in all fields with that target model in their relation.

class IrModel(models.Model):
_inherit = 'ir.model'

disable_quick_create = fields.Boolean('Disable quick create')
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind naming this field avoid_quick_create so users of base_optional_quick_create can easily migrate to your approach (which is more elegant)

Copy link
Author

Choose a reason for hiding this comment

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

I don't mind how the field is called, but base_optional_quick_create is doing something different so there might be people who need both modules. Of course setting both options at once wouldn't make much sense for the same model, but having both options for different models might be a valid use case.
This is why I called it disable_quick_create to enforce the disable vs. avoid character of this approach.

@OSguard
Copy link

OSguard commented Aug 15, 2016

👍

1 similar comment
@pedrobaeza
Copy link
Member

👍

@codingforfun
Copy link
Author

Any further remarks here? Does anyone feel like merging this?

@lasley
Copy link
Contributor

lasley commented Sep 12, 2016

@codingforfun - One comment & will merge after that. Thanks for the excellent contribution 👍

@pedrobaeza pedrobaeza added this to the 8.0 milestone Sep 14, 2016
@lasley lasley merged commit c5fd95d into OCA:8.0 Sep 15, 2016
@codingforfun
Copy link
Author

Thanks

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.

5 participants