-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][ADD] mrp_product_price_quick_menus, product_standard_price_change_date #158
[16.0][ADD] mrp_product_price_quick_menus, product_standard_price_change_date #158
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 16.0 #158 +/- ##
==========================================
+ Coverage 89.25% 89.44% +0.18%
==========================================
Files 37 42 +5
Lines 754 786 +32
Branches 107 110 +3
==========================================
+ Hits 673 703 +30
- Misses 55 56 +1
- Partials 26 27 +1 ☔ View full report in Codecov by Sentry. |
9637823
to
6e0e2da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remarques sur le design.
(proposition de créer un module dédié dans la même PR).
<attribute name="invisible">1</attribute> | ||
</xpath> | ||
<xpath expr="//filter[@name='filter_is_intermediate']" position="before"> | ||
<filter string="Finished products" name="filter_is_finished" domain="[('variant_bom_ids', '!=', False), ('bom_line_ids', '=', False)]"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on pourrait rajouter un group "bom_user" pour éviter de voir ce filtre si on fait pas de transfo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En fait ça hérite de mrp_product_product_search_view
et mrp.mrp_product_template_search_view
donc ça se voit dans l'application mrp donc que si on est dans le group mrp.group_mrp_user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pas sûr d'avoir compris ! mais on verra bien en prod' !
class ProductProduct(models.Model): | ||
_inherit = "product.product" | ||
|
||
date_last_statement_price = fields.Date( | ||
help="Date of last standard price change. " | ||
"Automatically sets to the date of the day you changed the standard price", | ||
) | ||
|
||
@api.onchange("standard_price") | ||
def _onchange_date_last_statement_price(self): | ||
for product in self: | ||
product.date_last_statement_price = fields.Date.today() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Un peu du nitpicking.
-
je pense que ce fichier devrait aller dans un module générique
product_standard_price_change_date
-
sinon, je pense qu'il faut l'initaliser avec la date du jour, quand on créé un produit
-
- surcharger le write. (si standard_price dans le write, mettre la date du jour).
(ça ça fait que si on achète les matières premières, et qu'on utilise le module de mise à jour des infos fournisseurs avec le calcul du nouveau standard_price, il sera bien écrit à ce moment là.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes merci, on en avait parlé en plus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done !
e8328e6
to
5476331
Compare
hello ! je crois que je me suis pas fait comprendre ! |
Ah mais oui ok |
3d966ae
to
a46a093
Compare
MeP du 14/11/2024 /ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at c7c02bf. Thanks a lot for contributing to grap. ❤️ |
module dédié pour gérer le menu d'aide à la gestion des prix
+ champ date de remplissage de la mercuriale
date_last_statement_price