Compare commits
3 Commits
fa641c85cc
...
22087b4889
Author | SHA1 | Date |
---|---|---|
oscar alvarez | 22087b4889 | |
oscar alvarez | 5c66b32ca0 | |
oscar alvarez | 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):
|
||||
|
@ -221,10 +221,11 @@ class Opportunity(
|
|||
cls._buttons.update({
|
||||
'opportunity': {
|
||||
'invisible': Eval('state').in_(
|
||||
['won', 'lost', 'opportunity','cancelled']),
|
||||
['won', 'lost', 'opportunity', 'cancelled']),
|
||||
},
|
||||
'converted': {
|
||||
'invisible': Eval('state').in_(['lead', 'convert', 'cancelled']),
|
||||
'invisible': Eval('state').in_(
|
||||
['lead', 'convert', 'cancelled']),
|
||||
},
|
||||
'won': {
|
||||
'invisible': ~Eval('state').in_(['converted']),
|
||||
|
@ -233,7 +234,8 @@ class Opportunity(
|
|||
'invisible': ~Eval('state').in_(['converted']),
|
||||
},
|
||||
'cancelled': {
|
||||
'invisible': Eval('state').in_(['lead', 'won', 'lost', 'cancelled']),
|
||||
'invisible': Eval('state').in_([
|
||||
'lead', 'won', 'lost', 'cancelled']),
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -754,7 +756,7 @@ class CrmOpportunityLine(sequence_ordered(), ModelSQL, ModelView):
|
|||
|
||||
@staticmethod
|
||||
def default_billing_frecuency():
|
||||
return 'monthly'
|
||||
return 'one_payment'
|
||||
|
||||
@classmethod
|
||||
def get_opportunity_states(cls):
|
||||
|
|
|
@ -276,7 +276,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
</record>
|
||||
|
||||
<record model="ir.action.report" id="report_opportunity">
|
||||
<field name="name">Quotation Short Format</field>
|
||||
<field name="name">Quotation</field>
|
||||
<field name="model">crm.opportunity</field>
|
||||
<field name="report_name">crm.opportunity</field>
|
||||
<field name="extension">pdf</field>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=6.0.18
|
||||
version=6.0.19
|
||||
depends:
|
||||
party
|
||||
sale
|
||||
|
|
Loading…
Reference in New Issue