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

Hi everyone, i am working on the odoo v18 database upgrade. In v18

* Project 
- Remove the 'analytic_account_id' field from projects 
- Replace it with an analytic notebook allowing to define multiple analytic accounts (one per plan)


I am adding back analytic account at stock move with the below automated rules. However, instead of ONE analytic item is created, now i am getting TWO. Anyone can help me please? 


for record in records:

  analytic_account_id=record.x_project.account_id.id

  for line in record.line_ids:

​#Only include the analytic in the PL lines, so adding if logic

      if line.account_id.id != 841:

        line['analytic_distribution'] = {str(analytic_account_id): 100.0 , 433: 100.0}


Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Nis 25
1925
1
Mar 25
1014
2
Şub 25
1203
2
Eki 22
21248
0
Haz 25
497