Hi,
I'm trying to make the "Cost" field show the last price we purchased products for. In other words, as new POs are made, costs are automatically updated.
Any ideas?
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
1666
أدوات العرض
Hi,
You can inherit the purchase.order model and add the code to change the price of the product in the button_confirm function.
Please refer the code given below:
_inherit = "purchase.order"
def button_confirm(self):
for rec in self.order_line:
rec.product_id.standard_price = rec.price_unit
return super().button_confirm()
Hope it helps
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل
where do i put this code?