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

Product price not found if ASI was added to order line #5917

Open
metas-ts opened this issue Dec 13, 2019 · 0 comments
Open

Product price not found if ASI was added to order line #5917

metas-ts opened this issue Dec 13, 2019 · 0 comments

Comments

@metas-ts
Copy link
Member

@metas-ts metas-ts commented Dec 13, 2019

Is this a bug or feature request?

Bug

What is the current behavior?

  • Might depend on the order in which model interceptors are invoked
  • happened when the system tried to create a sales order line from an C_OLCand
  • the pricing engine is fired up multiple times, from MOder.beforeSave() and different model interceptors.
  • the first fewe times it works
  • then an attribute-value-generator creates a LotNo ASI for the order line
  • then it fails in my case, because
    • the M_ProductPrice is question has a packaging => PLV pricelist rule does not apply
    • HUPricing rule should apply, but because of the ASI, it decides to only look at M_ProductPrices with IsAttributeDependent='Y'
      • (therefore, if we set IsAttributeDependent='Y' on that M_ProductPrice even without specifying attributes - then it works in this case)

What is the expected or desired behavior?

HUPricing rule should apply; if there is an ASI invoked (e.g. in the order line), it should prefer M_ProductPrices with IsAttributeDependent='Y', but also apply prices wit hIsAttributeDependent='N'

@metas-ts metas-ts added the type:bug label Dec 13, 2019
metas-ts added a commit that referenced this issue Dec 13, 2019
* HUPricing - accept packaging prices that are not attribute-dependant, even if the referenced product is ASI-Aware (but do prefer attribute-dependenat prices)
* AttributeSetInstanceBL - fix warning that flooded the log
#5917
metas-ts added a commit that referenced this issue Dec 13, 2019
* HUPricing - accept packaging prices that are not attribute-dependant, even if the referenced product is ASI-Aware (but do prefer attribute-dependenat prices)
* AttributeSetInstanceBL - fix warning that flooded the log
#5917

(cherry picked from commit 73e22dd)
metas-ts added a commit that referenced this issue Dec 13, 2019
* make sure that we have an OrgId in the pricing context (not by hoping that it's in the Env-`ctx`)
#5917
metas-ts added a commit that referenced this issue Dec 13, 2019
* make sure that we have an OrgId in the pricing context (not by hoping that it's in the Env-`ctx`)
#5917

(cherry picked from commit edbb234)
metas-ts added a commit that referenced this issue Dec 13, 2019
* fix possible NPE if legacy code "actively" neglected setting the orgId
#5917
metas-ts added a commit that referenced this issue Dec 13, 2019
* fix possible NPE if legacy code "actively" neglected setting the orgId
#5917

(cherry picked from commit 7bed5bb)
metas-ts added a commit that referenced this issue Dec 13, 2019
metas-ts added a commit that referenced this issue Dec 13, 2019
* HUPricing - accept packaging prices that are not attribute-dependant, even if the referenced product is ASI-Aware (but do prefer attribute-dependenat prices)
* AttributeSetInstanceBL - fix warning that flooded the log
#5917

(cherry picked from commit 73e22dd)
metas-ts added a commit that referenced this issue Dec 13, 2019
* make sure that we have an OrgId in the pricing context (not by hoping that it's in the Env-`ctx`)
#5917

(cherry picked from commit edbb234)
metas-ts added a commit that referenced this issue Dec 13, 2019
* fix possible NPE if legacy code "actively" neglected setting the orgId
#5917

(cherry picked from commit 7bed5bb)
metas-ts added a commit that referenced this issue Dec 16, 2019
  * [#5800](#5800) Add Payment Type, Shipper, Sales Partner to order candidate endpoint
  * [#5856](#5856) Add payment rest endpoint
  * [#5865](#5865) Picklist not working: "Type not supported: UNALLOCABLE"
  * [#5887](#5887) Additional Invoice Information
  * [#5888](#5888) Picklist ordered by locator name + dimensions
  * [#5895](#5895) Create Window for managing Manufactoring Workflow
  * [#5900](#5900) product proposals: Copy product price from other price list shall set IsInvalidPrice=N
  * [#5901](#5901) Automatically create C_ValidCombination(s) when a new C_ElementValue is created
  * [#5906](#5906) Add poreference field in the sql function to get data for sales order report
  * [#5908](#5908) SQL Process for BPartner Products as Excel List
  * [#5912](#5912) Read documentno field in the report for customer invoice with credit memo
  * [#5917](#5917) Product price not found if ASI was added to order line
  * [#1330](metasfresh/metasfresh-webui-api#1330) Reduce the number of websocket events we are sending to frontend
  * [#2469](metasfresh/metasfresh-webui-frontend#2469) Re-fetch tab's actions when the document status changes
  * [#2436](metasfresh/metasfresh-webui-frontend#2436) Follow-Up: Customer Proposal List navigation with arrow keys (qty arrows out)
  * [#5903](#5903) Fix country code from de_metas_endcustomer_fresh_reports.Docs_Sales_Invoice_Root
  * [#2471](metasfresh/metasfresh-webui-frontend#2471) Attributes cannot be set in orderline grid view
  * [#2477](metasfresh/metasfresh-webui-frontend#2477) Location name seems to get lost when editing the location
  * [#2488](metasfresh/metasfresh-webui-frontend#2488) Add new button doesn't work anymore
metas-ts added a commit that referenced this issue Dec 16, 2019
* HUPricing - accept packaging prices that are not attribute-dependant, even if the referenced product is ASI-Aware (but do prefer attribute-dependenat prices)
* AttributeSetInstanceBL - fix warning that flooded the log
#5917

(cherry picked from commit 73e22dd)
(cherry picked from commit 1daeaee)

solved Conflicts:
	de.metas.business/src/main/java/de/metas/pricing/rules/PriceListVersion.java
metas-ts added a commit that referenced this issue Dec 16, 2019
* make sure that we have an OrgId in the pricing context (not by hoping that it's in the Env-`ctx`)
#5917

(cherry picked from commit edbb234)
(cherry picked from commit 6db8f6e)

solved Conflicts:
	de.metas.business/src/main/java/de/metas/pricing/service/impl/PricingContext.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.