Skip to content

Commit

Permalink
[ADD] product_pricelist_overcharge_by_amount
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-RB committed Sep 30, 2024
1 parent 3101e0b commit f2351fe
Show file tree
Hide file tree
Showing 19 changed files with 1,248 additions and 0 deletions.
114 changes: 114 additions & 0 deletions product_pricelist_overcharge_by_amount/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
=====================================
Amount overcharge in sales pricelists
=====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:59e13141ec33e51f7acc923989e89fbd639e502e2010c1369aa684ccac6ce261
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-OCA%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/14.0/product_pricelist_overcharge_by_amount
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_pricelist_overcharge_by_amount
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=14.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you to add overcharge amount to sales pricelist based on the price result.
You will be able to create multiple rules/options (just the first match will be applied).
This is usefull when you need to add extra charge base on the actual value computed by the pricelist.
For example, based on the product cost I would like to add and extra margin percentage by ranges. So
with this module you could create a regular pricelist by cost and add the overcharge rules to acomplish this.

**Table of contents**

.. contents::
:local:

Installation
============

Although this module doesn't depend technically on **Sales Management**, you
must install it for configuring and seeing the effects of it.

Configuration
=============

To configure pricelists with the new feature of this module, you need to:

#. Go to *Sales > Configuration > Settings* and check
"Pricelists" option and "Advanced price rules (discounts, formulas)"
after that. You must have correct permissions and you must install
**Sales Management** app (sale) to see these settings.
#. Create or edit a Sales Pricelist at *Sales > Products > Pricelists*.
#. Add or edit a pricelist item and check "Overcharge" option in
the new Overcharge section.
#. This will display a new section to add rules based on the computed price,
it will be check by sequence order and apply just the first match.

Usage
=====

For checking pricelists in action, you can (with `sale` module installed):

#. Go to *Sales > Orders > Quotations*
#. Create or edit a quotation.
#. Add a line.
#. Select a product with the criteria to match the pricelist with overcharge.
#. See the proper price appears in the line.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_pricelist_overcharge_by_amount%0Aversion:%2014.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
~~~~~~~

* Binhex

Contributors
~~~~~~~~~~~~

* `Binhex <https://www.binhex.cloud/>`_:

* Christian Ramos

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/14.0/product_pricelist_overcharge_by_amount>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions product_pricelist_overcharge_by_amount/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions product_pricelist_overcharge_by_amount/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 Binhex - Christian Ramos
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Amount overcharge in sales pricelists",
"summary": "Allows to add/substract amount to the final priceslists price",
"version": "14.0.0.1.0",
"category": "Sales",
"website": "https://github.com/OCA/product-attribute",
"author": "Binhex, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["product"],
"data": [
"security/ir.model.access.csv",
"views/product_pricelist_item_views.xml",
],
"installable": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_pricelist_overcharge_by_amount
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-30 10:54+0000\n"
"PO-Revision-Date: 2024-09-30 10:54+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields.selection,name:product_pricelist_overcharge_by_amount.selection__product_pricelist_overcharge_item__applied_on__allways
msgid "Allways"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__applied_on
msgid "Apply"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_item__overcharge
msgid "Apply overcharge to the final price"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields.selection,name:product_pricelist_overcharge_by_amount.selection__product_pricelist_overcharge_item__applied_on__between
msgid "Between"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields.selection,name:product_pricelist_overcharge_by_amount.selection__product_pricelist_overcharge_item__applied_on__bigger
msgid "Bigger/Equal than"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__create_uid
msgid "Created by"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__create_date
msgid "Created on"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__currency_id
msgid "Currency"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model_terms:ir.ui.view,arch_db:product_pricelist_overcharge_by_amount.product_pricelist_overcharge_item_tree_view
msgid "Discount"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist__display_name
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_item__display_name
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__display_name
msgid "Display Name"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields.selection,name:product_pricelist_overcharge_by_amount.selection__product_pricelist_overcharge_item__applied_on__equal
msgid "Equal than"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist__id
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_item__id
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__id
msgid "ID"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist____last_update
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_item____last_update
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item____last_update
msgid "Last Modified on"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__write_uid
msgid "Last Updated by"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__write_date
msgid "Last Updated on"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__max_price
msgid "Max price"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,help:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__max_price
msgid "Maximun price to apply the overcharge."
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__min_price
msgid "Min price"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,help:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__min_price
msgid "Minimal price to apply the overcharge."
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,help:product_pricelist_overcharge_by_amount.field_product_pricelist_item__overcharge_item_ids
msgid "Only match prices from the selected supplier"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model_terms:ir.ui.view,arch_db:product_pricelist_overcharge_by_amount.product_pricelist_view_inherit
msgid "Overcharge"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__overcharge_discount
msgid "Overcharge Discount"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_item__overcharge_item_ids
#: model_terms:ir.ui.view,arch_db:product_pricelist_overcharge_by_amount.product_pricelist_overcharge_item_form_view
msgid "Overcharge Items"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model_terms:ir.ui.view,arch_db:product_pricelist_overcharge_by_amount.product_pricelist_overcharge_item_tree_view
msgid "Overcharge Rules"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__overcharge_surcharge
msgid "Overcharge Surcharge"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,help:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__applied_on
msgid "Overcharge applicable on selected option"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model,name:product_pricelist_overcharge_by_amount.model_product_pricelist
msgid "Pricelist"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__item_id
msgid "Pricelist Item"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model,name:product_pricelist_overcharge_by_amount.model_product_pricelist_item
msgid "Pricelist Rule"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,field_description:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__sequence
msgid "Sequence"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields.selection,name:product_pricelist_overcharge_by_amount.selection__product_pricelist_overcharge_item__applied_on__smaller
msgid "Smaller/Equal than"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model.fields,help:product_pricelist_overcharge_by_amount.field_product_pricelist_overcharge_item__overcharge_surcharge
msgid ""
"Specify the fixed amount to add or subtract(if negative) to the result "
"amount"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model_terms:ir.ui.view,arch_db:product_pricelist_overcharge_by_amount.product_pricelist_overcharge_item_tree_view
msgid "Surcharge"
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: code:addons/product_pricelist_overcharge_by_amount/models/product_pricelist.py:0
#, python-format
msgid "The minimum price should be lower than the maximum price."
msgstr ""

#. module: product_pricelist_overcharge_by_amount
#: model:ir.model,name:product_pricelist_overcharge_by_amount.model_product_pricelist_overcharge_item
msgid "product.pricelist.overcharge.item"
msgstr ""
3 changes: 3 additions & 0 deletions product_pricelist_overcharge_by_amount/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import product_pricelist
Loading

0 comments on commit f2351fe

Please sign in to comment.