跳至内容
菜单
此问题已终结
5 回复
4875 查看

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


形象
丢弃

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

编写者

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

最佳答案

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

形象
丢弃
编写者 最佳答案

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

形象
丢弃