İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
7771 Görünümler

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

Avatar
Vazgeç
En İyi Yanı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


Avatar
Vazgeç
Üretici

hi Jainesh

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

Thanks

Radek

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Oca 24
3789
1
Mar 15
4393
5
Ağu 25
2797
0
Ara 22
2490
4
Oca 25
15741