Skip to content

Commit

Permalink
[18.0][MIG] sale_commercial_partner: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BertVGroenendael committed Nov 20, 2024
1 parent 98f9a2b commit b691c55
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sale_commercial_partner/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ Contributors

- Antoni Marroig <[email protected]>

- `Dynapps <https://www.dynapps.eu>`__:

- Bert Van Groenendael <[email protected]>

Maintainers
-----------

Expand Down
2 changes: 2 additions & 0 deletions sale_commercial_partner/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
- Tharathip Chaweewongphan \<<[email protected]>\>
- [APSL](https://apsl.tech):
- Antoni Marroig \<<[email protected]>\>
- [Dynapps](https://www.dynapps.eu):
- Bert Van Groenendael \<<[email protected]>\>
4 changes: 4 additions & 0 deletions sale_commercial_partner/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
</ul>
</li>
<li><a class="reference external" href="https://www.dynapps.eu">Dynapps</a>:<ul>
<li>Bert Van Groenendael &lt;<a class="reference external" href="mailto:bert.vangroenendael&#64;dynapps.eu">bert.vangroenendael&#64;dynapps.eu</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
1 change: 1 addition & 0 deletions sale_commercial_partner/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import test_sale_commercial_partner
34 changes: 34 additions & 0 deletions sale_commercial_partner/tests/test_sale_commercial_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (C) 2018 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.tests import Form, common


class TestSaleCommercialPartner(common.TransactionCase):
def setUp(self):
super().setUp()
self.commercial_partner = self.env["res.partner"].create(
{
"name": "Commercial Partner",
}
)

self.partner = self.env["res.partner"].create(
{
"name": "Partner",
"commercial_partner_id": self.commercial_partner.id,
}
)

def default_commercial_partner_on_sale_order_01(self):
"""
Test defaulting commercial partner on sale order
:return:
"""

with Form(self.env["sale.order"]) as order_form:
order_form.partner_id = self.partner
order_01 = order_form.save()

self.assertEqual(order_01.partner_id, self.partner)
self.assertEqual(order_01.commercial_partner_id, self.commercial_partner)

0 comments on commit b691c55

Please sign in to comment.