[UPD] odex_benefit: add rules & add price unit to electricals & change business logic for transportations insurance
This commit is contained in:
parent
f2298b864b
commit
a5be66657d
|
|
@ -0,0 +1,127 @@
|
|||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
.history
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
parts/
|
||||
sdist/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# github action
|
||||
.github/workflows/*yaml
|
||||
|
|
@ -4794,10 +4794,14 @@ msgid "Expenses"
|
|||
msgstr "الالتزامات"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_electrical_devices__account_id
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_family_validation_setting__account_id
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_service_request__account_id
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_service_request__device_account_id
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_services_settings__account_id
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_transportation_insurance__account_id
|
||||
msgid "Expenses Account"
|
||||
msgstr ""
|
||||
msgstr "حساب المصروف"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__expenses_request_ids
|
||||
|
|
@ -13821,3 +13825,42 @@ msgstr "اعتماد خدمات المستفيدين"
|
|||
#: model:ir.model.fields,field_description:odex_benefit.field_service_request__exception_or_steal_attach
|
||||
msgid "Exception or steal Attachment"
|
||||
msgstr "مرفق إثبات حالات الاستثناء"
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_service_request__service_reason_id
|
||||
msgid "Service Reason"
|
||||
msgstr "سبب الخدمة"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_service_request__max_amount
|
||||
msgid "Max Transportation Amount"
|
||||
msgstr "الحد الأعلى للنقل"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_services_settings__transportation_insurance_ids
|
||||
#: model:ir.model.fields.selection,name:odex_benefit.selection__services_settings__service_type__transportation_insurance
|
||||
msgid "Transportation Insurance"
|
||||
msgstr "تأمين مواصلات"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_electrical_devices__price_unit
|
||||
msgid "Price Unit"
|
||||
msgstr "سعر الوحدة"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_transportation_insurance__name
|
||||
msgid "Insurance Name"
|
||||
msgstr "اسم التأمين"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_transportation_insurance__limit_amount
|
||||
msgid "Limit Amount"
|
||||
msgstr "الحد الأعلى للمبلغ"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model_terms:ir.ui.view,arch_db:odex_benefit.service_request_tree
|
||||
msgid "Request Creator"
|
||||
msgstr "منشئ الطلب"
|
||||
|
||||
#. module: odex_benefit
|
||||
#: model:ir.model.fields,field_description:odex_benefit.field_service_request__requests_counts
|
||||
msgid "Requests Counts"
|
||||
msgstr "عدد الطلبات"
|
||||
|
|
|
|||
|
|
@ -67,7 +67,11 @@ class ServiceRequest(models.Model):
|
|||
'attachment_id', string='Rent Attachment')
|
||||
added_amount_if_mother_dead = fields.Float(string="Added Amount (If mother dead)",compute="_get_added_amount_if_mother_dead")
|
||||
attachment_lines = fields.One2many('service.attachments.settings','service_request_id',related='service_cat.attachment_lines',readonly=False)
|
||||
account_id = fields.Many2one('account.account',string='Expenses Account',related='service_cat.account_id')
|
||||
account_id = fields.Many2one(
|
||||
'account.account',
|
||||
string='Expenses Account',
|
||||
compute="_compute_account_id"
|
||||
)
|
||||
device_account_id = fields.Many2one('account.account',string='Expenses Account',related='device_id.account_id')
|
||||
accountant_id = fields.Many2one('res.users',string='Accountant',related='service_cat.accountant_id',readonly=False)
|
||||
service_producer_id = fields.Many2one('res.partner',string='Service Producer',related='service_cat.service_producer_id')
|
||||
|
|
@ -102,16 +106,18 @@ class ServiceRequest(models.Model):
|
|||
max_electricity_bill_amount = fields.Float(string='Max Electricity Bill Amount')
|
||||
max_water_bill_amount = fields.Float(string='Max Water Bill Amount')
|
||||
#Transportation insurance
|
||||
service_reason = fields.Selection(selection=[
|
||||
('government_transportation', 'Government Transportation'),
|
||||
('universities_training_institutes_transportation', 'Universities Training Institutes Transportation'),
|
||||
('hospitals_transportation', 'Hospitals Transportation'),
|
||||
('programs_transportation', 'Programs Transportation'),
|
||||
], string='Service Reason')
|
||||
max_government_transportation_amount = fields.Float(string='Max Government Transportation Amount')
|
||||
max_universities_training_institutes_transportation_amount = fields.Float(string='Max Universities Training Institutes Transportation Amount')
|
||||
max_hospitals_transportation_amount = fields.Float(string='Max Hospitals Transportation Amount')
|
||||
max_programs_transportation_amount = fields.Float(string='Max Programs Transportation Amount')
|
||||
# service_reason = fields.Selection(selection=[
|
||||
# ('government_transportation', 'Government Transportation'),
|
||||
# ('universities_training_institutes_transportation', 'Universities Training Institutes Transportation'),
|
||||
# ('hospitals_transportation', 'Hospitals Transportation'),
|
||||
# ('programs_transportation', 'Programs Transportation'),
|
||||
# ], string='Service Reason')
|
||||
service_reason_id = fields.Many2one('transportation.insurance')
|
||||
# max_government_transportation_amount = fields.Float(string='Max Government Transportation Amount')
|
||||
# max_universities_training_institutes_transportation_amount = fields.Float(string='Max Universities Training Institutes Transportation Amount')
|
||||
# max_hospitals_transportation_amount = fields.Float(string='Max Hospitals Transportation Amount')
|
||||
# max_programs_transportation_amount = fields.Float(string='Max Programs Transportation Amount')
|
||||
max_amount = fields.Float(string='Max Transportation Amount')
|
||||
requests_counts = fields.Integer(string='Requests Counts',default = 1)
|
||||
# Marriage
|
||||
member_age = fields.Integer(string="Member Age", related="member_id.age")
|
||||
|
|
@ -144,6 +150,22 @@ class ServiceRequest(models.Model):
|
|||
return_reason = fields.Text(string="Reason for Returning the Request")
|
||||
specialist_note = fields.Text(string="Specialist's Note After Return")
|
||||
|
||||
|
||||
|
||||
@api.depends('service_cat', 'service_reason_id')
|
||||
def _compute_account_id(self):
|
||||
for rec in self:
|
||||
if rec.service_type == 'transportation_insurance':
|
||||
rec.account_id = rec.service_reason_id.account_id
|
||||
else:
|
||||
rec.account_id = rec.service_cat.account_id
|
||||
|
||||
@api.onchange('service_cat', 'device_id')
|
||||
def _calculate_electrical_type_values(self):
|
||||
for rec in self:
|
||||
if rec.service_type == 'electrical_devices':
|
||||
rec.requested_service_amount = rec.device_id.price_unit if rec.device_id else 0.0
|
||||
|
||||
@api.model
|
||||
def search(self, args, offset=0, limit=None, order=None, count=False):
|
||||
if self.env.user and self.env.user.id and self.env.user.has_group("odex_benefit.group_benefit_accountant_accept")\
|
||||
|
|
@ -357,13 +379,15 @@ class ServiceRequest(models.Model):
|
|||
rec.eid_gift_benefit_count = 0
|
||||
if rec.family_id:
|
||||
rec.eid_gift_benefit_count = len(rec.family_id.member_ids.filtered(lambda x: x.age <= rec.service_cat.member_max_age))
|
||||
@api.onchange('requests_counts','service_type')
|
||||
@api.onchange('requests_counts', 'service_type', 'service_reason_id')
|
||||
def _get_max_transportation_amounts(self):
|
||||
for rec in self:
|
||||
rec.max_government_transportation_amount = rec.requests_counts * rec.service_cat.max_government_transportation_amount
|
||||
rec.max_universities_training_institutes_transportation_amount = rec.requests_counts * rec.service_cat.max_universities_training_institutes_transportation_amount
|
||||
rec.max_hospitals_transportation_amount = rec.requests_counts * rec.service_cat.max_hospitals_transportation_amount
|
||||
rec.max_programs_transportation_amount = rec.requests_counts * rec.service_cat.max_programs_transportation_amount
|
||||
# rec.max_government_transportation_amount = rec.requests_counts * rec.service_cat.max_government_transportation_amount
|
||||
# rec.max_universities_training_institutes_transportation_amount = rec.requests_counts * rec.service_cat.max_universities_training_institutes_transportation_amount
|
||||
# rec.max_hospitals_transportation_amount = rec.requests_counts * rec.service_cat.max_hospitals_transportation_amount
|
||||
# rec.max_programs_transportation_amount = rec.requests_counts * rec.service_cat.max_programs_transportation_amount
|
||||
rec.max_amount = rec.requests_counts * rec.service_reason_id.limit_amount
|
||||
|
||||
@api.depends('service_cat','family_id')
|
||||
def _get_amount_for_buy_home(self):
|
||||
for rec in self:
|
||||
|
|
@ -482,7 +506,18 @@ class ServiceRequest(models.Model):
|
|||
self.max_electricity_bill_amount = electricity_bill_amount.max_amount_for_electricity_bill
|
||||
self.max_water_bill_amount = water_bill_amount.max_amount_for_water_bill
|
||||
|
||||
@api.onchange('requested_service_amount', 'benefit_type', 'date','service_cat','family_id','exception_or_steal','home_furnishing_exception','has_marriage_course','home_age')
|
||||
@api.onchange(
|
||||
'requested_service_amount',
|
||||
'benefit_type',
|
||||
'date',
|
||||
'service_cat',
|
||||
'family_id',
|
||||
'exception_or_steal',
|
||||
'home_furnishing_exception',
|
||||
'has_marriage_course',
|
||||
'home_age',
|
||||
'service_reason_id'
|
||||
)
|
||||
def onchange_requested_service_amount(self):
|
||||
res = {}
|
||||
today = fields.Date.today()
|
||||
|
|
@ -695,33 +730,12 @@ class ServiceRequest(models.Model):
|
|||
return res
|
||||
# Validation for 'family' benefit type with 'transportation_insurance' service type
|
||||
if rec.benefit_type == 'family' and rec.service_cat.service_type == 'transportation_insurance':
|
||||
if rec.service_reason == 'government_transportation':
|
||||
if rec.requested_service_amount > rec.max_government_transportation_amount:
|
||||
if rec.service_reason_id and rec.requested_service_amount > rec.max_amount:
|
||||
self.benefit_type = False
|
||||
res['warning'] = {'title': _('ValidationError'),
|
||||
'message': _(
|
||||
"You cannot request more than %s") % rec.max_government_transportation_amount}
|
||||
return res
|
||||
if rec.service_reason == 'universities_training_institutes_transportation':
|
||||
if rec.requested_service_amount > rec.max_universities_training_institutes_transportation_amount:
|
||||
self.benefit_type = False
|
||||
res['warning'] = {'title': _('ValidationError'),
|
||||
'message': _(
|
||||
"You cannot request more than %s") % rec.max_universities_training_institutes_transportation_amount}
|
||||
return res
|
||||
if rec.service_reason == 'hospitals_transportation':
|
||||
if rec.requested_service_amount > rec.max_hospitals_transportation_amount:
|
||||
self.benefit_type = False
|
||||
res['warning'] = {'title': _('ValidationError'),
|
||||
'message': _(
|
||||
"You cannot request more than %s") % rec.max_hospitals_transportation_amount}
|
||||
return res
|
||||
if rec.service_reason == 'programs_transportation':
|
||||
if rec.requested_service_amount > rec.max_programs_transportation_amount:
|
||||
self.benefit_type = False
|
||||
res['warning'] = {'title': _('ValidationError'),
|
||||
'message': _(
|
||||
"You cannot request more than %s") % rec.max_hospitals_transportation_amount}
|
||||
res['warning'] = {
|
||||
'title': _('ValidationError'),
|
||||
'message': _("You cannot request more than %s") % rec.max_amount
|
||||
}
|
||||
return res
|
||||
# Validation for 'family' benefit type with 'recruiting_driver' service type
|
||||
if rec.benefit_type == 'family' and rec.service_cat.service_type == 'debits':
|
||||
|
|
|
|||
|
|
@ -51,10 +51,7 @@ class ServicesSettings(models.Model):
|
|||
#Recruiting_driver
|
||||
max_recruiting_driver_amount = fields.Float(string='Max Buy Car Amount')
|
||||
#Transportation insurance
|
||||
max_government_transportation_amount = fields.Float(string='Max Government Transportation Amount')
|
||||
max_universities_training_institutes_transportation_amount = fields.Float(string='Max Universities Training Institutes Transportation Amount')
|
||||
max_hospitals_transportation_amount = fields.Float(string='Max Hospitals Transportation Amount')
|
||||
max_programs_transportation_amount = fields.Float(string='Max Programs Transportation Amount')
|
||||
transportation_insurance_ids = fields.One2many('transportation.insurance', 'services_settings_id')
|
||||
#Debits
|
||||
max_debits_amount = fields.Float(string='Max Debits Amount')
|
||||
#Health_care
|
||||
|
|
@ -117,6 +114,7 @@ class ElectricalDevices(models.Model):
|
|||
allowed_quantity = fields.Integer(string='Allowed Quantity')
|
||||
account_id = fields.Many2one('account.account',string='Expenses Account',domain="[('user_type_id.id','=',15)]")
|
||||
services_settings_id = fields.Many2one('services.settings')
|
||||
price_unit = fields.Float()
|
||||
|
||||
class HomeFurnishingLines(models.Model):
|
||||
_name = 'home.furnishing.lines'
|
||||
|
|
@ -151,3 +149,15 @@ class BuyHomeLines(models.Model):
|
|||
amount_for_buy_home = fields.Float(string='Amount For Buy Home')
|
||||
services_settings_id = fields.Many2one('services.settings', string='Services Settings')
|
||||
|
||||
class TransportationInsurance(models.Model):
|
||||
_name = 'transportation.insurance'
|
||||
|
||||
services_settings_id = fields.Many2one('services.settings')
|
||||
name = fields.Char(string="Insurance Name", required=True)
|
||||
limit_amount = fields.Float(required=True)
|
||||
account_id = fields.Many2one(
|
||||
'account.account',
|
||||
string='Expenses Account',
|
||||
domain="[('user_type_id.id', '=', 15)]",
|
||||
required=True
|
||||
)
|
||||
|
|
|
|||
|
|
@ -142,4 +142,5 @@ access_buy_home_lines,access_buy_home_lines,model_buy_home_lines,base.group_user
|
|||
access_location_settings,access_location_settings,model_location_settings,base.group_user,1,1,1,1
|
||||
access_service_refuse_reason,access_service_refuse_reason,model_service_refuse_reason,base.group_user,1,1,1,1
|
||||
access_service_refuse_reason_wizard,access_service_refuse_reason_wizard,model_service_refuse_reason_wizard,base.group_user,1,1,1,1
|
||||
access_reason_for_return_wizard,access_reason_for_return_wizard,model_reason_for_return_wizard,base.group_user,1,1,1,1
|
||||
access_reason_for_return_wizard,access_reason_for_return_wizard,model_reason_for_return_wizard,base.group_user,1,1,1,1
|
||||
access_transportation_insurance,access_transportation_insurance,model_transportation_insurance,base.group_user,1,1,1,1
|
||||
|
|
|
|||
|
|
|
@ -82,5 +82,30 @@
|
|||
<field name="name">Accept income and expenses</field>
|
||||
<field name="category_id" ref="module_category_benefit"/>
|
||||
</record>
|
||||
|
||||
<record id="service_request_restrict_only_created_by_rule" model="ir.rule">
|
||||
<field name="name">Show Service Requests That Own</field>
|
||||
<field name="model_id" ref="model_service_request"/>
|
||||
<field name="global" eval="True" />
|
||||
<field name="domain_force">[
|
||||
'|',
|
||||
('create_uid','=',user.id),
|
||||
('family_id.researcher_id.employee_id', '=', user.employee_id.id)
|
||||
]</field>
|
||||
<field name="groups" eval="[(4, ref('group_benefit_researcher'))]"/>
|
||||
<field name="active" eval="True" />
|
||||
</record>
|
||||
<record id="service_request_restrict_only_his_branch_rule" model="ir.rule">
|
||||
<field name="name">Show Service Requests That Own</field>
|
||||
<field name="model_id" ref="model_service_request"/>
|
||||
<field name="global" eval="True" />
|
||||
<field name="domain_force">[
|
||||
'|',
|
||||
('family_id.branch_custom_id.branch.manager_id', '=', user.employee_id.id),
|
||||
('family_id.branch_custom_id.branch.operation_manager_id', '=', user.employee_id.id)
|
||||
]</field>
|
||||
<field name="groups" eval="[(4, ref('group_benefit_branch_manager')), (4, ref('group_benefit_woman_commitee'))]"/>
|
||||
<field name="active" eval="True" />
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -74,15 +74,13 @@
|
|||
<field name="main_service_category" attrs="{'readonly':[('state','not in',['draft','researcher','send_request'])]}" required="1"/>
|
||||
<field name="sub_service_category" attrs="{'readonly':[('state','not in',['draft','researcher','send_request'])]}" required="1"/>
|
||||
<field name="service_cat" attrs="{'readonly':[('state','not in',['draft','researcher','send_request'])]}" required="1"/>
|
||||
<field name="requested_service_amount" attrs="{'readonly': ['|', '|', '|', '|', '|', '|',
|
||||
'&',('state', 'not in', ['draft', 'researcher', 'send_request']),('service_type', '!=', 'electrical_devices'),
|
||||
'&',('state', 'not in', ['draft', 'researcher', 'send_request', 'first_approve', 'second_approve', 'accounting_approve']),
|
||||
('service_type', '=', 'electrical_devices'),
|
||||
('service_type', '=', 'home_furnishing'),
|
||||
('service_type', '=', 'marriage'),
|
||||
('service_type', '=', 'eid_gift'),
|
||||
('service_type', '=', 'winter_clothing'),
|
||||
('service_type', '=', 'ramadan_basket')]}" force_save="1" required="1" />
|
||||
<field name="requested_service_amount" attrs="{'readonly': [
|
||||
'|',
|
||||
'&',
|
||||
('state', 'not in', ['draft', 'researcher', 'send_request', 'first_approve', 'second_approve', 'accounting_approve']),
|
||||
('service_type', 'in', ['home_furnishing', 'marriage', 'eid_gift', 'winter_clothing', 'ramadan_basket']),
|
||||
('service_type', '=', 'electrical_devices')
|
||||
]}" force_save="1" required="1" />
|
||||
<field name="amount_for_buy_home_for_member_count" attrs="{'invisible':[('service_type','!=','buy_home')]}"/>
|
||||
<field name="home_age" attrs="{'invisible':[('service_type','!=','buy_home')]}"/>
|
||||
<field name="max_electricity_bill_amount" readonly="1" force_save="1" attrs="{'invisible':[('service_type','!=','electricity_bill')]}"/>
|
||||
|
|
@ -228,11 +226,8 @@
|
|||
</page>
|
||||
<page string="Transportation Insurance Service" attrs="{'invisible':[('service_type', '!=', 'transportation_insurance')]}">
|
||||
<group>
|
||||
<field name="service_reason"/>
|
||||
<field name="max_government_transportation_amount" attrs="{'invisible':[('service_reason', '!=', 'government_transportation')]}" readonly="1" force_save="1"/>
|
||||
<field name="max_universities_training_institutes_transportation_amount" attrs="{'invisible':[('service_reason', '!=', 'universities_training_institutes_transportation')]}" readonly="1" force_save="1"/>
|
||||
<field name="max_hospitals_transportation_amount" attrs="{'invisible':[('service_reason', '!=', 'hospitals_transportation')]}" readonly="1" force_save="1"/>
|
||||
<field name="max_programs_transportation_amount" attrs="{'invisible':[('service_reason', '!=', 'programs_transportation')]}" readonly="1" force_save="1"/>
|
||||
<field name="service_reason_id" options="{'no_create': True, 'no_open': True, 'no_create_edit': True}"/>
|
||||
<field name="max_amount" readonly="1" force_save="1"/>
|
||||
<field name="requests_counts"/>
|
||||
</group>
|
||||
</page>
|
||||
|
|
@ -258,8 +253,10 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="create_date"/>
|
||||
<field name="create_uid" string="Request Creator"/>
|
||||
<field name="family_id"/>
|
||||
<field name="need_status"/>
|
||||
<field name="need_status"/>
|
||||
<field name="main_service_category"/>
|
||||
<field name="sub_service_category"/>
|
||||
<field name="service_cat"/>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,11 @@
|
|||
<field name="service_name"/>
|
||||
<field name="parent_service" attrs="{'invisible':[('is_main_service','=',True)]}"/>
|
||||
<field name="service_type" attrs="{'invisible':[('is_main_service','=',True)]}"/>
|
||||
<field name="account_id" attrs="{'invisible':['|',('is_main_service','=',True),('service_type','=','electrical_devices')]}"/>
|
||||
<field name="account_id" attrs="{'invisible':[
|
||||
'|',
|
||||
('is_main_service', '=', True),
|
||||
('service_type', 'in', ['electrical_devices', 'transportation_insurance'])
|
||||
]}"/>
|
||||
<field name="accountant_id" attrs="{'invisible':[('is_main_service','=',True)]}"/>
|
||||
<field name="service_producer_id" attrs="{'invisible':['|',('is_main_service','=',True),('is_service_producer','=',False)]}"/>
|
||||
</group>
|
||||
|
|
@ -90,6 +94,7 @@
|
|||
<field name="min_count_member"/>
|
||||
<field name="max_count_member"/>
|
||||
<field name="device_name"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="allowed_quantity"/>
|
||||
<field name="account_id"/>
|
||||
</tree>
|
||||
|
|
@ -144,10 +149,13 @@
|
|||
<page string="Transportation Insurance Settings" attrs="{'invisible':[('service_type','!=','transportation_insurance')]}">
|
||||
<group>
|
||||
<field name="benefit_category_ids" widget="many2many_tags"/>
|
||||
<field name="max_government_transportation_amount"/>
|
||||
<field name="max_universities_training_institutes_transportation_amount"/>
|
||||
<field name="max_hospitals_transportation_amount"/>
|
||||
<field name="max_programs_transportation_amount"/>
|
||||
<field name="transportation_insurance_ids" options="{'no_open': True}">
|
||||
<tree editable="bottom">
|
||||
<field name="name" />
|
||||
<field name="limit_amount" />
|
||||
<field name="account_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Debits Settings" attrs="{'invisible':[('service_type','!=','debits')]}">
|
||||
|
|
|
|||
Loading…
Reference in New Issue