Skip to content

Commit

Permalink
[IMP] add ability to select the correct price from the first seller
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiocorato committed Nov 8, 2024
1 parent f56244a commit 43f31cb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions product_purchase_first_seller/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Product Purchase select first seller UNUSED
|badge1| |badge2| |badge3|

With this module will be selected always the first active seller to create purchase quotation.
If the seller has more lines, it will be selected the valid one (in term of min quantity and date validity).

**Table of contents**

Expand Down
3 changes: 2 additions & 1 deletion product_purchase_first_seller/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ <h1 class="title">Product Purchase select first seller UNUSED</h1>
!! source digest: sha256:1a4a01d8fed0cbe32099ec93aab1e31013b7a4e00e9ca6489dde841384b077dc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/sergiocorato/e-efatto/tree/14.0/product_purchase_first_seller"><img alt="sergiocorato/e-efatto" src="https://img.shields.io/badge/github-sergiocorato%2Fe--efatto-lightgray.png?logo=github" /></a></p>
<p>With this module will be selected always the first active seller to create purchase quotation.</p>
<p>With this module will be selected always the first active seller to create purchase quotation.
If the seller has more lines, it will be selected the valid one (in term of min quantity and date validity).</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@ def setUpClass(cls):
"standard_price": 50.0,
"list_price": 123.0,
"seller_ids": [
(6, 0, [supplierinfo.id, supplierinfo1.id, supplierinfo2.id,
supplierinfo3.id]),
(
6,
0,
[
supplierinfo.id,
supplierinfo1.id,
supplierinfo2.id,
supplierinfo3.id,
],
),
],
"route_ids": [(6, 0, [buy.id, mto.id])],
}
Expand All @@ -79,9 +87,7 @@ def test_00_purchase_order(self):
len(purchase_order.order_line), 1, msg="Order line was not created"
)
self.assertEqual(purchase_order.partner_id, self.vendor)
self.assertEqual(
purchase_order.order_line.price_unit, 10
)
self.assertEqual(purchase_order.order_line.price_unit, 10)

def test_01_purchase_order_55_qty(self):
self._product_replenish(self.product, 55)
Expand All @@ -95,6 +101,4 @@ def test_01_purchase_order_55_qty(self):
len(purchase_order.order_line), 1, msg="Order line was not created"
)
self.assertEqual(purchase_order.partner_id, self.vendor)
self.assertEqual(
purchase_order.order_line.price_unit, 15
)
self.assertEqual(purchase_order.order_line.price_unit, 15)

0 comments on commit 43f31cb

Please sign in to comment.