clinic/netforce_clinic/models/pharmacy_line.py

19 lines
627 B
Python

from netforce.model import Model, fields
class PharmacyLine(Model):
_name="clinic.pharmacy.line"
_string="Pharmacy Line"
_fields={
'pharmacy_id': fields.Many2One('clinic.pharmacy','Pharmacy',required=True,on_delete="cascade"),
'product_id': fields.Many2One('product','Product'),
'description': fields.Char("Description"),
'uom_id': fields.Many2One("uom","UOM"),
'qty': fields.Integer("Qty"),
'price': fields.Float("Price"),
'amount': fields.Float("Amount"),
'account_id': fields.Many2One("account.account","Account"),
}
PharmacyLine.register()