Add contact and invoice party
issue8992 review274701003
This commit is contained in:
1 parent
04a00b58c8
commit
f0c7f02e5c
4 files changed
+25
-8
No files matched your search
@@ -1,3 +1,5 @@
|
||||
* Add contact on opportunity
|
||||
|
||||
Version 5.4.0 - 2019-11-04
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Use ir.calendar.month in report
|
||||
|
||||
@@ -11,6 +11,7 @@ Depending on the state, fields of the record become mandatory. Here is the
|
||||
extensive list of the fields, most of them are optional:
|
||||
|
||||
- Party: The customer.
|
||||
- Contact: The contact who placed the order.
|
||||
- Address: The main address of the customer.
|
||||
- Description: The description of the lead/opportunity.
|
||||
- Number: The internal reference of the lead/opportunity (will be generated
|
||||
|
||||
@@ -40,6 +40,12 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
|
||||
'readonly': Eval('state').in_(['converted', 'lost', 'cancelled']),
|
||||
'required': ~Eval('state').in_(['lead', 'lost', 'cancelled']),
|
||||
}, depends=['state'])
|
||||
contact = fields.Many2One(
|
||||
'party.contact_mechanism', "Contact",
|
||||
search_context={
|
||||
'related_party': Eval('party'),
|
||||
},
|
||||
depends=['party'])
|
||||
address = fields.Many2One('party.address', 'Address',
|
||||
domain=[('party', '=', Eval('party'))],
|
||||
select=True, depends=['party', 'state'],
|
||||
@@ -283,6 +289,7 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
|
||||
return Sale(
|
||||
description=self.description,
|
||||
party=self.party,
|
||||
contact=self.contact,
|
||||
payment_term=self.payment_term,
|
||||
company=self.company,
|
||||
invoice_address=self.address,
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form cursor="party">
|
||||
<label name="reference"/>
|
||||
<field name="reference"/>
|
||||
<label name="number"/>
|
||||
<field name="number"/>
|
||||
<form col="6">
|
||||
<label name="party"/>
|
||||
<field name="party"/>
|
||||
<label name="contact"/>
|
||||
<field name="contact"/>
|
||||
<label name="number"/>
|
||||
<field name="number"/>
|
||||
|
||||
<label name="address"/>
|
||||
<field name="address"/>
|
||||
<field name="address" colspan="3"/>
|
||||
<newline/>
|
||||
|
||||
<label name="description"/>
|
||||
<field name="description" colspan="3"/>
|
||||
<label name="reference"/>
|
||||
<field name="reference"/>
|
||||
|
||||
<label name="amount"/>
|
||||
<group col="2" id="amount_currency">
|
||||
<field name="amount"/>
|
||||
@@ -23,7 +29,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<label name="conversion_probability" string="%"
|
||||
xalign="0.0" xexpand="1"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
|
||||
<notebook colspan="6">
|
||||
<page string="Lead/Opportunity" id="opportunity">
|
||||
<label name="company"/>
|
||||
<field name="company"/>
|
||||
@@ -49,7 +56,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
</notebook>
|
||||
<label name="state"/>
|
||||
<field name="state"/>
|
||||
<group col="-1" colspan="2" id="buttons">
|
||||
<group col="-1" colspan="4" id="buttons">
|
||||
<button name="cancel" icon="tryton-cancel"/>
|
||||
<button name="lost" icon="tryton-cancel"/>
|
||||
<button name="lead" icon="tryton-back"/>
|
||||
|
||||
Reference in new issue
Block a user