Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3572 มุมมอง

Odoo SaaS v9

I would like to get the same value of  Issued_total from res.partner for a custom computed field.


I notice that the python code for the Issued_total is 


@api.multi def _compute_issued_total(self): """ Returns the issued total as will be displayed on partner view """ today = fields.Date.context_today(self) for partner in self: domain = partner.get_followup_lines_domain(today, overdue_only=True) issued_total = 0 for aml in self.env['account.move.line'].search(domain): issued_total += aml.amount_residual partner.issued_total = issued_total


How would I make a custom computed field do the equivalent of that python code does? So that I would have the same value as Issued_total would for my custom field?


Please note: I need it to be Odoo SaaS friendly.



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Why this computed field doest not work? แก้ไขแล้ว
1
ธ.ค. 21
6049
2
มี.ค. 24
2591
0
ธ.ค. 23
1314
1
ก.ค. 22
2331
1
พ.ย. 16
10277