ใน xml
<button name="price_change" string="Refresh" type="object"/>
ใน .py
โค้ด: เลือกทั้งหมด
def price_change(self, cr, uid, ids, context=None):
price = self.browse(cr, uid, ids, context=context).sqm_price + self.browse(cr, uid, ids, context=context).process_cost
return self.write(cr, uid, ids, {'price_unit': price}, context=context)รูปแนบครับ คืออยากให้ เมื่อกดปุ่ม "Refresh" แล้วให้เอาราคา Glass Price + กับ ราคา Process Cost แล้วนำไป updated ใส่ใน Price Unit
Log in with LINE


