conv_bal
Phongsan.b 2014-08-19 18:36:46 +07:00
parent 55b436ee16
commit 0ae11df278
150 changed files with 2442 additions and 0 deletions

View File

@ -0,0 +1,10 @@
Metadata-Version: 1.0
Name: clinic
Version: 0.1.0
Summary: Ratchawat Clinic module
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN

View File

@ -0,0 +1,9 @@
setup.py
clinic/__init__.py
clinic.egg-info/PKG-INFO
clinic.egg-info/SOURCES.txt
clinic.egg-info/dependency_links.txt
clinic.egg-info/top_level.txt
clinic/controllers/__init__.py
clinic/models/__init__.py
clinic/models/clinic_patients.py

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@
clinic

View File

@ -0,0 +1,2 @@
from . import models
from . import controllers

Binary file not shown.

View File

@ -0,0 +1,7 @@
<action>
<field name="name">clinic_board</field>
<field name="string">clinic board</field>
<field name="view_cls">board</field>
<field name="view_xml">clinic_board</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -0,0 +1,7 @@
<action>
<field name="string">Doctor</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.doctor</field>
<field name="tabs">[["All",[]],["Draft",[["state","=","draft"]]],["Active",[["state","=","active"]]],["Deactive",[["state","=","deactive"]]]]</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -0,0 +1,7 @@
<action>
<field name="string">Nurse</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.nurse</field>
<field name="tabs">[["All",[]],["Draft",[["state","=","draft"]]],["Active",[["state","=","active"]]],["Deactive",[["state","=","deactive"]]]]</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -0,0 +1,7 @@
<action>
<field name="string">Patient</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.patient</field>
<field name="tabs">[["All",[]],["Draft",[["state","=","draft"]]],["Active",[["state","=","active"]]],["Deactive",[["state","=","deactive"]]]]</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -0,0 +1,8 @@
<action>
<field name="string">Visit</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.visit</field>
<field name="tabs">[["All",[]],["Draft",[["state","=","draft"]]],["Pending",[["state","=","pending"]]],["Confirm",[["state","=","corfirmed"]]]]</field>
<field name="modes">list,calendar,page,form</field>
<field name="menu">clinic_menu</field>
</action>

View File

@ -0,0 +1,5 @@
<action>
<field name="view_cls">calendar_view</field>
<field name="string">Visits</field>
<field name="model">clinic.visit</field>
</action>

View File

View File

@ -0,0 +1,5 @@
<board>
<hpanel>
<widget action="clinic_visit_cal_widget" string="Visits Calendar"/>
</hpanel>
</board>

View File

@ -0,0 +1,28 @@
<form model="clinic.doctor">
<head>
<field name="state"/>
<button string="Options" dropdown="1">
<item string="Send Confirm visit"/>
</button>
</head>
<tabs>
<tab string="Doctor general">
<separator string="Doctor Info"/>
<field name="number"/>
<field name="name"/>
<field name="date"/>
<field name="birthday"/>
<field name="telephone"/>
<field name="mobile"/>
</tab>
</tabs>
<related>
<field name="addresses"/>
</related>
<related>
<field name="patients"/>
</related>
<related>
<field name="comments"/>
</related>
</form>

View File

@ -0,0 +1,6 @@
<list model="clinic.doctor">
<field name="number"/>
<field name="name"/>
<field name="date"/>
<field name="state"/>
</list>

View File

@ -0,0 +1,5 @@
<inherit inherit="main_menu">
<item string="Sales" position="after">
<item string="Clinic" action="clinic_board"/>
</item>
</inherit>

View File

@ -0,0 +1,15 @@
<menu string="Clinic">
<item string="Dashboard" action="clinic_board"/>
<item string="Genaral Data">
<item string="Patient" action="clinic_patient"/>
<item string="Doctor" action="clinic_doctor"/>
<item string="Nurse" action="clinic_nurse"/>
</item>
<item string="Clinic">
<item string="Visit" action="clinic_visit"/>
<item string="HD case treatment" action="clinic_hd_case"/>
</item>
<item string="Settings">
<item string="Clinic Setting" action="clinic_setting"/>
</item>
</menu>

View File

@ -0,0 +1,29 @@
<form model="clinic.nurse">
<head>
<field name="state"/>
<button string="Options" dropdown="1">
<item string="Item1"/>
</button>
</head>
<tabs>
<tab string="Nurse general">
<separator string="Nurse Info"/>
<field name="number"/>
<field name="name"/>
<field name="date"/>
<field name="birthday"/>
<field name="department"/>
<field name="telephone"/>
<field name="mobile"/>
</tab>
</tabs>
<related>
<field name="addresses"/>
</related>
<related>
<field name="patients"/>
</related>
<related>
<field name="comments"/>
</related>
</form>

View File

@ -0,0 +1,6 @@
<list model="clinic.nurse">
<field name="number"/>
<field name="name"/>
<field name="date"/>
<field name="state"/>
</list>

View File

@ -0,0 +1,71 @@
<form model="clinic.patient">
<head>
<field name="state"/>
<button string="Options" dropdown="1">
<item string="Send Confirm visit"/>
</button>
</head>
<tabs>
<tab string="Patient">
<separator string="Patient Info"/>
<field name="number"/>
<field name="name"/>
<field name="date"/>
<field name="birthday"/>
<field name="telephone"/>
<field name="mobile"/>
<field name="job"/>
<field name="age"/>
<field name="weight"/>
<field name="height"/>
<field name="card_type"/>
<field name="exp_id"/>
<field name="gender"/>
<field name="marital_status"/>
<field name="nationality"/>
<field name="race"/>
<separator string="Decare"/>
<field name="smoke"/>
<field name="first_hemodialysis"/>
<field name="hemodialysis"/>
<field name="clinic_after"/>
<field name="clinic_after_name"/>
<field name="first_permanent_vascular_access"/>
<field name="first_tenckhoff_catheters"/>
<field name="start_date_clinic"/>
<field name="waiting_transplantation"/>
<field name="who_transplantation"/>
<field name="reason_of_chronic_renal_failure"/>
<field name="ac_mi"/>
<field name="co_an"/>
<field name="ce_ac"/>
<field name="hypertnsion"/>
<field name="dia"/>
<field name="copd"/>
<field name="asthma"/>
<field name="pul_tub"/>
<field name="cancer"/>
<field name="cirrhosis"/>
<field name="dyslip"/>
<field name="prca"/>
<field name="hyperucemia"/>
<field name="cga"/>
<field name="parathy"/>
<field name="comarbid"/>
<field name="comarbid2"/>
</tab>
<tab string="Doctor">
<field name="doctorsss"/>
<field name="nurses"/>
</tab>
</tabs>
<related>
<field name="addresses"/>
</related>
<related>
<field name="visits"/>
</related>
<related>
<field name="comments"/>
</related>
</form>

View File

@ -0,0 +1,6 @@
<list model="clinic.patient">
<field name="number"/>
<field name="name"/>
<field name="date"/>
<field name="state"/>
</list>

View File

@ -0,0 +1,7 @@
<calendar model="clinic.visit" date_field="date" colors='{"#090":[["state","in",["pending"]]],"#999":[["state","=","canceled"]]}'>
<field name="number"/>
<field name="patient_id"/>
<field name="doctor_id"/>
<field name="nurse_id"/>
<field name="state"/>
</calendar>

View File

@ -0,0 +1,22 @@
<form model="clinic.visit">
<head>
<field name="state"/>
<button string="Options" dropdown="1">
<item string="Send Confirm visit"/>
</button>
</head>
<tabs>
<tab string="Visit">
<separator string="Visit Info"/>
<field name="number"/>
<field name="date"/>
<field name="patient_id"/>
<field name="doctor_id"/>
<field name="nurse_id"/>
<field name="department"/>
</tab>
</tabs>
<related>
<field name="comments"/>
</related>
</form>

View File

@ -0,0 +1,8 @@
<list model="clinic.visit">
<field name="number"/>
<field name="date"/>
<field name="patient_id"/>
<field name="doctor_id"/>
<field name="nurse_id"/>
<field name="state"/>
</list>

View File

@ -0,0 +1,4 @@
from . import clinic_patient
from . import clinic_doctor
from . import clinic_nurse
from . import clinic_visit

Binary file not shown.

View File

@ -0,0 +1,54 @@
from netforce.model import Model, fields, get_model
from netforce.utils import get_data_path
import time
from netforce.access import get_active_user
from netforce.access import get_active_company
class Doctor(Model):
_name="clinic.doctor"
_string="Doctor"
_audit_log=True
_name_field="name"
_multi_company=True
_fields={
"number": fields.Char("Number",required=True,search=True),
"name": fields.Char("Name Surname",required=True,search=True),
"date": fields.Date("Create Date",required=True,search=True),
"birthday": fields.Date("BirthDay",required=True,search=True),
"telephone": fields.Char("Telephone",required=True,search=True),
"department": fields.Char("Department",required=True,search=True),
"mobile": fields.Char("Mobile",required=True,search=True),
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True),
"addresses": fields.One2Many("address","related_id","Addresses"),
"comments": fields.One2Many("message","related_id","Comments"),
"patients": fields.Many2Many("clinic.patient","Patients"),
"company_id": fields.Many2One("company","Company"),
}
def _get_number(self,context={}):
while 1:
num=get_model("sequence").get_number("sale_order")
if not num:
return None
res=self.search([["number","=",num]])
if not res:
return num
get_model("sequence").increment("sale_order")
_defaults={
"state": "draft",
"date": lambda *a: time.strftime("%Y-%m-%d"),
"number": _get_number,
"company_id": lambda *a: get_active_company(),
}
_order="date desc,number desc"
def void(self,ids,context={}):
obj=self.browse(ids)[0]
obj.write({"state":"voided"})
Doctor.register()

View File

@ -0,0 +1,54 @@
from netforce.model import Model, fields, get_model
from netforce.utils import get_data_path
import time
from netforce.access import get_active_user
from netforce.access import get_active_company
class Nurse(Model):
_name="clinic.nurse"
_string="Nurse"
_audit_log=True
_name_field="name"
_multi_company=True
_fields={
"number": fields.Char("Number",required=True,search=True),
"name": fields.Char("Name Surname",required=True,search=True),
"date": fields.Date("Create Date",required=True,search=True),
"birthday": fields.Date("BirthDay",required=True,search=True),
"telephone": fields.Char("Telephone",required=True,search=True),
"department": fields.Char("Department",required=True,search=True),
"mobile": fields.Char("Mobile",required=True,search=True),
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True),
"addresses": fields.One2Many("address","related_id","Addresses"),
"comments": fields.One2Many("message","related_id","Comments"),
"patients": fields.Many2Many("clinic.patient","Patients"),
"company_id": fields.Many2One("company","Company"),
}
def _get_number(self,context={}):
while 1:
num=get_model("sequence").get_number("sale_order")
if not num:
return None
res=self.search([["number","=",num]])
if not res:
return num
get_model("sequence").increment("sale_order")
_defaults={
"state": "draft",
"date": lambda *a: time.strftime("%Y-%m-%d"),
"number": _get_number,
"company_id": lambda *a: get_active_company(),
}
_order="date desc,number desc"
def void(self,ids,context={}):
obj=self.browse(ids)[0]
obj.write({"state":"voided"})
Nurse.register()

View File

