Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
3
3adentaire_sale_margin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
3A Dentaire
3adentaire_sale_margin
Commits
f33369d0
Commit
f33369d0
authored
1 month ago
by
Rémi - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[ADD] order on margin on products
parent
ed0e8d07
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+2
-0
2 additions, 0 deletions
README.md
__manifest__.py
+1
-1
1 addition, 1 deletion
__manifest__.py
models/product_template.py
+6
-2
6 additions, 2 deletions
models/product_template.py
with
9 additions
and
3 deletions
README.md
+
2
−
0
View file @
f33369d0
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
__manifest__.py
+
1
−
1
View file @
f33369d0
...
...
@@ -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
"
,
...
...
This diff is collapsed.
Click to expand it.
models/product_template.py
+
6
−
2
View file @
f33369d0
...
...
@@ -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
# ------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment