Browse Source

Merge PR #363 into 12.0

Signed-off-by sbejaoui
pull/238/head
OCA-git-bot 5 years ago
parent
commit
29b3494ab4
  1. 8
      contract/models/contract.py
  2. 1
      contract/readme/CONTRIBUTORS.rst
  3. 5
      contract/views/contract.xml

8
contract/models/contract.py

@ -84,6 +84,14 @@ class ContractContract(models.Model):
required=True
)
commercial_partner_id = fields.Many2one(
'res.partner',
related='partner_id.commercial_partner_id',
store=True,
string='Commercial Entity',
index=True
)
@api.multi
def _inverse_partner_id(self):
for rec in self:

1
contract/readme/CONTRIBUTORS.rst

@ -8,3 +8,4 @@
* Thomas Binsfeld <thomas.binsfeld@acsone.eu>
* Rafael Blasco <rafael.blasco@tecnativa.com>
* Guillaume Vandamme <guillaume.vandamme@acsone.eu>
* Raphaël Reverdy <raphael.reverdy@akretion.com>

5
contract/views/contract.xml

@ -43,6 +43,7 @@
</div>
<group name="main">
<group>
<field name="commercial_partner_id" invisible="1"/>
<field name="partner_id" required="1"/>
<field name="payment_term_id"/>
<field name="user_id"/>
@ -189,6 +190,7 @@
domain="[('date_end', '&lt;', context_today().strftime('%Y-%m-%d')), ('recurring_next_date', '=', False)]"
/>
<field name="partner_id"/>
<field name="commercial_partner_id"/>
<filter string="Archived"
domain="[('active', '=', False)]"
name="inactive"/>
@ -197,6 +199,9 @@
name="group_by_partner"
domain="[]"
context="{'group_by':'partner_id'}"/>
<filter name="commercial_partner_groupby"
string="Commercial Entity"
context="{'group_by': 'commercial_partner_id'}"/>
<filter name="group_by_next_invoice"
string="Next Invoice"
domain="[('recurring_next_date', '!=', False)]"

Loading…
Cancel
Save