conv_bal
watcha.h@almacom.co.th 2015-04-05 19:35:17 +07:00
parent c568fd9633
commit f7349c2542
10 changed files with 102 additions and 30 deletions

View File

@ -0,0 +1,7 @@
<action>
<field name="string">Account Patient</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.setting.account.patient</field>
<field name="menu">account_menu</field>
<field name="limit">200</field>
</action>

View File

@ -0,0 +1,7 @@
<action>
<field name="string">Account Product</field>
<field name="view_cls">multi_view</field>
<field name="model">clinic.setting.account.product</field>
<field name="menu">account_menu</field>
<field name="limit">1000</field>
</action>

View File

@ -2,6 +2,8 @@
<item string="Settings" position="before"> <item string="Settings" position="before">
<item string="Ratchawat"> <item string="Ratchawat">
<item string="Labor Costs" action="clinic_labor_cost"/> <item string="Labor Costs" action="clinic_labor_cost"/>
<item string="Account Product" action="clinic_setting_account_product"/>
<item string="Account Patient" action="clinic_setting_account_patient"/>
<item string="Payment Matching" action="clinic_matching_payment"/> <item string="Payment Matching" action="clinic_matching_payment"/>
<item string="Payment Invoices" action="clinic_invoice_payment"/> <item string="Payment Invoices" action="clinic_invoice_payment"/>
<item string="HD Cases Matching" action="clinic_matching_hdcase_acc"/> <item string="HD Cases Matching" action="clinic_matching_hdcase_acc"/>

View File

@ -23,29 +23,49 @@
<field name="cost_per_case"/> <field name="cost_per_case"/>
</tab> </tab>
<tab string="Products"> <tab string="Products">
<field name="account_products" nolabel="1"> <group span="6" columns="1">
<list> <template>
<field name="patient_type_id"/> <div>
<field name="categ_id"/> <p></p>
<field name="product_id" domain='[["categ_id","=",categ_id]]'/> <b>Please Go To Menu: Ratchawat->Account Product</b>
<field name="type"/> </div>
<field name="ar_debit_id"/> </template>
<field name="ar_credit_id"/> </group>
</list> <group span="6" columns="1">
</field> </group>
<!--<field name="account_products" nolabel="1">-->
<!--<list>-->
<!--<field name="patient_type_id"/>-->
<!--<field name="categ_id"/>-->
<!--<field name="product_id" domain='[["categ_id","=",categ_id]]'/>-->
<!--<field name="type"/>-->
<!--<field name="ar_debit_id"/>-->
<!--<field name="ar_credit_id"/>-->
<!--</list>-->
<!--</field>-->
</tab> </tab>
<tab string="Matching Payment"> <tab string="Matching Payment">
<field name="patient_type_id"/> <field name="patient_type_id"/>
<field name="imp_patient_type_id"/> <field name="imp_patient_type_id"/>
<field name="account_patients" nolabel="1"> <group span="6" columns="1">
<list> <template>
<field name="type_id"/> <div>
<field name="patient_id" domain='[["type_id","=",type_id]]'/> <p></p>
<field name="partner_id" domain='[["is_patient","=","true"]]'/> <b>Please Go To Menu: Ratchawat->Account Patient</b>
<field name="hn"/> </div>
</template>
</group>
<group span="6" columns="1">
</group>
<!--<field name="account_patients" nolabel="1">-->
<!--<list>-->
<!--<field name="type_id"/>-->
<!--<field name="patient_id" domain='[["type_id","=",type_id]]'/>-->
<!--<field name="partner_id" domain='[["is_patient","=","true"]]'/>-->
<!--<field name="hn"/>-->
<!--<field name="card_no"/>--> <!--<field name="card_no"/>-->
</list> <!--</list>-->
</field> <!--</field>-->
</tab> </tab>
<tab string="Accounting"> <tab string="Accounting">
<field name="cash_account_id"/> <field name="cash_account_id"/>

View File

@ -0,0 +1,8 @@
<form model="clinic.setting.account.patient" show_company="1">
<field name="patient_id"/>
<field name="partner_id"/>
<field name="type_id"/>
<field name="hn"/>
<field name="card_no"/>
<field name="company_id" invisible="1"/>
</form>

