from netforce.model import Model, fields class Hdcaseline(Model): _name="clinic.hd.case.line" _fields={ "hd_case_id": fields.Many2One("clinic.hd.case","HdCase",required=True,on_delete="cascade"), "product_id": fields.Many2One("product","Product",search=True), "description": fields.Char("Description",search=True), "qty":fields.Integer("QTY"), "uom_id": fields.Many2One("uom","UOM",required=True,search=True), "price":fields.Float("Price"), "amount":fields.Float("Amount"), "type": fields.Selection([("fee","Fee"),("others","Others")],"Type",required=True), } _defaults={ 'type': 'others', } Hdcaseline.register()