64 lines
2.0 KiB
Python
64 lines
2.0 KiB
Python
DEFAULT_DATE_FIELD = 'create_date'
|
|
DEFAULT_ADMIN_FIELD = 'admin_id'
|
|
DEFAULT_PRECINCT_FIELD = 'precinct_id'
|
|
DEFAULT_COMPANY_FIELD = 'company_id'
|
|
# [
|
|
# "yuthon.property",
|
|
# "property.lease.contract",
|
|
# "property.accounts.receivable",
|
|
# "meter.archives.line",
|
|
# "property.management.line",
|
|
# "receivable.modify.line"
|
|
# ]
|
|
filter_rules = (
|
|
{
|
|
'res_model': 'yuthon.property',
|
|
'date_field': DEFAULT_DATE_FIELD,
|
|
'admin_field': DEFAULT_ADMIN_FIELD,
|
|
'precinct_field': DEFAULT_PRECINCT_FIELD,
|
|
'company_field': DEFAULT_COMPANY_FIELD,
|
|
},
|
|
{
|
|
'res_model': 'property.lease.contract',
|
|
'date_field': DEFAULT_DATE_FIELD,
|
|
'admin_field': DEFAULT_ADMIN_FIELD,
|
|
'precinct_field': DEFAULT_PRECINCT_FIELD,
|
|
'company_field': 'lessor_id',
|
|
},
|
|
{
|
|
'res_model': 'property.accounts.receivable',
|
|
'date_field': DEFAULT_DATE_FIELD,
|
|
'admin_field': DEFAULT_ADMIN_FIELD,
|
|
'precinct_field': DEFAULT_PRECINCT_FIELD,
|
|
'company_field': DEFAULT_COMPANY_FIELD,
|
|
},
|
|
{
|
|
'res_model': 'meter.archives.line',
|
|
'date_field': DEFAULT_DATE_FIELD,
|
|
'admin_field': DEFAULT_ADMIN_FIELD,
|
|
'precinct_field': DEFAULT_PRECINCT_FIELD,
|
|
'company_field': DEFAULT_COMPANY_FIELD,
|
|
},
|
|
{
|
|
'res_model': 'property.management.line',
|
|
'date_field': DEFAULT_DATE_FIELD,
|
|
'admin_field': 'admin_id_all',
|
|
'precinct_field': DEFAULT_PRECINCT_FIELD,
|
|
'company_field': DEFAULT_COMPANY_FIELD,
|
|
},
|
|
{
|
|
'res_model': 'receivable.modify.line',
|
|
'date_field': DEFAULT_DATE_FIELD,
|
|
'admin_field': f'receivable_id.{DEFAULT_ADMIN_FIELD}',
|
|
'precinct_field': DEFAULT_PRECINCT_FIELD,
|
|
'company_field': DEFAULT_COMPANY_FIELD,
|
|
},
|
|
{
|
|
'res_model': 'property.bills.list',
|
|
'date_field': 'actual_date',
|
|
'admin_field': 'contract_id.admin_id',
|
|
'precinct_field': 'contract_id.precinct_id',
|
|
'company_field': 'lessor_id',
|
|
},
|
|
)
|