コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7471 ビュー

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

アバター
破棄
最善の回答

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


アバター
破棄
著作者

hi Jainesh

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

Thanks

Radek

関連投稿 返信 ビュー 活動
1
1月 24
3212
1
3月 15
4106
5
8月 25
2353
0
12月 22
2151
4
1月 25
15293