from netforce.model import Model, fields, get_model class SettingProduct(Model): _name="clinic.setting.product" _string="Setting Product" _fields={ "setting_id": fields.Many2One("clinic.setting","Setting"), "patient_type_id": fields.Many2One("clinic.patient.type","Patient Type"), "product_categ_id": fields.Many2One("product.categ","Category",domain=[['expense','=',True]]), 'reimbursable': fields.Selection([['yes','Yes'],['no','No']],"Reimbursable"), 'uom_id': fields.Many2One("uom","UOM", required=True), "product_id": fields.Many2One("product","Product"), 'description': fields.Char("Description"), 'price': fields.Float("Price"), 'qty': fields.Integer("Qty"), 'amount': fields.Float("Amount"), } _defaults={ #'type': 'fee', #'patient_type': 'sc', 'qty': 1, 'reimbursable': 'no', } _order="patient_type_id" SettingProduct.register()