@ -0,0 +1,98 @@
from netforce.model import Model, fields, get_model
from netforce.utils import get_data_path
import time
from netforce.access import get_active_user
from netforce.access import get_active_company
class Patient(Model):
_name="clinic.patient"
_string="Partients"
_audit_log=True
_name_field="number"
_multi_company=True
_fields={
"number": fields.Char("Number",required=True,search=True),
"name": fields.Char("Name Surname",required=True,search=True),
"date": fields.Date("Create Date",required=True,search=True),
"birthday": fields.Date("BirthDay",required=True,search=True),
"telephone": fields.Char("Telephone",required=True,search=True),
"mobile": fields.Char("Mobile",required=True,search=True),
"job": fields.Char("Job"),
"age": fields.Integer("Age"),
"weight": fields.Integer("Weight (cm)"),
"height": fields.Integer("Height (Kg)"),
"card_type": fields.Selection([("iden_id","Identity Card"),("passport","Passport")],"ID From",required=True),
'iden_id' : fields.Char("Identity ID"),
"app_no": fields.Char("Application No."),
"salary": fields.Float("Salary"),
'exp_id' : fields.Date("Expiry Date"),
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True),
"addresses": fields.One2Many("address","related_id","Addresses"),
"gender": fields.Selection([("male","Male"),("female","Female")],"Gendel",required=True),
"marital_status": fields.Selection([("single","Single"),("marry","Marry"),("divorce","Divorce"),("separated","Saparated"),("widowed","Widowed")],"Marital Status",required=True),
"nationality": fields.Char("Nationality",search=True),
"race": fields.Char("Race",search=True),
"smoke": fields.Boolean("Smoke ?"),
"first_hemodialysis": fields.Date("First time Hemodialysis",required=True),
"hemodialysis": fields.Char("First Hemodialysis",required=True),
"clinic_after": fields.Selection([("small","Small"),("medium","Medium"),("large","Large")],"Clinic Lastime",required=True),
"clinic_after_name": fields.Char("Clinic after name",required=True),
"first_permanent_vascular_access": fields.Date("First time Permanent Vascular",required=True),
"first_tenckhoff_catheters": fields.Date("First time Tenckhoff Catheters",required=True),
"start_date_clinic": fields.Date("Start Date Clinic",required=True),
"waiting_transplantation": fields.Boolean("Kidney Transplantation Waiting ?"),
"who_transplantation": fields.Char("Who is Transplantation?"),
"reason_of_chronic_renal_failure": fields.Char("Reason chronic renal failure ?"),
"ac_mi": fields.Boolean("Acute MI"),
"co_an": fields.Boolean("Coronary Angioplasty"),
"ce_ac": fields.Boolean("Cerebrovascular Accident"),
"pvd": fields.Boolean("PVD or Amputation"),
"co_he": fields.Boolean("Congestive heart failure"),
"hypertnsion": fields.Boolean("Hypertension"),
"dia": fields.Boolean("Diabetes"),
"copd": fields.Boolean("Copd"),
"asthma": fields.Boolean("Asthma"),
"pul_tub": fields.Boolean("Pulmonary tuberculosis"),
"cancer": fields.Boolean("Cancer"),
"cirrhosis": fields.Boolean("Cirrhosis"),
"dyslip": fields.Boolean("Dyslipidemia"),
"prca": fields.Boolean("PRCA"),
"hyperucemia": fields.Boolean("Hyperurinencemia"),
"cga": fields.Boolean("Chronic gouty arthitis"),
"parathy": fields.Boolean("Parathyroidectomy"),
"comarbid": fields.Char("Co-morbid 1"),
"comarbid2": fields.Char("Co-morbid 2"),
"comments": fields.One2Many("message","related_id","Comments"),
"company_id": fields.Many2One("company","Company"),
"doctorsss": fields.Many2Many("clinic.doctor","Doctors"),
"nurses": fields.Many2Many("clinic.nurse","Nurses"),
"visits": fields.One2Many("clinic.visit","patient_id","Visits"),
}
def _get_number(self,context={}):
while 1:
num=get_model("sequence").get_number("sale_order")
if not num:
return None
res=self.search([["number","=",num]])
if not res:
return num
get_model("sequence").increment("sale_order")
_defaults={
"state": "draft",
"date": lambda *a: time.strftime("%Y-%m-%d"),
"number": _get_number,
"company_id": lambda *a: get_active_company(),
}
_order="date desc,number desc"
def void(self,ids,context={}):
obj=self.browse(ids)[0]
obj.write({"state":"voided"})
Patient.register()

View File

@ -0,0 +1,51 @@
from netforce.model import Model, fields, get_model
from netforce.utils import get_data_path
import time
from netforce.access import get_active_user
from netforce.access import get_active_company
class Visit(Model):
_name="clinic.visit"
_string="Visit"
_audit_log=True
_name_field="number"
_multi_company=True
_fields={
"number": fields.Char("Number",required=True,search=True),
"patient_id": fields.Many2One("clinic.patient","Patients",required=True,search=True),
"doctor_id": fields.Many2One("clinic.doctor","Doctor",search=True),
"nurse_id": fields.Many2One("clinic.nurse","Nurse",search=True),
"date": fields.Date("Create Date",required=True,search=True),
"department": fields.Char("Department",required=True,search=True),
"state": fields.Selection([("draft","Draft"),("pending","Pending"),("confirmed","Confirmed"),("canceled","Canceled")],"Status",required=True),
"comments": fields.One2Many("message","related_id","Comments"),
"company_id": fields.Many2One("company","Company"),
}
def _get_number(self,context={}):
while 1:
num=get_model("sequence").get_number("sale_order")
if not num:
return None
res=self.search([["number","=",num]])
if not res:
return num
get_model("sequence").increment("sale_order")
_defaults={
"state": "draft",
"date": lambda *a: time.strftime("%Y-%m-%d"),
"number": _get_number,
"company_id": lambda *a: get_active_company(),
}
_order="date desc,number desc"
def void(self,ids,context={}):
obj=self.browse(ids)[0]
obj.write({"state":"voided"})
Visit.register()

