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

Hi,


I am quite new to Odoo and I am trying to create custom field on mrp.workorder model. I have no access to server machine.


My new field will be x_productionweight and what I want to calculate is  x_productionweight = qty_production * x_product_weight. How can I do this? 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I'm just know to it with python code

something like this

@api.depends('qty_production', 'x_product_weight')

def _compute_x_productionweight(self):

​for r in self:

​r.x_productionweight = r.qty_production * r.x_product_weight


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ย. 25
2658
0
ส.ค. 25
211
1
ส.ค. 25
2178
2
ก.ค. 25
8074
2
ก.ค. 25
4525