View File

@ -0,0 +1,7 @@
<list model="clinic.setting.account.patient">
<field name="patient_id"/>
<field name="partner_id"/>
<field name="type_id"/>
<field name="hn"/>
<field name="card_no"/>
</list>

View File

@ -0,0 +1,8 @@
<form model="clinic.setting.account.product" show_company="1">
<field name="patient_type_id"/>
<field name="categ_id"/>
<field name="ar_credit_id"/>
<field name="ar_debit_id"/>
<field name="type"/>
<field name="company_id" invisible="1"/>
</form>

View File

@ -0,0 +1,7 @@
<list model="clinic.setting.account.product" show_company="1">
<field name="patient_type_id"/>
<field name="categ_id"/>
<field name="ar_credit_id"/>
<field name="ar_debit_id"/>
<field name="type"/>
</list>

View File

@ -1,4 +1,5 @@
from netforce.model import Model, fields from netforce.model import Model, fields
from netforce.access import get_active_company
class SettingAccountPatient(Model): class SettingAccountPatient(Model):
_name="clinic.setting.account.patient" _name="clinic.setting.account.patient"
@ -6,13 +7,17 @@ class SettingAccountPatient(Model):
_fields={ _fields={
"setting_id": fields.Many2One("clinic.setting","Setting",required=True,on_delete="cascade"), "setting_id": fields.Many2One("clinic.setting","Setting",required=True,on_delete="cascade"),
"patient_id": fields.Many2One("clinic.patient","Patient",domain=[["state","=","admit"]]), "patient_id": fields.Many2One("clinic.patient","Patient",domain=[["state","=","admit"]], search=True),
'partner_id': fields.Many2One("partner","Contact"), 'partner_id': fields.Many2One("partner","Contact", search=True),
'type_id': fields.Many2One("clinic.patient.type","Type"), 'type_id': fields.Many2One("clinic.patient.type","Type", search=True),
'hn': fields.Char("HN"), 'hn': fields.Char("HN", search=True),
'card_no': fields.Char("ID Card",size=13), 'card_no': fields.Char("ID Card",size=13, search=True),
'company_id': fields.Many2One("company","Company"),
}
_defaults={
'setting_id': 1,
"company_id": lambda *a: get_active_company(),
} }
_order="type_id,patient_id" _order="type_id,patient_id"
SettingAccountPatient.register() SettingAccountPatient.register()

View File

@ -8,17 +8,18 @@ class SettingAccountProduct(Model):
_fields={ _fields={
"setting_id": fields.Many2One("clinic.setting","Setting",required=True,on_delete="cascade"), "setting_id": fields.Many2One("clinic.setting","Setting",required=True,on_delete="cascade"),
"patient_type_id": fields.Many2One("clinic.patient.type","Patient Type"), "patient_type_id": fields.Many2One("clinic.patient.type","Patient Type",search=True),
'categ_id': fields.Many2One("product.categ","Category"), 'categ_id': fields.Many2One("product.categ","Category",search=True),
"product_id": fields.Many2One("product","Product"), "product_id": fields.Many2One("product","Product",search=True),
"ar_credit_id": fields.Many2One("account.account","Income Credit",multi_company=True), "ar_credit_id": fields.Many2One("account.account","Income Credit",multi_company=True,search=True),
"ar_debit_id": fields.Many2One("account.account","AR Debit",multi_company=True), "ar_debit_id": fields.Many2One("account.account","AR Debit",multi_company=True,search=True),
'company_id': fields.Many2One("company","Company"), 'company_id': fields.Many2One("company","Company"),
"type": fields.Selection([("cash","Cash"),("credit","Credit")],"Type"), "type": fields.Selection([("cash","Cash"),("credit","Credit")],"Type",search=True),
} }
_defaults={ _defaults={
"company_id": lambda *a: get_active_company(), "company_id": lambda *a: get_active_company(),
'setting_id': 1,
} }
_order="patient_type_id" _order="patient_type_id"