Remove dependence of sale contract
This commit is contained in:
parent
d8309cf62f
commit
a34a7c0b52
|
@ -1,6 +1,7 @@
|
|||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.pool import Pool
|
||||
from . import ir
|
||||
from . import case
|
||||
from . import customer_service
|
||||
from . import configuration
|
||||
|
@ -10,8 +11,6 @@ from . import survey
|
|||
from . import activity
|
||||
from . import opportunity
|
||||
from . import party_validation
|
||||
from . import contract
|
||||
from . import ir
|
||||
from . import company
|
||||
from . import dash
|
||||
from . import commission
|
||||
|
@ -42,7 +41,6 @@ def register():
|
|||
party_validation.ValidationTemplateAsk,
|
||||
party_validation.OpportunityValidation,
|
||||
party_validation.ValidationHistoryAsk,
|
||||
contract.Contract,
|
||||
company.Company,
|
||||
dash.DashApp,
|
||||
dash.AppCRMSales,
|
||||
|
|
17
contract.py
17
contract.py
|
@ -2,12 +2,11 @@ from trytond.pool import PoolMeta
|
|||
from trytond.model import fields
|
||||
|
||||
|
||||
class Contract(metaclass=PoolMeta):
|
||||
__name__ = 'sale.contract'
|
||||
|
||||
department = fields.Many2One('company.department', 'Department', states={'required': False})
|
||||
|
||||
@classmethod
|
||||
def _get_origin(cls):
|
||||
'Return list of Model names for origin Reference'
|
||||
return super(Contract, cls)._get_origin() + ['crm.opportunity']
|
||||
# class Contract(metaclass=PoolMeta):
|
||||
# __name__ = 'sale.contract'
|
||||
# department = fields.Many2One('company.department', 'Department', states={'required': False})
|
||||
#
|
||||
# @classmethod
|
||||
# def _get_origin(cls):
|
||||
# 'Return list of Model names for origin Reference'
|
||||
# return super(Contract, cls)._get_origin() + ['crm.opportunity']
|
||||
|
|
|
@ -9,8 +9,6 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
|||
<field name="inherit" ref="sale_contract.contract_view_form"/>
|
||||
<field name="name">contract_form</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
|
@ -149,7 +149,9 @@ class Opportunity(
|
|||
'invisible': Eval('state') != 'lost',
|
||||
}, depends=['state'])
|
||||
sales = fields.One2Many('sale.sale', 'origin', 'Sales')
|
||||
contracts = fields.One2Many('sale.contract', 'origin', 'Contracts')
|
||||
# Must to add from sale_contract
|
||||
# contracts = fields.One2Many('sale.contract', 'origin', 'Contracts')
|
||||
|
||||
# converted_by = employee_field(
|
||||
# "Converted By", states=['converted', 'won', 'lost'])
|
||||
# state = fields.Selection([
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
[tryton]
|
||||
version=6.0.5
|
||||
version=6.0.6
|
||||
depends:
|
||||
party
|
||||
sale
|
||||
sale_contract
|
||||
company_department
|
||||
commission
|
||||
dash
|
||||
xml:
|
||||
crm.xml
|
||||
configuration.xml
|
||||
contract.xml
|
||||
case.xml
|
||||
customer_service.xml
|
||||
survey.xml
|
||||
|
|
|
@ -47,10 +47,9 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<page name="lines">
|
||||
<field name="lines"/>
|
||||
</page>
|
||||
|
||||
<page string="Contracts" name="contracts">
|
||||
<!-- <page string="Contracts" name="contracts">
|
||||
<field name="contracts" colspan="4"/>
|
||||
</page>
|
||||
</page> -->
|
||||
<page name="sales">
|
||||
<field name="sales" colspan="4"/>
|
||||
</page>
|
||||
|
|
Loading…
Reference in New Issue