class item(models.Model):
_name = 'item'
#_inherit = 'technical'
product = fields.Many2one('product.product', string='Product Name' ,change_default=True)
qty_deliver = fields.Integer(compute="_qtydelivery", string='Quantity Delivered')
----------------------------------------------------------------------------------
@api.one
def _qtydelivery(self):
if self.product == delivery_technical .product_technical:
self.qty_delivered = delivery_technical .product_qty_delivered
----------------------------------------------------------------------------------
class delivery_technical(models.Model):
_name = 'technical'
product_technical = fields.Many2one('product.product', string='Product Name' ,change_default=True,)
product_qty_delivered = fields.Integer(string='Quantity Delivered')
I want the function if the products in both classes were equal to the field value of the qty_delivere.
I used inheritance but it was error .
please help me.
Check out these odoo tips: https://github.com/sehrishnaz/learnopenerp/wiki