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

hi

I started time tracking on a task then I wanted to save it I get this error.


Incompatible companies on records:
- '/' belongs to company 'PR-xxxx' and 'Partner' (partner_id: 'Radek') belongs to another company.


It seems to me that the issue happens only when the task was created via email.


Any suggestion how to fix that? I am using current Odoo.com

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

Hello Radek Šimčík

@api.model
def _default_company_id(self):
if self._context.get('default_project_id'):

company_id = fields.Many2one('res.company', string='Company', required=True, default=_default_company_id)

It seems to me that the issue happens only when the task was created via email.

Please check.
In Project.task have company field check when your task created from Email, It populated or not .

If not populated then you have to passed company_id field in context via mail.
like this.
'context': dict(
self.env.context,
defualt_company_id=company.id,
),

Thanks & Regards,

Email: odoo@aktivsoftware.com


Skype: kalpeshmaheshwari


Ảnh đại diện
Huỷ bỏ
Tác giả

hi Jainesh

I guess I am not able to do what you proposed on free account, am I.

Thanks

Radek

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 1 24
3177
1
thg 3 15
4097
5
thg 8 25
2334
0
thg 12 22
2139
4
thg 1 25
15288