Skip to content
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

Merged

Conversation

quentinDupont
Copy link
Member

@quentinDupont quentinDupont commented Jul 9, 2024

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
mrp_product_price_quick_menus

@quentinDupont quentinDupont marked this pull request as ready for review July 10, 2024 07:28
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.44%. Comparing base (31fffa7) to head (32e063b).
Report is 10 commits behind head on 16.0.

Files with missing lines Patch % Lines
...andard_price_change_date/models/product_product.py 88.88% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@quentinDupont quentinDupont force-pushed the 16.0-ADD-mrp_product_price_quick_menus branch 2 times, most recently from 9637823 to 6e0e2da Compare July 10, 2024 08:27
Copy link
Member

@legalsylvain legalsylvain left a 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)]"/>
Copy link
Member

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 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea !

Copy link
Member Author

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

Copy link
Member

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' !

Comment on lines 8 to 19
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()
Copy link
Member

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à.)

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done !

@quentinDupont quentinDupont force-pushed the 16.0-ADD-mrp_product_price_quick_menus branch from e8328e6 to 5476331 Compare July 25, 2024 07:23
@quentinDupont quentinDupont changed the title [16.0][ADD] mrp_product_price_quick_menus [16.0][ADD] mrp_product_price_quick_menus, mrp_bom_group Jul 25, 2024
@legalsylvain
Copy link
Member

legalsylvain commented Jul 25, 2024

hello ! je crois que je me suis pas fait comprendre !
le module dédié, je le pensais pas pour le coup du bom_user : sur ce sujet, Je parlais du groupe existant : mrp.group_mrp_user.
je le pensais pour #158 (comment)

@quentinDupont
Copy link
Member Author

hello ! je crois que je me suis pas fait comprendre ! le module dédié, je le pensais pas pour le coup du bom_user : sur ce sujet, Je parlais du groupe existant : mrp.group_mrp_user. je le pensais pour #158 (comment)

Ah mais oui ok

@quentinDupont quentinDupont force-pushed the 16.0-ADD-mrp_product_price_quick_menus branch from 3d966ae to a46a093 Compare July 25, 2024 13:05
@legalsylvain legalsylvain changed the title [16.0][ADD] mrp_product_price_quick_menus, mrp_bom_group [16.0][ADD] mrp_product_price_quick_menus, product_standard_price_change_date Jul 29, 2024
@legalsylvain legalsylvain added this to the 16.0 milestone Nov 15, 2024
@legalsylvain
Copy link
Member

MeP du 14/11/2024

/ocabot merge nobump

@github-grap-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-158-by-legalsylvain-bump-nobump, awaiting test results.

@github-grap-bot github-grap-bot merged commit b456a42 into grap:16.0 Nov 15, 2024
4 checks passed
@github-grap-bot
Copy link
Contributor

Congratulations, your PR was merged at c7c02bf. Thanks a lot for contributing to grap. ❤️

@quentinDupont quentinDupont deleted the 16.0-ADD-mrp_product_price_quick_menus branch November 15, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants