Skip to content
Snippets Groups Projects
Commit f33369d0 authored by Rémi - Le Filament's avatar Rémi - Le Filament
Browse files

[ADD] order on margin on products

parent ed0e8d07
Branches
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@
## Description
- rend configurable par produit la possibilité d'éditer le prix depuis un devis
- stocke les champs ajoutés par le module product_standard_margin (pour pouvoir ordonner
les listes sur ces champs)
## Exemple
......
......@@ -5,7 +5,7 @@
"website": "https://le-filament.com",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"depends": ["sale_margin", "product"],
"depends": ["sale_margin", "product_standard_margin"],
"data": [
# views
"views/sale_order_view.xml",
......
......@@ -3,8 +3,6 @@
from odoo import fields, models
# modify product to add a boolean to allow price to be modified
class ProductTemplate(models.Model):
_inherit = "product.template"
......@@ -17,6 +15,12 @@ class ProductTemplate(models.Model):
"Le prix d'achat peut être édité depuis un devis.", default=False
)
# Change computed margin fields to stored
list_price_vat_excl = fields.Float(store=True)
standard_margin = fields.Float(store=True)
standard_margin_rate = fields.Float(store=True)
standard_markup_rate = fields.Float(store=True)
# ------------------------------------------------------
# SQL Constraints
# ------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment