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

[12.0][3697][ADD] product_standard_price_restriction #103

Merged
merged 7 commits into from
Oct 27, 2023

Conversation

AungKoKoLin1997
Copy link
Contributor

@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2023

Codecov Report

Merging #103 (d8c0fdd) into 12.0 (94bc403) will increase coverage by 0.18%.
The diff coverage is 78.26%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             12.0     #103      +/-   ##
==========================================
+ Coverage   72.64%   72.83%   +0.18%     
==========================================
  Files          84       88       +4     
  Lines         680      703      +23     
  Branches      126      131       +5     
==========================================
+ Hits          494      512      +18     
- Misses        176      181       +5     
  Partials       10       10              
Files Coverage Δ
...duct_standard_price_restriction/models/__init__.py 100.00% <100.00%> (ø)
...t_standard_price_restriction/models/res_company.py 100.00% <100.00%> (ø)
...rd_price_restriction/models/res_config_settings.py 100.00% <100.00%> (ø)
...ndard_price_restriction/models/product_template.py 58.33% <58.33%> (ø)

@@ -0,0 +1,41 @@

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="group_product_manager" model="res.groups">
Copy link
Member

Choose a reason for hiding this comment

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

@rinaldifirdaus Do you think we should add this group this time, according to the requirement discussed with the client?

Copy link
Member

Choose a reason for hiding this comment

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

@rinaldifirdaus Please add the business background.

raise UserError(
_(
"You are about to update the cost. This field is "
"auto-calculated by Odoo and is an 'Weighted Average Value' of "
Copy link
Member

Choose a reason for hiding this comment

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

It is not good to hardcode a message like this. Can we make the message more generic, or put it in a configuration field (upon adding a field perhaps in res.company)?

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 3697-add-product_standard_price_restriction branch from 42381b6 to 4dc2d64 Compare October 24, 2023 07:06
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 3697-add-product_standard_price_restriction branch from 4dc2d64 to b464a18 Compare October 24, 2023 07:25
Copy link
Contributor

@rinaldifirdaus rinaldifirdaus left a comment

Choose a reason for hiding this comment

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

Functional test: Working as Expected!

_inherit = "product.template"

standard_price = fields.Float(track_visibility='onchange')
update_cost = fields.Boolean()
Copy link
Member

Choose a reason for hiding this comment

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

Add help.

@yostashiro yostashiro merged commit 79beb6a into 12.0 Oct 27, 2023
2 checks passed
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.

4 participants