Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions product_variant_sale_price/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Contributors
* Alex Comba <alex.comba@agilebg.com>
* Fabien Bourgeois <fabien@yaltik.com>
* Vicent Cubells <info@obertix.net>
* Eric Antones <eantones@nuobit.com>

Maintainers
~~~~~~~~~~~
Expand Down
10 changes: 8 additions & 2 deletions product_variant_sale_price/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def _compute_lst_price(self):
uom_model = self.env["uom.uom"]
for product in self:
price = product.fix_price or product.list_price
if "uom" in self.env.context:
if (
"uom" in self.env.context
and "default_description_sale" not in self.env.context
):
price = product.uom_id._compute_price(
price, uom_model.browse(self.env.context["uom"])
)
Expand All @@ -54,7 +57,10 @@ def _inverse_product_lst_price(self):
uom_model = self.env["uom.uom"]
for product in self:
vals = {}
if "uom" in self.env.context:
if (
"uom" in self.env.context
and "default_description_sale" not in self.env.context
):
vals["fix_price"] = product.uom_id._compute_price(
product.lst_price, uom_model.browse(self.env.context["uom"])
)
Expand Down
1 change: 1 addition & 0 deletions product_variant_sale_price/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
* Alex Comba <alex.comba@agilebg.com>
* Fabien Bourgeois <fabien@yaltik.com>
* Vicent Cubells <info@obertix.net>
* Eric Antones <eantones@nuobit.com>
13 changes: 8 additions & 5 deletions product_variant_sale_price/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -411,12 +411,15 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<li>Alex Comba &lt;<a class="reference external" href="mailto:alex.comba&#64;agilebg.com">alex.comba&#64;agilebg.com</a>&gt;</li>
<li>Fabien Bourgeois &lt;<a class="reference external" href="mailto:fabien&#64;yaltik.com">fabien&#64;yaltik.com</a>&gt;</li>
<li>Vicent Cubells &lt;<a class="reference external" href="mailto:info&#64;obertix.net">info&#64;obertix.net</a>&gt;</li>
<li>Eric Antones &lt;<a class="reference external" href="mailto:eantones&#64;nuobit.com">eantones&#64;nuobit.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
Expand Down