Commit aaa80b46 by Roque

erp5_crm: refactor in domain scripts

1 parent 30ce7ab8
domain_list = []
validated_domain = parent.generateTempDomain(id='validated')
validated_domain.edit(title="Validated",
criterion_property_list=['simulation_state'])
validated_domain.setCriterion('simulation_state', identity='validated')
domain_list.append(validated_domain)
not_validated_domain = parent.generateTempDomain(id='not_validated')
not_validated_domain.edit(title="Not Validated",
criterion_property_list=['simulation_state'])
not_validated_domain.setCriterion('simulation_state', identity=['submitted', 'suspended', 'draft', 'invalidated'])
domain_list.append(not_validated_domain)
cancelled_domain = parent.generateTempDomain(id='cancelled')
cancelled_domain.edit(title="Cancelled",
criterion_property_list=['simulation_state'])
cancelled_domain.setCriterion('simulation_state', identity=['cancelled', 'deleted'])
domain_list.append(cancelled_domain)
return domain_list
return [
context.Base_generateDomain(parent, 'validated', 'Validated', 'simulation_state', 'validated'),
context.Base_generateDomain(parent, 'not_validated', 'Not Validated', 'simulation_state', ['submitted', 'suspended', 'draft', 'invalidated']),
context.Base_generateDomain(parent, 'cancelled', 'Cancelled', 'simulation_state', ['cancelled', 'deleted'])
]
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!