View File

@ -0,0 +1 @@
cash ,cash,cash-Inspiron,16.06.2014 16:46,file:///home/cash/.config/libreoffice/3;

View File

@ -0,0 +1 @@
David Janssens,datrus,len,19.07.2013 16:42,file:///home/datrus/.config/libreoffice/3;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,41 @@
<v:bread>
<v:bread_item string="Activities" action="activ_all"/>
</v:bread>
<v:page title="{{#if context.data.id}}Edit{{else}}New{{/if}} Call">
<v:flash/>
<v:form border="1">
<v:form_body background="1">
<v:field name="type" invisible="1"/>
<v:separator string="Call Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="user_id"/>
<v:field name="subject"/>
<v:field name="due_date"/>
</div>
<div class="span5 form-horizontal">
<v:field name="related_id"/>
<v:field name="name_id"/>
</div>
</v:row>
<div class="form-horizontal">
<v:field name="description" width="600" height="80"/>
</div>
<v:separator string="Additional Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="state"/>
</div>
<div class="span5 form-horizontal">
<v:field name="phone"/>
<v:field name="email"/>
</div>
</v:row>
<v:field name="uuid" invisible="1"/>
</v:form_body>
<v:form_foot>
<v:button string="Save" method="_save" size="large" type="primary" next="activ_all"/>
</v:form_foot>
</v:form>
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

View File

