diff --git a/netforce_clinic/actions/clinic_pharmacy.xml b/netforce_clinic/actions/clinic_shop.xml
similarity index 54%
rename from netforce_clinic/actions/clinic_pharmacy.xml
rename to netforce_clinic/actions/clinic_shop.xml
index 827d24c..31628c0 100644
--- a/netforce_clinic/actions/clinic_pharmacy.xml
+++ b/netforce_clinic/actions/clinic_shop.xml
@@ -1,6 +1,6 @@
- Pharmacies
+ Shop
multi_view
- clinic.pharmacy
+ clinic.shop
clinic_menu
diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml
index af06bea..cf82741 100644
--- a/netforce_clinic/layouts/clinic_menu.xml
+++ b/netforce_clinic/layouts/clinic_menu.xml
@@ -43,7 +43,7 @@
-
-
+
diff --git a/netforce_clinic/layouts/clinic_pharmacy_form.xml b/netforce_clinic/layouts/clinic_shop_form.xml
similarity index 75%
rename from netforce_clinic/layouts/clinic_pharmacy_form.xml
rename to netforce_clinic/layouts/clinic_shop_form.xml
index c4a24a6..149d1f9 100644
--- a/netforce_clinic/layouts/clinic_pharmacy_form.xml
+++ b/netforce_clinic/layouts/clinic_shop_form.xml
@@ -1,4 +1,4 @@
-
diff --git a/netforce_clinic/layouts/clinic_pharmacy_list.xml b/netforce_clinic/layouts/clinic_shop_list.xml
similarity index 87%
rename from netforce_clinic/layouts/clinic_pharmacy_list.xml
rename to netforce_clinic/layouts/clinic_shop_list.xml
index d7750f5..38f4d59 100644
--- a/netforce_clinic/layouts/clinic_pharmacy_list.xml
+++ b/netforce_clinic/layouts/clinic_shop_list.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py
index 6e3c2f1..1f8c54e 100644
--- a/netforce_clinic/models/__init__.py
+++ b/netforce_clinic/models/__init__.py
@@ -89,6 +89,6 @@ from . import product_categ
from . import make_apt
from . import make_apt_line
from . import matching_payment
-from . import pharmacy
-from . import pharmacy_line
+from . import shop
+from . import shop_line
from . import sale_order
diff --git a/netforce_clinic/models/sale_order.py b/netforce_clinic/models/sale_order.py
index 517c360..8c01f84 100644
--- a/netforce_clinic/models/sale_order.py
+++ b/netforce_clinic/models/sale_order.py
@@ -4,7 +4,7 @@ class SaleOrder(Model):
_inherit="sale.order"
_fields={
- "pharmacy_id": fields.Many2One("clinic.pharmacy","Pharmacy"),
+ "shop_id": fields.Many2One("clinic.shop","Shop"),
}
SaleOrder.register()
diff --git a/netforce_clinic/models/pharmacy.py b/netforce_clinic/models/shop.py
similarity index 89%
rename from netforce_clinic/models/pharmacy.py
rename to netforce_clinic/models/shop.py
index 2b759cd..1d4600b 100644
--- a/netforce_clinic/models/pharmacy.py
+++ b/netforce_clinic/models/shop.py
@@ -4,9 +4,9 @@ from netforce.model import Model, fields, get_model
from netforce.access import get_active_user
from netforce.utils import get_data_path
-class Pharmacy(Model):
- _name="clinic.pharmacy"
- _string="Pharmacy"
+class Shop(Model):
+ _name="clinic.shop"
+ _string="Shop"
def _get_all(self,ids,context={}):
res={}
@@ -23,13 +23,13 @@ class Pharmacy(Model):
'patient_id': fields.Many2One('clinic.patient','Patient',search=True),
'department_id': fields.Many2One("clinic.department","Department"),
'branch_id': fields.Many2One("clinic.branch","Branch"),
- 'lines': fields.One2Many('clinic.pharmacy.line','pharmacy_id','Lines'),
+ 'lines': fields.One2Many('clinic.shop.line','shop_id','Lines'),
'total': fields.Float("Total",function="_get_all",function_multi=True),
'user_id': fields.Many2One("base.user","Pharmacist"),
'state': fields.Selection([['draft','Draft'],['waiting_payment','Waiting Payment'],['paid','Paid']],'State'),
"pickings": fields.One2Many("stock.picking","related_id","Pickings"),
"invoices": fields.One2Many("account.invoice","related_id","Invoices"),
- "orders": fields.One2Many("sale.order","pharmacy_id","Orders"),
+ "payments": fields.One2Many("account.payment","related_id","Payments"),
}
def _get_branch(self,context={}):
@@ -65,4 +65,4 @@ class Pharmacy(Model):
line['amount']=line['price']*line['qty']
return data
-Pharmacy.register()
+Shop.register()
diff --git a/netforce_clinic/models/pharmacy_line.py b/netforce_clinic/models/shop_line.py
similarity index 65%
rename from netforce_clinic/models/pharmacy_line.py
rename to netforce_clinic/models/shop_line.py
index c1bdc95..0307509 100644
--- a/netforce_clinic/models/pharmacy_line.py
+++ b/netforce_clinic/models/shop_line.py
@@ -1,11 +1,11 @@
from netforce.model import Model, fields
-class PharmacyLine(Model):
- _name="clinic.pharmacy.line"
- _string="Pharmacy Line"
+class ShopLine(Model):
+ _name="clinic.shop.line"
+ _string="Shop Line"
_fields={
- 'pharmacy_id': fields.Many2One('clinic.pharmacy','Pharmacy',required=True,on_delete="cascade"),
+ 'shop_id': fields.Many2One('clinic.shop','Shop',required=True,on_delete="cascade"),
'product_id': fields.Many2One('product','Product'),
'description': fields.Char("Description"),
'uom_id': fields.Many2One("uom","UOM"),
@@ -15,4 +15,4 @@ class PharmacyLine(Model):
'account_id': fields.Many2One("account.account","Account"),
}
-PharmacyLine.register()
+ShopLine.register()
diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt
index 15c46bc..791345c 100644
--- a/netforce_clinic/todo.txt
+++ b/netforce_clinic/todo.txt
@@ -7,6 +7,16 @@ todo:
- copy nurse only in the list
- problem after confirm visit
+
+
+ - accounting
+ - invoice line -> account -> credit
+ - debit from hd case setting
+ - if user select product by them self
+ - credit <= product -> tab -> accounting -> sale -> sale account
+ - debit <= 1. contact -> tab accounting -> account receiaveble , 2. finacial setting -> account receiable
+ - sale medicine
+
- import hd case ***
- add script
- report