22 lines
733 B
Python
22 lines
733 B
Python
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"),("other","Other"),("service","Service")],"Type",required=True),
|
|
}
|
|
|
|
_defaults={
|
|
'type': 'other',
|
|
}
|
|
|
|
Hdcaseline.register()
|
|
|