@ -0,0 +1,27 @@
<v:bread>
<v:bread_item string="Activities" action="activ_all"/>
</v:bread>
<v:page title="{{#if context.data.id}}Edit{{else}}New{{/if}} Email">
<v:flash/>
<v:form border="1">
<v:form_body background="1">
<v:field name="type" invisible="1"/>
<v:field name="date"/>
<v:field name="user_id"/>
<v:field name="name_id" required="1"/>
<v:field name="related_id"/>
<v:field name="subject" size="xlarge"/>
<v:field name="state" invisible="1"/>
<v:field name="body" width="800" height="400"/>
<v:separator string="Additional Information"/>
<v:field name="state" readonly="1"/>
<v:field name="uuid" invisible="1"/>
</v:form_body>
{{#ifeq context.data.state "new"}}
<v:form_foot>
<v:button string="Send" method="send_email" size="large" type="primary" next="activ_all"/>
</v:form_foot>
{{/ifeq}}
</v:form>
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

View File

@ -0,0 +1,44 @@
<v:bread>
<v:bread_item string="Activities" action="activ_all"/>
</v:bread>
<v:page title="{{context.title}}">
<v:flash/>
<v:form border="1">
<v:form_body background="1">
<v:field name="type" invisible="1"/>
<v:separator string="Calendar Details"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="user_id"/>
<v:field name="subject"/>
<v:field name="event_start"/>
<v:field name="event_end"/>
</div>
<div class="span5 form-horizontal">
<v:field name="related_id"/>
<v:field name="name_id"/>
</div>
</v:row>
<v:separator string="Other Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="location"/>
<v:field name="state"/>
</div>
<div class="span5 form-horizontal">
<v:field name="phone"/>
<v:field name="email"/>
</div>
</v:row>
<v:separator string="Description Information"/>
<div class="form-horizontal">
<v:field name="description" width="600" height="80"/>
</div>
<v:field name="uuid" invisible="1"/>
</v:form_body>
<v:form_foot>
<v:button string="Save" method="_save" size="large" type="primary" next="activ_all"/>
</v:form_foot>
</v:form>
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

View File

@ -0,0 +1,44 @@
<v:bread>
<v:bread_item string="Activities" action="activ_all"/>
</v:bread>
<v:page title="{{context.title}}">
<v:flash/>
<v:form border="1">
<v:form_body background="1">
<v:field name="type" invisible="1"/>
<v:separator string="Meeting Details"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="user_id"/>
<v:field name="subject"/>
<v:field name="event_start"/>
<v:field name="event_end"/>
</div>
<div class="span5 form-horizontal">
<v:field name="related_id"/>
<v:field name="name_id"/>
</div>
</v:row>
<v:separator string="Other Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="location"/>
<v:field name="state"/>
</div>
<div class="span5 form-horizontal">
<v:field name="phone"/>
<v:field name="email"/>
</div>
</v:row>
<v:separator string="Description Information"/>
<div class="form-horizontal">
<v:field name="description" width="600" height="80"/>
</div>
<v:field name="uuid" invisible="1"/>
</v:form_body>
<v:form_foot>
<v:button string="Save" method="_save" size="large" type="primary" next="activ_all"/>
</v:form_foot>
</v:form>
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

View File

@ -0,0 +1,42 @@
<v:bread>
<v:bread_item string="Activities" action="activ_all"/>
</v:bread>
<v:page title="{{context.title}}">
<v:flash/>
<v:form border="1">
<v:form_body background="1">
<v:field name="type" invisible="1"/>
<v:separator string="Task Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="user_id"/>
<v:field name="subject"/>
<v:field name="due_date"/>
</div>
<div class="span5 form-horizontal">
<v:field name="related_id"/>
<v:field name="name_id"/>
</div>
</v:row>
<div class="form-horizontal">
<v:field name="description" width="600" height="80"/>
</div>
<v:separator string="Additional Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="state"/>
<v:field name="priority"/>
</div>
<div class="span5 form-horizontal">
<v:field name="phone"/>
<v:field name="email"/>
</div>
</v:row>
<v:field name="uuid" invisible="1"/>
</v:form_body>
<v:form_foot>
<v:button string="Save" method="_save" size="large" type="primary" next="activ_all"/>
</v:form_foot>
</v:form>
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

View File

@ -0,0 +1,14 @@
<v:flash/>
{{include "activ_search" context=context}}
<v:button string="Delete" method="_delete" type="danger" size="small"/>
<v:button string="Search" action="_search" icon="search" size="small" pull="right"/>
<v:list action="view_activity">
<field name="type"/>
<field name="user_id"/>
<field name="subject"/>
<field name="related_id"/>
<field name="name_id"/>
<field name="priority"/>
<field name="date"/>
<field name="state"/>
</v:list>

View File

@ -0,0 +1,17 @@
<v:page title="Activities">
<v:toolbar>
<v:button_group string="New Activity" dropdown="1" icon="plus-sign">
<v:item string="Task" action="activ_new_task"/>
<v:item string="Event" action="activ_new_event"/>
<v:item string="Meeting" action="activ_new_meeting"/>
<v:item string="Call" action="activ_new_call"/>
<v:item string="Email" action="activ_new_email"/>
</v:button_group>
</v:toolbar>
<v:tabs>
<v:tab_item string="All" action="activ_all"/>
<v:tab_item string="Pending" action="activ_pending"/>
<v:tab_item string="Done" action="activ_done"/>
</v:tabs>
{{{context.content}}}
</v:page>

View File

@ -0,0 +1,5 @@
<v:search>
<field name="type"/>
<field name="user_id"/>
<field name="subject"/>
</v:search>

View File

@ -0,0 +1,14 @@
<v:widget title="Pending Activities">
<v:button_group string="New Activity" dropdown="1" icon="plus-sign">
<v:item string="Task" action="activ_new_task"/>
<v:item string="Event" action="activ_new_event"/>
<v:item string="Meeting" action="activ_new_meeting"/>
<v:item string="Call" action="activ_new_call"/>
</v:button_group>
<v:list action="view_activity" noselect="1">
<field name="type"/>
<field name="subject"/>
<field name="user_id"/>
<field name="state"/>
</v:list>
</v:widget>

View File

@ -0,0 +1,14 @@
<v:page title="Copy lead to opportunity">
<v:flash/>
<v:form border="1">
<v:form_body background="1">
<v:field name="lead_id" invisible="1"/>
<v:field name="user_id"/>
<v:field name="partner_id"/>
<v:field name="name"/>
</v:form_body>
<v:form_foot>
<v:button string="Copy" method="do_copy" size="large" type="primary"/>
</v:form_foot>
</v:form>
</v:page>

View File

@ -0,0 +1,3 @@
<v:widget title="Expected revenue">
<v:chart width="550" height="150" type="bar"/>
</v:widget>

View File

@ -0,0 +1,38 @@
<v:page title="{{#if context.title}}{{context.title}}{{else}}Leads Analysis{{/if}}">
<v:flash/>
<v:form_body background="1">
<v:row>
<v:field name="group_field" span="2"/>
<v:field name="subgroup_field" span="2"/>
<v:field name="view_type" span="2"/>
</v:row>
<v:separator string="Time Frame"/>
<v:row>
<v:field name="date_field" span="2"/>
<v:field name="date_from" span="2"/>
<v:field name="date_to" span="2"/>
</v:row>
<v:field name="hide_details" invisible="1"/>
</v:form_body>
<v:toolbar>
<v:button string="Run Report" type="primary" method="run_report"/>
{{#if context.data.hide_details}}
<v:button string="Show Details" method="show_details"/>
{{else}}
<v:button string="Hide Details" method="hide_details"/>
{{/if}}
<v:button_group string="Export" dropdown="1">
<v:item string="CSV"/>
</v:button_group>
</v:toolbar>
<hr/>
<v:field name="domain_str" invisible="1"/>
{{#if context.data.domain_str}}
<div style="background-color:#eee;padding:10px;margin-bottom:5px">
Filtered By:
<div style="white-space:pre">{{{context.data.domain_str}}}</div>
</div>
{{/if}}
<v:field name="report_action" invisible="1"/>
{{view "action" options=context.data.report_action context=context}}
</v:page>

View File

@ -0,0 +1,78 @@
<v:bread>
<v:bread_item string="Leads" action="lead_all"/>
</v:bread>
<v:page title="{{#if context.data.id}}Edit{{else}}New{{/if}} Lead">
<v:flash/>
<v:form border="1">
{{#if context.data.id}}
<v:form_head>
<div class="btn-toolbar" style="float:right;margin:0">
<v:button_group string="Options" dropdown="1" align="right">
<v:item string="Copy to Partner" method="copy_to_partner"/>
<v:item string="Copy to Contact" method="copy_to_contact"/>
{{#ifeq context.data.state "qualified"}}
<v:item string="Copy to Opportunity" action="convert_lead" action_options="lead_id={{context.data.id}}"/>
{{/ifeq}}
<v:divider/>
<v:item string="Send Email" method="send_email"/>
<v:item string="View Activities" action="activ_all" action_options="lead_id={{context.data.id}}"/>
</v:button_group>
</div>
</v:form_head>
{{/if}}
<v:form_body background="1">
<v:separator string="Lead Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="user_id"/>
<v:field name="first_name"/>
<v:field name="last_name"/>
<v:field name="company"/>
<v:field name="title"/>
</div>
<div class="span5 form-horizontal">
<v:field name="state"/>
<v:field name="phone"/>
<v:field name="email"/>
<v:field name="rating"/>
</div>
</v:row>
<v:separator string="Address Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="street"/>
<v:field name="city"/>
<v:field name="province"/>
<v:field name="zip"/>
<v:field name="country_id"/>
</div>
<div class="span5 form-horizontal">
<v:field name="website"/>
</div>
</v:row>
<v:separator string="Additional Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="employees"/>
<v:field name="revenue"/>
</div>
<div class="span5 form-horizontal">
<v:field name="lead_source"/>
<v:field name="industry"/>
</div>
</v:row>
<v:separator string="Description Information"/>
<div class="form-horizontal">
<v:field name="description" width="600" height="80"/>
</div>
<v:field name="uuid" invisible="1"/>
</v:form_body>
<v:form_foot>
<v:button string="Save" method="_save" size="large" type="primary" next="lead_all"/>
{{#ifeq context.data.state "new"}}
<v:button string="Convert" method="do_convert" size="large" type="success"/>
{{/ifeq}}
</v:form_foot>
</v:form>
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

View File

@ -0,0 +1,14 @@
<v:flash/>
{{include "lead_search" context=context}}
<v:button string="Delete" method="_delete" type="danger" size="small"/>
<v:button string="Export" action="lead_export" size="small"/>
<v:button string="Search" action="_search" icon="search" size="small" pull="right"/>
<v:list action="lead_edit">
<field name="date"/>
<field name="user_id"/>
<field name="name"/>
<field name="company"/>
<field name="rating"/>
<field name="lead_source"/>
<field name="state"/>
</v:list>

View File

@ -0,0 +1,15 @@
<v:page title="Leads">
<v:toolbar>
<v:button string="New Lead" icon="plus-sign" action="lead_edit"/>
<v:button string="Import" action="lead_import" icon="download"/>
</v:toolbar>
<v:tabs>
<v:tab_item string="All" action="lead_all"/>
<v:tab_item string="Open" action="lead_open"/>
<v:tab_item string="Contacted" action="lead_contacted"/>
<v:tab_item string="Qualified" action="lead_qualified"/>
<v:tab_item string="Unqualified" action="lead_unqualified"/>
<v:tab_item string="Recycled" action="lead_recycled"/>
</v:tabs>
{{{context.content}}}
</v:page>

View File

@ -0,0 +1,9 @@
<v:report_list>
<field name="date"/>
<field name="user_id"/>
<field name="name"/>
<field name="company"/>
<field name="rating"/>
<field name="lead_source"/>
<field name="state"/>
</v:report_list>

View File

@ -0,0 +1,6 @@
<v:search>
<field name="date"/>
<field name="user_id"/>
<field name="name"/>
<field name="company"/>
</v:search>

View File

@ -0,0 +1,16 @@
<v:modal title="Select lead">
<div class="modal-body">
<v:flash/>
<v:list>
<field name="date"/>
<field name="name"/>
<field name="company"/>
<field name="rating"/>
<field name="state"/>
</v:list>
</div>
<div class="modal-footer">
<v:button string="Copy to contact" type="primary" method="copy_to_contact"/>
<v:button string="Cancel" action="_close"/>
</div>
</v:modal>

View File

@ -0,0 +1,16 @@
<v:modal title="Select lead">
<div class="modal-body">
<v:flash/>
<v:list>
<field name="date"/>
<field name="name"/>
<field name="company"/>
<field name="rating"/>
<field name="state"/>
</v:list>
</div>
<div class="modal-footer">
<v:button string="Copy to partner" type="primary" method="copy_to_partner"/>
<v:button string="Cancel" action="_close"/>
</div>
</v:modal>

View File

@ -0,0 +1,38 @@
<v:page title="{{#if context.title}}{{context.title}}{{else}}Opportunity Analysis{{/if}}">
<v:flash/>
<v:form_body background="1">
<v:row>
<v:field name="group_field" span="2"/>
<v:field name="subgroup_field" span="2"/>
<v:field name="view_type" span="2"/>
</v:row>
<v:separator string="Time Frame"/>
<v:row>
<v:field name="date_field" span="2"/>
<v:field name="date_from" span="2"/>
<v:field name="date_to" span="2"/>
</v:row>
<v:field name="hide_details" invisible="1"/>
</v:form_body>
<v:toolbar>
<v:button string="Run Report" type="primary" method="run_report"/>
{{#if context.data.hide_details}}
<v:button string="Show Details" method="show_details"/>
{{else}}
<v:button string="Hide Details" method="hide_details"/>
{{/if}}
<v:button_group string="Export" dropdown="1">
<v:item string="CSV"/>
</v:button_group>
</v:toolbar>
<hr/>
<v:field name="domain_str" invisible="1"/>
{{#if context.data.domain_str}}
<div style="background-color:#eee;padding:10px;margin-bottom:5px">
Filtered By:
<div style="white-space:pre">{{{context.data.domain_str}}}</div>
</div>
{{/if}}
<v:field name="report_action" invisible="1"/>
{{view "action" options=context.data.report_action context=context}}
</v:page>

View File

@ -0,0 +1,73 @@
<v:bread>
<v:bread_item string="Opportunities" action="opport_all"/>
</v:bread>
<v:page title="{{#if context.data.id}}Edit{{else}}New{{/if}} Opportunity">
<v:flash/>
<v:form border="1">
<v:form_head>
<strong>{{field_value "state" context=context}}</strong>
<div class="btn-toolbar" style="float:right;margin:0">
{{#if context.data.id}}
<v:button_group string="Options" dropdown="1" align="right">
<v:item string="Copy To Quotation" method="copy_to_quotation"/>
<v:item string="Copy" method="copy"/>
<v:divider/>
<v:item string="Send Email" method="send_email"/>
<v:item string="View Activities" action="activ_all" action_options="opport_id={{context.data.id}}"/>
<v:item string="View Quotations" action="quot_all" action_options='search_domain=[["opport_id","=",{{context.data.id}}]]'/>
</v:button_group>
{{/if}}
</div>
</v:form_head>
<v:form_body background="1">
<v:separator string="Opportunity Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="user_id"/>
<v:field name="name"/>
<v:field name="partner_id" create="1"/>
<v:field name="contact_id"/>
</div>
<div class="span5 form-horizontal">
<v:field name="date_close"/>
<v:field name="stage_id"/>
<v:field name="probability"/>
<v:field name="amount"/>
</div>
</v:row>
<v:separator string="Additional Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="lead_source"/>
<v:field name="next_step"/>
</div>
<div class="span5 form-horizontal">
<v:field name="product_id"/>
<v:field name="qty"/>
</div>
</v:row>
<v:separator string="Description Information"/>
<v:row>
<div class="span5 form-horizontal">
<v:field name="description" width="500" height="80"/>
</div>
</v:row>
<v:field name="uuid" invisible="1"/>
<v:field name="state" invisible="1"/>
</v:form_body>
<v:form_foot>
<v:button string="Save" method="_save" size="large" type="primary" next="opport_all"/>
{{#ifeq context.data.state "open"}}
<v:button string="Won" method="do_won" size="large" type="success"/>
<v:button string="Lost" method="do_lost" size="large" type="danger"/>
{{/ifeq}}
{{#ifin context.data.state "won" "lost"}}
<v:button string="Reopen" method="do_reopen" size="large" icon="repeat"/>
{{/ifin}}
</v:form_foot>
</v:form>
{{#if context.data.id}}
<v:field name="quotations" template="quot_rlist" rlist="1"/>
{{/if}}
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

View File

@ -0,0 +1,14 @@
<v:flash/>
{{include "opport_search" context=context}}
<v:button string="Delete" method="_delete" type="danger" size="small"/>
<v:button string="Export" action="opport_export" size="small"/>
<v:button string="Search" action="_search" icon="search" size="small" pull="right"/>
<v:list action="opport_edit">
<field name="user_id"/>
<field name="name"/>
<field name="partner_id"/>
<field name="date_close"/>
<field name="stage_id"/>
<field name="probability"/>
<field name="amount"/>
</v:list>

View File

@ -0,0 +1,13 @@
<v:page title="Opportunities">
<v:toolbar>
<v:button string="New Opportunity" icon="plus-sign" action="opport_edit"/>
<v:button string="Import" action="opport_import" icon="download"/>
</v:toolbar>
<v:tabs>
<v:tab_item string="All" action="opport_all"/>
<v:tab_item string="Open" action="opport_open"/>
<v:tab_item string="Won" action="opport_won"/>
<v:tab_item string="Lost" action="opport_lost"/>
</v:tabs>
{{{context.content}}}
</v:page>

View File

@ -0,0 +1,9 @@
<v:report_list>
<field name="user_id"/>
<field name="name"/>
<field name="partner_id"/>
<field name="date_close"/>
<field name="stage_id"/>
<field name="probability"/>
<field name="amount" group_operator="sum"/>
</v:report_list>

View File

@ -0,0 +1,6 @@
<v:search>
<field name="user_id"/>
<field name="name"/>
<field name="partner_id"/>
<field name="stage_id"/>
</v:search>

View File

@ -0,0 +1,3 @@
<v:widget title="Opportunities by stage">
<v:chart width="550" height="150" type="bar"/>
</v:widget>

View File

@ -0,0 +1,9 @@
<v:widget title="Open Opportunities">
<v:button string="New Opportunity" icon="plus-sign" action="opport_edit"/>
<v:list action="opport_edit" noselect="1">
<field name="name"/>
<field name="user_id"/>
<field name="stage_id"/>
<field name="date_close"/>
</v:list>
</v:widget>

View File

@ -0,0 +1,15 @@
<v:bread>
<v:bread_item string="Pricelists" action="pricelist_all"/>
<v:bread_item string="{{context.data.list_id.1.}}" action="pricelist_edit" action_options="active_id={{context.data.list_id.0.}}"/>
</v:bread>
<v:page title="Add products to pricelist">
<v:flash/>
<v:form border="1">
<v:form_body background="1">
<v:field name="categ_id"/>
</v:form_body>
<v:form_foot>
<v:button string="Add products" method="add_products" size="large" type="primary"/>
</v:form_foot>
</v:form>
</v:page>

View File

@ -0,0 +1,29 @@
<v:bread>
<v:bread_item string="Pricelists" action="pricelist_all"/>
</v:bread>
<v:page title="{{#if context.data.id}}Edit{{else}}New{{/if}} Pricelist">
<v:flash/>
<v:form>
<v:form_head>
{{#if context.data.id}}
<div class="btn-toolbar" style="float:right;margin:0">
<v:button string="Print PDF" icon="print" action="report_pricelist" action_options="active_id={{context.data.id}}"/>
<v:button_group string="Options" dropdown="1" align="right">
<v:item string="Add products" action="pricelist_add" action_options="list_id={{context.data.id}}"/>
<v:item string="Update Prices" method="update_prices"/>
</v:button_group>
</div>
{{/if}}
</v:form_head>
<v:form_body background="1">
<v:field name="name"/>
<v:field name="date"/>
<v:field name="discount"/>
<v:field name="uuid" invisible="1"/>
</v:form_body>
<v:form_foot>
<v:button string="Save" method="_save" size="large" type="primary" next="pricelist_all"/>
</v:form_foot>
</v:form>
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

View File

@ -0,0 +1,18 @@
<v:bread>
<v:bread_item string="Pricelist Items" action="pricelist_item_all"/>
</v:bread>
<v:page title="{{#if context.data.id}}Edit{{else}}New{{/if}} Pricelist Item">
<v:flash/>
<v:form>
<v:form_body background="1">
<v:field name="list_id"/>
<v:field name="product_id"/>
<v:field name="price"/>
<v:field name="uuid" invisible="1"/>
</v:form_body>
<v:form_foot>
<v:button string="Save" method="_save" size="large" type="primary" next="pricelist_item_all"/>
</v:form_foot>
</v:form>
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

View File

@ -0,0 +1,9 @@
<v:flash/>
{{include "pricelist_item_search" context=context}}
<v:button string="Delete" method="_delete" type="danger" size="small"/>
<v:button string="Search" action="_search" icon="search" size="small" pull="right"/>
<v:list action="pricelist_item_edit">
<field name="list_id"/>
<field name="product_id"/>
<field name="price"/>
</v:list>

View File

@ -0,0 +1,9 @@
<v:page title="Price List Items">
<v:toolbar>
<v:button string="New Price List Item" icon="plus-sign" action="pricelist_item_edit"/>
</v:toolbar>
<v:tabs>
<v:tab_item string="All" action="pricelist_item_all"/>
</v:tabs>
{{{context.content}}}
</v:page>

View File

@ -0,0 +1,4 @@
<v:search>
<field name="list_id"/>
<field name="product_id"/>
</v:search>

View File

@ -0,0 +1,9 @@
<v:flash/>
{{include "pricelist_search" context=context}}
<v:button string="Delete" method="_delete" type="danger" size="small"/>
<v:button string="Export" action="pricelist_export" size="small"/>
<v:button string="Search" action="_search" icon="search" size="small" pull="right"/>
<v:list action="pricelist_edit">
<field name="name"/>
<field name="date"/>
</v:list>

View File

@ -0,0 +1,10 @@
<v:page title="Price Lists">
<v:toolbar>
<v:button string="New Price List" icon="plus-sign" action="pricelist_edit"/>
<v:button string="Import" action="pricelist_import" icon="download"/>
</v:toolbar>
<v:tabs>
<v:tab_item string="All" action="pricelist_all"/>
</v:tabs>
{{{context.content}}}
</v:page>

View File

@ -0,0 +1,4 @@
<v:search>
<field name="name"/>
<field name="date"/>
</v:search>

View File

@ -0,0 +1,80 @@
<v:bread>
<v:bread_item string="Quotations" action="quot_all"/>
{{#ifeq context.data.state "draft"}}
<v:bread_item string="Draft" action="quot_draft"/>
{{/ifeq}}
{{#ifeq context.data.state "waiting_approval"}}
<v:bread_item string="Awaiting Approval" action="quot_waiting_approval"/>
{{/ifeq}}
{{#ifeq context.data.state "approved"}}
<v:bread_item string="Approved" action="quot_approved"/>
{{/ifeq}}
{{#ifeq context.data.state "won"}}
<v:bread_item string="Won" action="quot_won"/>
{{/ifeq}}
{{#ifeq context.data.state "lost"}}
<v:bread_item string="Lost" action="quot_lost"/>
{{/ifeq}}
</v:bread>
<v:page title="{{#if context.data.id}}Edit{{else}}New{{/if}} Quotation">
<v:flash/>
<v:form border="1" {{#ifin context.data.state "approved" "won" "lost" "canceled"}}readonly="1"{{/ifin}}>
<v:form_head>
<strong>{{field_value "state" context=context}}</strong>
{{#if context.data.id}}
<div class="btn-toolbar" style="float:right;margin:0">
<v:button string="Print PDF" icon="print" action="report_quot_form" action_options="quot_id={{context.data.id}}"/>
<v:button_group string="Options" dropdown="1">
<v:item string="Copy To Sales Order" method="copy_to_sale_order"/>
<v:item string="Copy" method="copy"/>
<v:item string="Revise" method="revise" confirm="Are you sure you want to revise this quotation?"/>
<v:divider/>
<v:item string="View Activities" action="activ_all" action_options="quot_id={{context.data.id}}"/>
<v:item string="View Sales Orders" action="sale_all" action_options='search_domain=[["ref","=","{{context.data.number}}"]]'/>
</v:button_group>
</div>
{{/if}}
</v:form_head>
<v:form_body {{#unless context.readonly}}background="1"{{/unless}}>
<v:row>
<v:field name="partner_id" span="2" onchange="onchange_partner" create="1"/>
<v:field name="date" span="2"/>
<v:field name="number" span="2"/>
<v:field name="ref" span="2"/>
<v:field name="exp_date" span="2"/>
</v:row>
<v:row>
<v:field name="currency_id" span="2"/>
<v:field name="tax_type" span="2" onchange="update_amounts"/>
<v:field name="user_id" span="2"/>
<v:field name="opport_id" span="2"/>
<v:field name="payment_terms" span="2"/>
</v:row>
<v:field name="lines" template="quot_line_sheet" count="5" nolabel="1"/>
<div class="offset8 form-horizontal">
<v:field name="amount_subtotal"/>
<v:field name="amount_tax"/>
<v:field name="amount_total"/>
</div>
<v:field name="other_info" width="400" height="50"/>
<v:field name="state" invisible="1"/>
<v:field name="uuid" invisible="1"/>
</v:form_body>
<v:form_foot>
{{#ifin context.data.state "draft" "waiting_approval"}}
<v:button_group string="Save" split="1" method="_save" size="large" type="primary" next="quot_all">
<v:item string="Save &amp; submit for approval" method="submit_for_approval" next="quot_waiting_approval"/>
</v:button_group>
<v:button string="Approve" method="approve" size="large" type="success" next="quot_approved"/>
{{/ifin}}
{{#ifeq context.data.state "approved"}}
<v:button string="Won" method="do_won" size="large" type="success"/>
<v:button string="Lost" method="do_lost" size="large" type="danger"/>
{{/ifeq}}
{{#ifin context.data.state "won" "lost"}}
<v:button string="Reopen" method="do_reopen" size="large" icon="repeat"/>
{{/ifin}}
</v:form_foot>
</v:form>
<v:history uuid="{{context.data.uuid}}"/>
</v:page>

Some files were not shown because too many files have changed in this diff Show More