remove shop_categs
parent
cb16c13565
commit
8409fc1db7
|
@ -24,7 +24,6 @@
|
|||
<field name="bank_name" attrs='{"invisible":[["pay_type","=","credit"]]}' span="2"/>
|
||||
<field name="bank_branch" attrs='{"invisible":[["pay_type","=","credit"]]}' span="2"/>
|
||||
<field name="hd_case_call" invisible="1"/>
|
||||
<field name="shop_categs" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<tabs>
|
||||
<tab string="General">
|
||||
|
|
|
@ -13,8 +13,6 @@ class Shop(Model):
|
|||
|
||||
def _get_all(self,ids,context={}):
|
||||
res={}
|
||||
st=get_model("clinic.setting").browse(1)
|
||||
shop_categs=[x.id for x in st.shop_categs]
|
||||
for obj in self.browse(ids):
|
||||
sub_total=0
|
||||
tax_amount=0
|
||||
|
@ -30,7 +28,6 @@ class Shop(Model):
|
|||
'tax_amount': tax_amount,
|
||||
'total': total,
|
||||
'due_amount': total,
|
||||
'shop_categs': shop_categs,
|
||||
}
|
||||
return res
|
||||
|
||||
|
@ -54,7 +51,6 @@ class Shop(Model):
|
|||
"invoices": fields.One2Many("account.invoice","related_id","Invoices"),
|
||||
"payments": fields.One2Many("account.payment","related_id","Payments"),
|
||||
'dom_str': fields.Char("Dom Str"),
|
||||
'shop_categs': fields.Many2Many("product.categ","Categs",function="_get_all",function_multi=True,store=True),
|
||||
"related_id": fields.Reference([["sale.order","Sales Order"],["purchase.order","Purchase Order"],["project","Project"],["job","Service Order"],["service.contract","Service Contract"]],"Related To"),
|
||||
'company_id': fields.Many2One("company","Company"),
|
||||
"pay_type": fields.Selection([("cash","Cash"),("credit","Credit")],"Pay Type"),
|
||||
|
@ -70,10 +66,6 @@ class Shop(Model):
|
|||
|
||||
_order="date desc"
|
||||
|
||||
def _get_shop_categs(self,context={}):
|
||||
st=get_model("clinic.setting").browse(1)
|
||||
shop_categs=[x.id for x in st.shop_categs]
|
||||
return shop_categs
|
||||
|
||||
def _get_related(self,context={}):
|
||||
related_id=None
|
||||
|
@ -169,7 +161,6 @@ class Shop(Model):
|
|||
'branch_id': _get_branch,
|
||||
'department_id': _get_department,
|
||||
'state': 'draft',
|
||||
'shop_categs': _get_shop_categs,
|
||||
'related_id': _get_related,
|
||||
'patient_id': _get_patient,
|
||||
'contact_id': _get_contact,
|
||||
|
|
Loading…
Reference in New Issue