This question has been flagged
5 Replies
4217 Views

I notice that in odoo 12 the relational field One2many doesn't permit to add automatically a new line. Someone can help?


Avatar
Discard

Why do you decide so? What do you mean by automatic?

check security permissions for relational model, try to add security explicitly for the current user

Author

In odoo 11 when I create a One2many field, it become with a sort of datatable like in java and that permit me to add new row thanks to expression "add a row". but in odoo 12 I can't add new row. this expression "add a row" disappear. i don't know why

Best Answer

Hi,

In the one2many line the option for adding a new line, ie, Add an item, is missing as there is no create permission for the user in the corresponding model.

Suppose if you take the case of the sale.order and sale.order.line, if for the logged in user group have no create permission for the model sale.order.line , then from the user interface the add an item will get disappeared as there is no access for the creation.


To solve this, what you can do is that, as stated in the one of the comment above, give necessary access/permission for the logged in user group. You have to grant the create permission for the user group. Also you can click the Become Super User button, once you activate it, you can see the add an item button without giving the access rights. This is not permanent solution. To activate the super user mode, activate developer mode and click the Debugger button near logged in users name in the menu bar and click the Become Super User.


Thanks

Avatar
Discard
Author Best Answer

In odoo 11 when I create a One2many field, it become with a sort of datatable like in java and that permit me to add new row thanks to expression "add a row". but in odoo 12 I can't add new row. this expression "add a row" disappear. i don't know why

Avatar
Discard