Fix
This commit is contained in:
parent
fa641c85cc
commit
2e05b871b3
|
@ -37,15 +37,15 @@ class Prospect(ModelSQL, ModelView):
|
|||
agent = fields.Many2One('commission.agent', 'Agent')
|
||||
|
||||
|
||||
class Person(ModelSQL, ModelView):
|
||||
'Person'
|
||||
__name__ = 'crm.person'
|
||||
opportunity = fields.Many2One('crm.opportunity', 'Opportunity',
|
||||
required=True, readonly=True)
|
||||
name = fields.Char("Name", required=True)
|
||||
phone = fields.Char('Contact Phone')
|
||||
email = fields.Char('Email')
|
||||
id_number = fields.Char('Id Number')
|
||||
# class Person(ModelSQL, ModelView):
|
||||
# 'Person'
|
||||
# __name__ = 'crm.person'
|
||||
# opportunity = fields.Many2One('crm.opportunity', 'Opportunity',
|
||||
# required=True, readonly=True)
|
||||
# name = fields.Char("Name", required=True)
|
||||
# phone = fields.Char('Contact Phone')
|
||||
# email = fields.Char('Email')
|
||||
# id_number = fields.Char('Id Number')
|
||||
|
||||
|
||||
class Opportunity(
|
||||
|
@ -196,10 +196,10 @@ class Opportunity(
|
|||
states={
|
||||
'invisible': ~Eval('state').in_(['won'])
|
||||
}, depends=['state'])
|
||||
persons = fields.One2Many('crm.person', 'opportunity', 'Persons',
|
||||
states={
|
||||
'readonly': Eval('state').in_(['won', 'lost']),
|
||||
})
|
||||
# persons = fields.One2Many('crm.person', 'opportunity', 'Persons',
|
||||
# states={
|
||||
# 'readonly': Eval('state').in_(['won', 'lost']),
|
||||
# })
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
|
|
Loading…
Reference in New Issue