-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] sale_commercial_partner: Migration to 18.0
Co-authored-by: Lukas Tran <[email protected]>
- Loading branch information
1 parent
256cd2e
commit bc5ec59
Showing
8 changed files
with
84 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,9 +45,9 @@ Usage | |
|
||
You can group by *Commercial Entity*: | ||
|
||
- in *Sales > Orders > Quotations*, | ||
- in *Sales > Orders > Orders*, | ||
- in *Sales > Reporting > Sales* (it is a native feature in this menu) | ||
- in *Sales > Orders > Quotations*, | ||
- in *Sales > Orders > Orders*, | ||
- in *Sales > Reporting > Sales* (it is a native feature in this menu) | ||
|
||
Bug Tracker | ||
=========== | ||
|
@@ -70,13 +70,27 @@ Authors | |
Contributors | ||
------------ | ||
|
||
- Alexis de Lattre <[email protected]> | ||
- Serpent Consulting Services Pvt. Ltd. <[email protected]> | ||
- Rattapong Chokmasermkul <[email protected]> | ||
- Tharathip Chaweewongphan <[email protected]> | ||
- `APSL <https://apsl.tech>`__: | ||
- Alexis de Lattre <[email protected]> | ||
- Serpent Consulting Services Pvt. Ltd. <[email protected]> | ||
- Rattapong Chokmasermkul <[email protected]> | ||
- Tharathip Chaweewongphan <[email protected]> | ||
- `APSL <https://apsl.tech>`__: | ||
|
||
- Antoni Marroig <[email protected]> | ||
- Antoni Marroig <[email protected]> | ||
|
||
- `Dynapps <https://www.dynapps.eu>`__: | ||
|
||
- Bert Van Groenendael <[email protected]> | ||
|
||
- `Trobz <https://www.trobz.com>`__: | ||
|
||
- Nhan Tran <[email protected]> | ||
|
||
Other credits | ||
------------- | ||
|
||
The migration of this module from 17.0 to 18.0 was financially supported | ||
by Camptocamp | ||
|
||
Maintainers | ||
----------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ | |
- Tharathip Chaweewongphan \<<[email protected]>\> | ||
- [APSL](https://apsl.tech): | ||
- Antoni Marroig \<<[email protected]>\> | ||
- [Dynapps](https://www.dynapps.eu): | ||
- Bert Van Groenendael \<<[email protected]>\> | ||
- [Trobz](https://www.trobz.com): | ||
- Nhan Tran \<<[email protected]>\> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
The migration of this module from 17.0 to 18.0 was financially supported | ||
by Camptocamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import test_sale_commercial_partner |
37 changes: 37 additions & 0 deletions
37
sale_commercial_partner/tests/test_sale_commercial_partner.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 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 | ||
from odoo.tests.common import TransactionCase | ||
|
||
|
||
class TestSaleCommercialPartner(TransactionCase): | ||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
cls.commercial_partner = cls.env["res.partner"].create( | ||
{ | ||
"is_company": False, | ||
"name": "Commercial Partner", | ||
} | ||
) | ||
|
||
cls.partner = cls.env["res.partner"].create( | ||
{ | ||
"is_company": False, | ||
"name": "Partner", | ||
"parent_id": cls.commercial_partner.id, | ||
} | ||
) | ||
|
||
def test_01_default_commercial_partner_on_sale_order(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters