Skip to content

Commit

Permalink
[MIG] contract_membership_delegated_partner: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinafernandez-tecnativa committed Sep 27, 2023
1 parent af32fe5 commit 73b7404
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion contract_membership_delegated_partner/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Copyright 2017-23 Tecnativa - David Vidal
# Copyright 2023 Tecnativa - Carolina Fernandez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Contract Membership Delegate Partner",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"development_status": "Production/Stable",
"category": "Membership",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
Expand Down
7 changes: 3 additions & 4 deletions contract_membership_delegated_partner/models/contract.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2017-19 Tecnativa - David Vidal
# Copyright 2023 Tecnativa - Carolina Fernandez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models

Expand All @@ -12,8 +13,6 @@ class AccountAnalyticAccount(models.Model):
)

def _prepare_invoice(self, date_invoice, journal=None):
invoice_vals, move_form = super()._prepare_invoice(
date_invoice, journal=journal
)
invoice_vals = super()._prepare_invoice(date_invoice, journal=journal)
invoice_vals["delegated_member_id"] = self.delegated_member_id.id
return invoice_vals, move_form
return invoice_vals
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
* David Vidal
* Rafael Blasco
* Ernesto Tejeda
* Carolina Fernandez
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<li>David Vidal</li>
<li>Rafael Blasco</li>
<li>Ernesto Tejeda</li>
<li>Carolina Fernandez</li>
</ul>
</blockquote>
</li>
Expand Down
10 changes: 5 additions & 5 deletions contract_membership_delegated_partner/views/contract.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<record id="contract_contract_form_view" model="ir.ui.view">
<field name="model">contract.contract</field>
<field name="inherit_id" ref="contract.contract_contract_form_view" />
<field
name="groups_id"
eval="[(4, ref('membership_delegated_partner.group_delegated_member'))]"
/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="delegated_member_id" />
<field name="delegated_member_id" invisible="1" />
<field
name="delegated_member_id"
groups="membership_delegated_partner.group_delegated_member"
/>
</field>
</field>
</record>
Expand Down

0 comments on commit 73b7404

Please sign in to comment.