From 8409fc1db7dad183427af68f44aea267a9628300 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Sun, 23 Aug 2015 12:41:16 +0700 Subject: [PATCH] remove shop_categs --- netforce_clinic/layouts/clinic_shop_form.xml | 1 - netforce_clinic/models/shop.py | 9 --------- 2 files changed, 10 deletions(-) diff --git a/netforce_clinic/layouts/clinic_shop_form.xml b/netforce_clinic/layouts/clinic_shop_form.xml index 6245a88..ed81ebe 100644 --- a/netforce_clinic/layouts/clinic_shop_form.xml +++ b/netforce_clinic/layouts/clinic_shop_form.xml @@ -24,7 +24,6 @@ - diff --git a/netforce_clinic/models/shop.py b/netforce_clinic/models/shop.py index 9eabe06..a8adab3 100644 --- a/netforce_clinic/models/shop.py +++ b/netforce_clinic/models/shop.py @@ -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,