diff --git a/netforce_clinic/models/fin_setting.py b/netforce_clinic/models/fin_setting.py index 0da7fd8..dba9c55 100644 --- a/netforce_clinic/models/fin_setting.py +++ b/netforce_clinic/models/fin_setting.py @@ -17,8 +17,10 @@ class Settings(Model): branch_id=context['branch_id'] else: user=get_model("base.user").browse(user_id) - branch_id=user.branch_id.id - print("branch_id ", branch_id, 'user_id ', user_id) + if user.department_id: + branch_id=user.department_id.branch_id.id + elif user.branch_id: + branch_id=user.branch_id.id vals={} for obj in self.browse(ids): vals[obj.id]=obj.addresses and obj.addresses[0].id or None diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 87bc10e..7ff4157 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -1109,6 +1109,7 @@ class HDCase(Model): 'add_address2': add.address2 or '', 'add_province_name': add.province_id.name or '', 'add_district_name': add.district_id.name or '', + 'add_subdistrict_name': add.subdistrict_id.name or '', 'add_city': add.city or '', 'add_postal_code': add.postal_code or '', 'add_phone': add.phone or '', diff --git a/netforce_clinic/models/shop.py b/netforce_clinic/models/shop.py index c6b420e..54b6a16 100644 --- a/netforce_clinic/models/shop.py +++ b/netforce_clinic/models/shop.py @@ -556,6 +556,7 @@ class Shop(Model): 'add_address2': add.address2 or '', 'add_province_name': add.province_id.name or '', 'add_district_name': add.district_id.name or '', + 'add_subdistrict_name': add.subdistrict_id.name or '', 'add_city': add.city or '', 'add_postal_code': add.postal_code or '', 'add_phone': add.phone or '', diff --git a/netforce_clinic/reports/cust_payment.odt b/netforce_clinic/reports/cust_payment.odt index a3c1914..398707b 100644 Binary files a/netforce_clinic/reports/cust_payment.odt and b/netforce_clinic/reports/cust_payment.odt differ