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

I have one model name sales.target and another three model name month.target.line, quarter.target.line and year.target.line

 

And in sales.target model I've three one2many field for above specified model:
yearly_target_ids = fields.One2many('year.target.line', 'sales_target_id', string="Yearly Target")
quarter_target_ids = fields.One2many('quarter.target.line', 'sales_target_id', string='Quarterly Target',store=True , readonly=False)
month_target_ids = fields.One2many('month.target.line', 'sales_target_id',string='Month',store=True,readonly=False)

 


I've used this fields in compute function also.

 

And my access rights are defined like below:
access_sales_target_manager,access_sales_target_manager,model_sales_target,sales_team.group_sale_manager,1,1,1,1
access_sales_target_manager_3,access_sales_target_manager_3,model_month_target_line,sales_team.group_sale_manager,1,1,1,1
access_sales_target_manager_8,access_sales_target_manager_8,model_year_target_line,sales_team.group_sale_manager,1,1,1,1
access_sales_target_manager_1,access_sales_target_manager_1,model_quarter_target_line,sales_team.group_sale_manager,1,1,1,1
access_sales_target_salesman,access_sales_target_salesman,model_sales_target,sales_team.group_sale_salesman,1,0,0,0
access_sales_target_salesman_1,access_sales_target_salesman_1,model_quarter_target_line,sales_team.group_sale_salesman,1,0,0,0
access_sales_target_salesman_3,access_sales_target_salesman_3,model_month_target_line,sales_team.group_sale_salesman,1,0,0,0
access_sales_target_salesman_8,access_sales_target_salesman_8,model_year_target_line,sales_team.group_sale_salesman,1,0,0,0

 

it giving acess error 



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

Hi,

As you haven't shared the error message with the question, its not easy to read all code and provide the suggestion.

You can make sure of the below points:

* Ensure you have defined sales_target_id field in the one2many co-models

* When ID's are given in access right file, full external id of record are given


--> One2many field in odoo

--> Access rights in odoo

Thanks

Ảnh đại diện
Huỷ bỏ