Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5016 Lượt xem

I`m trying to figure out what are "can_create" and "can_write" field attributes for?


Specially in the context of Tracking Values. Thank you in advance.

<tree string="Tracking Value">     
<field name="mail_message_id" can_create="true" can_write="true" modifiers="{'required': true}"/></tree>
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Can create, it will allow the user to create new record

Can write, it will allow the user to edit the record

Thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

from the first glance it seems that it has something with no_create and no_create_edit options

you can apply this on a m2o field and try  to see the different cases possible 

<field name="course_id" options="{'no_create': False, 'no_create_edit':False}" can_create="True" can_write="True" />

in brief:

  • can_write: allow the edition of related records (default: true) 

  • can_create: allow the creation of related records (take precedence over no_create option),Same as can_write but adds an extra global setting for anonymous access (ANONYMOUS_CREATE)

https://www.odoo.com/documentation/13.0/reference/javascript_reference.html#relational-fields
gd luck!!!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 18
7170
0
thg 4 18
2779
0
thg 8 22
2292
1
thg 7 22
19997
0
thg 4 22
2966