improve
							parent
							
								
									c568fd9633
								
							
						
					
					
						commit
						f7349c2542
					
				|  | @ -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> | ||||
|  | @ -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> | ||||
|  | @ -2,6 +2,8 @@ | |||
|     <item string="Settings" position="before"> | ||||
|         <item string="Ratchawat"> | ||||
|             <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 Invoices" action="clinic_invoice_payment"/> | ||||
|             <item string="HD Cases Matching" action="clinic_matching_hdcase_acc"/> | ||||
|  |  | |||
|  | @ -23,29 +23,49 @@ | |||
|             <field name="cost_per_case"/> | ||||
|         </tab> | ||||
|         <tab string="Products"> | ||||
|             <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> | ||||
|             <group span="6" columns="1"> | ||||
|                 <template> | ||||
|                     <div> | ||||
|                         <p></p> | ||||
|                         <b>Please Go To Menu: Ratchawat->Account Product</b> | ||||
|                     </div> | ||||
|                 </template> | ||||
|             </group> | ||||
|             <group span="6" columns="1"> | ||||
|             </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 string="Matching Payment"> | ||||
|             <field name="patient_type_id"/> | ||||
|             <field name="imp_patient_type_id"/> | ||||
|             <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"/> | ||||
|             <group span="6" columns="1"> | ||||
|                 <template> | ||||
|                     <div> | ||||
|                         <p></p> | ||||
|                         <b>Please Go To Menu: Ratchawat->Account Patient</b> | ||||
|                     </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"/>--> | ||||
|                 </list> | ||||
|             </field> | ||||
|                     <!--</list>--> | ||||
|                     <!--</field>--> | ||||
|         </tab> | ||||
|         <tab string="Accounting"> | ||||
|             <field name="cash_account_id"/> | ||||
|  |  | |||
|  | @ -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> | ||||
|  | @ -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> | ||||
|  | @ -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> | ||||
|  | @ -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> | ||||
|  | @ -1,4 +1,5 @@ | |||
| from netforce.model import Model, fields | ||||
| from netforce.access import get_active_company | ||||
| 
 | ||||
| class SettingAccountPatient(Model): | ||||
|     _name="clinic.setting.account.patient" | ||||
|  | @ -6,13 +7,17 @@ class SettingAccountPatient(Model): | |||
| 
 | ||||
|     _fields={ | ||||
|         "setting_id": fields.Many2One("clinic.setting","Setting",required=True,on_delete="cascade"), | ||||
|         "patient_id": fields.Many2One("clinic.patient","Patient",domain=[["state","=","admit"]]), | ||||
|         'partner_id': fields.Many2One("partner","Contact"), | ||||
|         'type_id': fields.Many2One("clinic.patient.type","Type"), | ||||
|         'hn': fields.Char("HN"), | ||||
|         'card_no': fields.Char("ID Card",size=13), | ||||
|         "patient_id": fields.Many2One("clinic.patient","Patient",domain=[["state","=","admit"]], search=True), | ||||
|         'partner_id': fields.Many2One("partner","Contact", search=True), | ||||
|         'type_id': fields.Many2One("clinic.patient.type","Type", search=True), | ||||
|         'hn': fields.Char("HN", search=True), | ||||
|         '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" | ||||
| 
 | ||||
| SettingAccountPatient.register() | ||||
|  |  | |||
|  | @ -8,17 +8,18 @@ class SettingAccountProduct(Model): | |||
| 
 | ||||
|     _fields={ | ||||
|         "setting_id": fields.Many2One("clinic.setting","Setting",required=True,on_delete="cascade"), | ||||
|         "patient_type_id": fields.Many2One("clinic.patient.type","Patient Type"), | ||||
|         'categ_id': fields.Many2One("product.categ","Category"), | ||||
|         "product_id": fields.Many2One("product","Product"), | ||||
|         "ar_credit_id": fields.Many2One("account.account","Income Credit",multi_company=True), | ||||
|         "ar_debit_id": fields.Many2One("account.account","AR Debit",multi_company=True), | ||||
|         "patient_type_id": fields.Many2One("clinic.patient.type","Patient Type",search=True), | ||||
|         'categ_id': fields.Many2One("product.categ","Category",search=True), | ||||
|         "product_id": fields.Many2One("product","Product",search=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,search=True), | ||||
|         '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={ | ||||
|         "company_id": lambda *a: get_active_company(), | ||||
|         'setting_id': 1, | ||||
|     } | ||||
| 
 | ||||
|     _order="patient_type_id" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue