Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dfc69b2
[ADD][8.0] product_variant_sale_price: New module
sergio-teruel Apr 25, 2016
1e612c4
Apply some PEP8 cleanup
tafaRU Jul 12, 2016
ca58b86
[NEW][8.0] product_variant_sale_price: Add test, fixes and translation
sergio-teruel Aug 20, 2016
1f24efe
OCA Transbot updated translations from Transifex
oca-transbot Sep 18, 2016
f6fed89
[product_variant_sale_price] Also set fix_price to variant when templ…
tafaRU Sep 21, 2016
9b8751b
OCA Transbot updated translations from Transifex
oca-transbot Oct 9, 2016
301bd86
[FIX] product_variant_sale_price: avoid to update list price of all v…
tafaRU Sep 1, 2017
b6b233b
[MIG] product_variant_sale_price: Migration to 11.0
SimoRubi Sep 3, 2018
df4f8ca
[UPD] Update product_variant_sale_price.pot
oca-travis Sep 11, 2018
dbb86ed
[UPD] README.rst
OCA-git-bot Sep 12, 2018
0209a92
Translated using Weblate (Dutch)
Sep 25, 2018
2b8617a
Update translation files
oca-transbot Nov 29, 2018
6a8694f
[UPD] README.rst
OCA-git-bot Jul 29, 2019
c674826
[MIG] product_variant_sale_price: Migration to 12.0
cubells Oct 29, 2019
2432aab
[UPD] Update product_variant_sale_price.pot
oca-travis Nov 3, 2019
76a0ca2
Update translation files
oca-transbot Nov 3, 2019
c0ae100
Update translation files
oca-transbot Nov 7, 2019
b1bf591
Translated using Weblate (Portuguese)
pedrocs-exo Jun 2, 2020
ce4c2d1
[IMP] product_variant_sale_price: black, isort, prettier
Rad0van Sep 29, 2020
bd64ef6
[MIG] product_variant_sale_price: Migration to 13.0
Rad0van Sep 29, 2020
ddeb192
[IMP] product_variant_sale_price: black, isort, prettier
Jan 12, 2021
69e5f3b
[MIG] product_variant_sale_price: Migration to 14.0
Jan 12, 2021
22ac90e
!fixup product variant easy view
Jan 15, 2021
5de6baa
[UPD] Update product_variant_sale_price.pot
oca-travis Jun 10, 2021
281565c
[UPD] README.rst
OCA-git-bot Jun 10, 2021
fd937bd
Translated using Weblate (Portuguese)
pedrocs-exo Jul 27, 2021
48f78f6
[IMP] product_variant_sale_price: pylint
yankinmax Jan 31, 2022
8e63fcd
[IMP] product_variant_sale_price: remove redundant super className in…
yankinmax Jan 31, 2022
a24c118
[MIG] product_variant_sale_price: Migration to 15.0
yankinmax Jan 31, 2022
0f3e3dc
[UPD] Update product_variant_sale_price.pot
Feb 2, 2022
8c930f4
Translated using Weblate (French)
ajaniszewska-dev Mar 2, 2022
bd120c9
Translated using Weblate (Catalan)
Noel000 Apr 13, 2022
945e24d
[MIG] product_variant_sale_price: Migration to 16.0
RabbitJon-S73 Feb 1, 2023
36dc2c3
[FIX]product_variant_sale_price: 'Sale Price' Label view issue in pro…
LogeshSod Feb 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions product_variant_sale_price/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
==========================
Product Variant Sale 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-OCA%2Fproduct--variant-lightgray.png?logo=github
:target: https://github.com/OCA/product-variant/tree/15.0/product_variant_sale_price
:alt: OCA/product-variant
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-variant-15-0/product-variant-15-0-product_variant_sale_price
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/137/15.0
:alt: Try me on Runbot

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

This module allows to handle sale price at product variant level
(product.product) instead of product level (product.template), which is the
default.

This module also hides sale price at product template level when has more than
one variant.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-variant/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/OCA/product-variant/issues/new?body=module:%20product_variant_sale_price%0Aversion:%2015.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
~~~~~~~

* Tecnativa

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

* Carlos Dauden <carlos.dauden@tecnativa.com>
* Sergio Teruel <sergio.teruel@tecnativa.com>
* Alex Comba <alex.comba@agilebg.com>
* Fabien Bourgeois <fabien@yaltik.com>
* Vicent Cubells <info@obertix.net>

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-variant <https://github.com/OCA/product-variant/tree/15.0/product_variant_sale_price>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions product_variant_sale_price/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2016 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models
from .hooks import set_sale_price_on_variant
17 changes: 17 additions & 0 deletions product_variant_sale_price/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2016 Sergio Teruel <sergio.teruel@tecnativa.com>
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Product Variant Sale Price",
"summary": "Allows to write fixed prices in product variants",
"version": "16.0.1.0.0",
"category": "Product Management",
"website": "https://github.com/OCA/product-variant",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": ["account", "sale"],
"data": ["views/product_views.xml"],
"post_init_hook": "set_sale_price_on_variant",
}
24 changes: 24 additions & 0 deletions product_variant_sale_price/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2016 Sergio Teruel <sergio.teruel@tecnativa.com>
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html


def set_sale_price_on_variant(cr, registry, template_id=None):
sql = """
UPDATE product_product pp
SET fix_price = pt.list_price + (
SELECT COALESCE(SUM(ptav.price_extra), 0)
FROM product_variant_combination pvc
LEFT JOIN product_template_attribute_value ptav ON
ptav.id = pvc.product_template_attribute_value_id
WHERE pvc.product_product_id = pp.id
AND ptav.product_tmpl_id = pt.id
)
FROM product_template pt
WHERE pt.id = pp.product_tmpl_id
"""
if template_id:
sql += "AND pt.id = %s"
cr.execute(sql, (template_id,))
else:
cr.execute(sql)
55 changes: 55 additions & 0 deletions product_variant_sale_price/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_variant_sale_price
#
# Translators:
# Carles Antoli <carlesantoli@hotmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 05:29+0000\n"
"PO-Revision-Date: 2022-04-13 14:05+0000\n"
"Last-Translator: Noel estudillo <noelestudilloviera@gmail.com>\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__fix_price
msgid "Fix Price"
msgstr "Preu fix"

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__list_price
msgid "List Price"
msgstr "Preu de llista"

#. module: product_variant_sale_price
#: model:ir.model,name:product_variant_sale_price.model_product_product
msgid "Product"
msgstr "Producte"

#. module: product_variant_sale_price
#: model:ir.model,name:product_variant_sale_price.model_product_template
msgid "Product Template"
msgstr "Plantilla del producte"

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__lst_price
msgid "Sale Price"
msgstr "Preu de venta"

#. module: product_variant_sale_price
#: model:ir.model.fields,help:product_variant_sale_price.field_product_product__lst_price
msgid ""
"The sale price is managed from the product template. Click on the 'Configure "
"Variants' button to set the extra attribute prices."
msgstr ""
"El preu de venda es gestiona des de la plantilla del producte. Feu clic al "
"botó \"Configura les variants\" per establir els preus dels atributs "
"addicionals."
52 changes: 52 additions & 0 deletions product_variant_sale_price/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_variant_sale_price
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2016
# Niki Waibel <niki.waibel@gmail.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-11 03:45+0000\n"
"PO-Revision-Date: 2016-11-11 03:45+0000\n"
"Last-Translator: Niki Waibel <niki.waibel@gmail.com>, 2016\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__fix_price
msgid "Fix Price"
msgstr ""

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__list_price
msgid "List Price"
msgstr ""

#. module: product_variant_sale_price
#: model:ir.model,name:product_variant_sale_price.model_product_product
msgid "Product"
msgstr "Produkt"

#. module: product_variant_sale_price
#: model:ir.model,name:product_variant_sale_price.model_product_template
msgid "Product Template"
msgstr "Produktvorlage"

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__lst_price
msgid "Sale Price"
msgstr ""

#. module: product_variant_sale_price
#: model:ir.model.fields,help:product_variant_sale_price.field_product_product__lst_price
msgid ""
"The sale price is managed from the product template. Click on the 'Configure "
"Variants' button to set the extra attribute prices."
msgstr ""
52 changes: 52 additions & 0 deletions product_variant_sale_price/i18n/el_GR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_variant_sale_price
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-18 05:12+0000\n"
"PO-Revision-Date: 2017-02-18 05:12+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/"
"el_GR/)\n"
"Language: el_GR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__fix_price
msgid "Fix Price"
msgstr ""

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__list_price
msgid "List Price"
msgstr ""

#. module: product_variant_sale_price
#: model:ir.model,name:product_variant_sale_price.model_product_product
msgid "Product"
msgstr "Προϊόν"

#. module: product_variant_sale_price
#: model:ir.model,name:product_variant_sale_price.model_product_template
msgid "Product Template"
msgstr ""

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__lst_price
msgid "Sale Price"
msgstr ""

#. module: product_variant_sale_price
#: model:ir.model.fields,help:product_variant_sale_price.field_product_product__lst_price
msgid ""
"The sale price is managed from the product template. Click on the 'Configure "
"Variants' button to set the extra attribute prices."
msgstr ""
67 changes: 67 additions & 0 deletions product_variant_sale_price/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_variant_sale_price
#
# Translators:
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2016
# OCA Transbot <transbot@odoo-community.org>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-11 03:45+0000\n"
"PO-Revision-Date: 2016-11-11 03:45+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__fix_price
msgid "Fix Price"
msgstr "Precio fijo"

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__list_price
#, fuzzy
#| msgid "Fix Price"
msgid "List Price"
msgstr "Precio fijo"

#. module: product_variant_sale_price
#: model:ir.model,name:product_variant_sale_price.model_product_product
msgid "Product"
msgstr "Producto"

#. module: product_variant_sale_price
#: model:ir.model,name:product_variant_sale_price.model_product_template
msgid "Product Template"
msgstr "Plantilla de producto"

#. module: product_variant_sale_price
#: model:ir.model.fields,field_description:product_variant_sale_price.field_product_product__lst_price
#, fuzzy
#| msgid "Fix Price"
msgid "Sale Price"
msgstr "Precio fijo"

#. module: product_variant_sale_price
#: model:ir.model.fields,help:product_variant_sale_price.field_product_product__lst_price
msgid ""
"The sale price is managed from the product template. Click on the 'Configure "
"Variants' button to set the extra attribute prices."
msgstr ""

#~ msgid ""
#~ "{'invisible': [\n"
#~ " ('product_variant_count', "
#~ "'>', 1)\n"
#~ " ]}"
#~ msgstr ""
#~ "{'invisible': [\n"
#~ " ('product_variant_count', "
#~ "'>', 1)\n"
#~ " ]}"
Loading