shop
parent
098b077c86
commit
737221b971
|
@ -1,6 +1,6 @@
|
|||
<action>
|
||||
<field name="string">Pharmacies</field>
|
||||
<field name="string">Shop</field>
|
||||
<field name="view_cls">multi_view</field>
|
||||
<field name="model">clinic.pharmacy</field>
|
||||
<field name="model">clinic.shop</field>
|
||||
<field name="menu">clinic_menu</field>
|
||||
</action>
|
|
@ -43,7 +43,7 @@
|
|||
</item>
|
||||
<item string="HD Cases" perm="clinic_hdcase">
|
||||
<item string="HD Cases" action="clinic_hd_case"/>
|
||||
<item string="Pharmacies" action="clinic_pharmacy" perm="clinic_pharmacy"/>
|
||||
<item string="RD Shop" action="clinic_shop" perm="clinic_shop"/>
|
||||
<divider/>
|
||||
<header string="SETTINGS"/>
|
||||
<item string="Sickbed" action="clinic_sickbed"/>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form model="clinic.pharmacy">
|
||||
<form model="clinic.shop">
|
||||
<head>
|
||||
<field name="state"/>
|
||||
<button string="Options" dropdown="1">
|
||||
|
@ -41,8 +41,20 @@
|
|||
<button string="Pay" type="success"/>
|
||||
</foot>
|
||||
<related>
|
||||
<field name="orders"/>
|
||||
<field name="invoices"/>
|
||||
<field name="payments">
|
||||
<list>
|
||||
<field name="number"/>
|
||||
<field name="date"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="type"/>
|
||||
<field name="pay_type"/>
|
||||
<field name="account_id"/>
|
||||
<field name="ref"/>
|
||||
<field name="amount_total"/>
|
||||
<field name="state"/>
|
||||
</list>
|
||||
</field>
|
||||
<field name="pickings"/>
|
||||
</related>
|
||||
</form>
|
|
@ -1,4 +1,4 @@
|
|||
<list model="clinic.pharmacy">
|
||||
<list model="clinic.shop">
|
||||
<field name="number"/>
|
||||
<field name="date"/>
|
||||
<field name="patient_id"/>
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
|
@ -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()
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue