-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ae89b5
commit b9eb927
Showing
20 changed files
with
654 additions
and
56 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
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 was deleted.
Oops, something went wrong.
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,83 @@ | ||
==================== | ||
sale_suggested_price | ||
==================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-coopiteasy%2Fobeesdoo-lightgray.png?logo=github | ||
:target: https://github.com/coopiteasy/obeesdoo/tree/12.0/sale_suggested_price | ||
:alt: coopiteasy/obeesdoo | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
- Add a 'Suggested Price' field on products, and a 'Product Margin' field on Partners (Vendors) and Product Categories. | ||
The first margin is used if set, otherwise the second margin (which has a default value) is used. | ||
- The reference price on which this margin is applied (supplier price or sale price) | ||
can be selected in the general settings. | ||
- Also, sale and supplier taxes that are of type 'percentage' and that are marked as 'included in price' | ||
are taken into account when computing the suggested price. | ||
- Round suggested price to 5 cents | ||
- Adds "Edit Price" submenu on Point Of Sale, Purchase and Sale modules. | ||
The user lands on an editable List View with the following columns : | ||
|
||
- Name (`name`) | ||
- Main Seller (`main_seller_id`) | ||
- Purchase Price (`purchase_price`) | ||
- Purchase Unit of Measure (`uom_po_id`) | ||
- Suggested Price (`suggested_price`) | ||
- Sales Price (`list_price`) | ||
- Unit of Measure (`uom_id`) | ||
|
||
The only editable field is Purchase Price. | ||
Through "Action > Adapt Sales Price", the user can, on the selected products, | ||
adapt the Sales Price according to the Suggested Price. | ||
|
||
Please note that this model makes assumptions when computing the suggested price: | ||
|
||
- It supposes that each product has only one supplier and that products coming from multiple suppliers | ||
occur as duplicated products with one supplier each. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/obeesdoo/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/coopiteasy/obeesdoo/issues/new?body=module:%20sale_suggested_price%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Coop IT Easy SCRLfs | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Beescoop - Cellule IT | ||
* `Coop IT Easy SCRLfs <https://coopiteasy.be>`_: | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is part of the `coopiteasy/obeesdoo <https://github.com/coopiteasy/obeesdoo/tree/12.0/sale_suggested_price>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
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,45 @@ | ||
from . import wizard | ||
|
||
from odoo import api, SUPERUSER_ID | ||
from openupgradelib import openupgrade | ||
|
||
|
||
renamed_view_xml_ids = ( | ||
( | ||
"beesdoo_product.purchase_product_edit_price", | ||
"sale_edit_price_wizard.purchase_product_edit_price", | ||
), | ||
( | ||
"beesdoo_product.menu_purchase_edit_price", | ||
"sale_edit_price_wizard.menu_purchase_edit_price", | ||
), | ||
( | ||
"beesdoo_product.sale_product_edit_price", | ||
"sale_edit_price_wizard.sale_product_edit_price", | ||
), | ||
( | ||
"beesdoo_product.menu_sale_edit_price", | ||
"sale_edit_price_wizard.menu_sale_edit_price", | ||
), | ||
( | ||
"beesdoo_product.purchase_product_edit_price", | ||
"sale_edit_price_wizard.purchase_product_edit_price", | ||
), | ||
( | ||
"beesdoo_product.purchase_product_edit_price", | ||
"sale_edit_price_wizard.purchase_product_edit_price", | ||
), | ||
( | ||
"beesdoo_product.product_template_edit_price_tree_view", | ||
"sale_edit_price_wizard.product_template_edit_price_tree_view", | ||
), | ||
( | ||
"beesdoo_product.adapt_sales_price_wizard", | ||
"sale_edit_price_wizard.adapt_sales_price_wizard", | ||
), | ||
) | ||
|
||
|
||
def rename_xml_ids(cr): | ||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
openupgrade.rename_xmlids(env.cr, renamed_view_xml_ids) |
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,34 @@ | ||
# Copyright 2022 Coop IT Easy SCRLfs | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Edit Price Wizard", | ||
"summary": """ | ||
Add "Edit Price" submenu on Point Of Sale, Purchase and Sale modules.""", | ||
"version": "12.0.1.0.0", | ||
"category": "Sales", | ||
"website": "https://github.com/beescoop/Obeesdoo", | ||
"author": "Coop IT Easy SCRLfs", | ||
"license": "AGPL-3", | ||
"application": False, | ||
"depends": [ | ||
"product", | ||
"purchase", | ||
"sale", | ||
"sale_suggested_price", | ||
"product_main_supplier", | ||
], | ||
"external_dependencies": { | ||
"python": ["openupgradelib"], | ||
}, | ||
"excludes": [], | ||
"data": [ | ||
"views/product_template_views.xml", | ||
"views/purchase_views.xml", | ||
"views/sale_views.xml", | ||
"wizard/views/adapt_sales_price_wizard_view.xml", | ||
], | ||
"demo": [], | ||
"qweb": [], | ||
"pre_init_hook": "rename_xml_ids", | ||
} |
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 @@ | ||
* Beescoop - Cellule IT | ||
* `Coop IT Easy SCRLfs <https://coopiteasy.be>`_: |
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 @@ | ||
- Add "Edit Price" submenu on Point Of Sale, Purchase and Sale modules. | ||
- Add a wizard to automatically adapt the price to the suggested price. |
Oops, something went wrong.