clinic/netforce_clinic/models/shop_line.py

21 lines
743 B
Python

from netforce.model import Model, fields
class ShopLine(Model):
_name="clinic.shop.line"
_string="Shop Line"
_fields={
'shop_id': fields.Many2One('clinic.shop','Shop',required=True,on_delete="cascade"),
'categ_id': fields.Many2One("product.categ","Category"),
'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"),
'ar_debit_id': fields.Many2One("account.account","Account Debit"),
}
ShopLine.register()