chore: Se hace obligatorio mecanismo de contacto en creación de prospecto, #19
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Camilo Gonzalez 2023-08-08 16:25:46 -05:00
parent c8243835d7
commit 21fc7a7bcd
2 changed files with 8 additions and 1 deletions

View File

@ -12,7 +12,8 @@ class Prospect(ModelSQL, ModelView):
name = fields.Char('Name')
contact_methods = fields.One2Many(
'prospect.contact_method', 'prospect', 'Contact methods')
'prospect.contact_method',
'prospect', 'Contact methods', required=True)
department = fields.Many2One('sale.department', 'Department')
city = fields.Many2One('sale.city', 'City',

View File

@ -12,5 +12,11 @@ class SaleOpportunityManagementTestCase(ModuleTestCase):
ProspectTrace = pool.get('sale.prospect_trace')
self.assertTrue(ProspectTrace.prospect.required)
@with_transaction()
def test_contact_method_en_prospect_es_obligatorio(self):
pool = Pool()
Prospect = pool.get('sale.prospect')
self.assertTrue(Prospect.contact_methods.required)
del ModuleTestCase