remove shop_categs

fix_acc
watcha.h 2015-08-23 12:41:16 +07:00
parent cb16c13565
commit 8409fc1db7
2 changed files with 0 additions and 10 deletions

View File

@ -24,7 +24,6 @@
<field name="bank_name" attrs='{"invisible":[["pay_type","=","credit"]]}' span="2"/> <field name="bank_name" attrs='{"invisible":[["pay_type","=","credit"]]}' span="2"/>
<field name="bank_branch" 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="hd_case_call" invisible="1"/>
<field name="shop_categs" invisible="1"/>
<field name="company_id" invisible="1"/> <field name="company_id" invisible="1"/>
<tabs> <tabs>
<tab string="General"> <tab string="General">

View File

@ -13,8 +13,6 @@ class Shop(Model):
def _get_all(self,ids,context={}): def _get_all(self,ids,context={}):
res={} res={}
st=get_model("clinic.setting").browse(1)
shop_categs=[x.id for x in st.shop_categs]
for obj in self.browse(ids): for obj in self.browse(ids):
sub_total=0 sub_total=0
tax_amount=0 tax_amount=0
@ -30,7 +28,6 @@ class Shop(Model):
'tax_amount': tax_amount, 'tax_amount': tax_amount,
'total': total, 'total': total,
'due_amount': total, 'due_amount': total,
'shop_categs': shop_categs,
} }
return res return res
@ -54,7 +51,6 @@ class Shop(Model):
"invoices": fields.One2Many("account.invoice","related_id","Invoices"), "invoices": fields.One2Many("account.invoice","related_id","Invoices"),
"payments": fields.One2Many("account.payment","related_id","Payments"), "payments": fields.One2Many("account.payment","related_id","Payments"),
'dom_str': fields.Char("Dom Str"), '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"), "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"), 'company_id': fields.Many2One("company","Company"),
"pay_type": fields.Selection([("cash","Cash"),("credit","Credit")],"Pay Type"), "pay_type": fields.Selection([("cash","Cash"),("credit","Credit")],"Pay Type"),
@ -70,10 +66,6 @@ class Shop(Model):
_order="date desc" _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={}): def _get_related(self,context={}):
related_id=None related_id=None
@ -169,7 +161,6 @@ class Shop(Model):
'branch_id': _get_branch, 'branch_id': _get_branch,
'department_id': _get_department, 'department_id': _get_department,
'state': 'draft', 'state': 'draft',
'shop_categs': _get_shop_categs,
'related_id': _get_related, 'related_id': _get_related,
'patient_id': _get_patient, 'patient_id': _get_patient,
'contact_id': _get_contact, 'contact_id': _get_contact,