Add a custom field to pricelist and multi-currency calculations in Odoo 13 - odoo-13

In Odoo 13 I have added a custom field to the product.template model that is displayed on order lines.
Some products will use the sliding price scale dependent on quantity.
I have created a pricelist in a different currency that refers to my base pricelist.
I am trying to include my custom field in the pricelist methods that retrieve the sliding scale price and/or the converted currency value.
I have looked at overriding various methods but have not been successful because it seems many of the base methods have the product price field hardcoded as the value to use.
AM I missing something simple? Is there an easier way of including my custom field, or would I have to override many methods to include my custom field?

Related

Cloud vision Product search api labels

Can we add labels of our own choice in cloud vision product search API? Source: Formatting a bulk import CSV.
Let's say I want to add labels like category=hello, style=world.
Or is there a fixed domain of category and style values from which we need to choose?
Yes, you can add the labels as you want to describe the product.
You can check in this documentation the values allowed for each field.
productLabels - object (KeyValue): Multiple values can be assigned to the same key. One product may have up to 500 productLabels.
The only filed that you have to choose the proper values is product-category:
product-category - Allowed values are homegoods-v2, apparel-v2, toys-v2, packagedgoods-v1, and general-v1

Acumatica Formula for Dividing 2 values

I am trying to divide values and display it in a new custom field(usrQuantity)on Stock Items Screen.
I want to divide OpenQty (which is a column in POLine) and CARTONQTY(which is not a column name but just an attribute in column AttributeID in CSAnswers table).
enter image description here
I am confused how to perform this division since CARTONQTY is not a field, I noticed that there is a field named CARTONQTY_Attributes in InventoryItem table which has been generated by some Join queries but is not actually present in the Database(checked in SQL Management Studio).
enter image description here
I tried this formula in the DAC of usrQuantity
[PXDBInt]
[PXUIField(DisplayName="Quantity")]
[PXFormula(typeof(Div<POLine.orderQty,InventoryItem.CARTONQTY_Attributes>))]
But it is giving following errors
The type or namespace name 'POLine' could not be found (are you missing a using directive or an assembly reference?)
The type name 'CARTONQTY_Attributes' does not exist in the type 'PX.Objects.IN.InventoryItem'
Do you want to store the value in the db? Typically it's not recommended practice to persist calculated values unless, for example, there's a performance issue in performing the calculation on the fly. If you don't want to store it, you probably want a PXInt instead of PXDBInt. Also, unless you always expect a whole number as a result of your division (which is unlikely), you should probably use a PXDecimal type.
To then get your calculated value into your new field, I would probably set it in RowSelecting and RowUpdated event handlers by extending the appropriate PXGraph class; in order to calculate it as you retrieve a row and when you update the row values.

Calculate Field Get Sum

Hi i'm having trouble finding the correct attribute syntax to calculate the total sum for an unbound field.
Could somebody point me into the right direction?
I have a custom DAC and a unbound field called Actual
Also in my DAC is employeeid, projectid and taskid.
I want Actual to show the sum of the quantities of all project transactions that contain employeeid, projectid etc. Pretty simple right? I know theres a SumCalc but am not sure on how to use it.
There is no attribute in Acumatica to calculate total sum for an unbound field. The PXFormulaAttribute and the PXUnboundFormulaAttribute are designed to always store aggregated value inside a bound field.
To calculate total sum for an unbound field, you should implement FieldSelecting handler as shown in Step 11.8: Calculating the Total Amount of the T300 training course.

nopcommerce assign product on attribute combinations

I have a customer request that I would consider common for a cloth store, however not found a way to implemented it on NopCommerce.
The problem is that we stock t-shirts, jumpers etc in various colours and sizes, possibly separate the sex as well.
The actual products for sale are the primitive products with a particular design.
So Design 1, Design 2 ... Design N all use the same stock.
My idea was to be able to associate primitive products with a particular combination.
That is not possible on nopcommerce. I can only associate a product to a particular attribute value.
Any idea/solution?
You can use product attribute combinations in nopCommerce. Note: Attribute combinations are useful only when your Manage inventory method is set to Track inventory by product attributes
Follow the below steps.
Create a Product.
Create a product attributes ex. Image Squares. 3 values. Edit a value and upload square image and product image.
Create another product attribute. Image squares. 3 values. Edit a value and upload square image and product image.
add a condition on second attribute that if a value from first attribute is selected then only second product attribute should appear.
The first attribute selection will change the product image. The second won't.
Now if you remove the product image from first attribute, then second attribute selection will work.

SSAS, dimension numeric value filtering

I am using the multiple dimensional model in SSAS with a seemingly simple requirement.
I have a Product dimension table with a Price attribute. Using Excel pivot-table, I want to filter this Price attribute, for example "greater than $1000". However the filter in the pivot table is a string only, hence I can not do perform any numerical comparison operations, but rather for equivalent strings, e.g. "$1,000.00".
My problem is similar to this thread, and I wonder if there is a solution/work around that I missed?
Best regards,
CT
As suggested in the thread that you link, you could create a measure for the price, and then filter that. The definition of this calculated measure would be something like
[Product].[Product].Properties("Price", TYPED)
assuming the dimension as well as the attribute are named "Product", and the attribute has the price defined as a property named "Price".
(You define a property in BIDS as a relationship from the Product attribute to the Priice attribute.)

Resources