Get the count of received (purchase) and delivered (sold) qty in the product form header in odoo 13 - stock

I want to know how can I get the total received and total delivered quantity to be shown on the header of product form
For example check this screenshot

Related

Only Show unique Customers per date cohort for repeat purchase rate

Scenario:
I have a table that has all of the customer purchases by Month and each month has a period. Within that table I am showing the customers that have made purchases in each Month/Period. What I am trying to figure out is how to exclude any customer that made a purchase in the previous month so that the repeat purchases are only for unique customers. The data looks like the following:
customer_email
cohortMonth
month_number
orders_for_period
abc#gmail.com
10/2019
0
2
def#gmail.com
10/2019
0
1
ghi#gmail.com
10/2019
0
1
def#gmail.com
10/2019
1
1
abc#gmail.com
10/2019
1
1
def#gmail.com
10/2019
2
1
In the Table above for Month_number=0 we have 3 total customers and within this period customer abc#gmail.com was the only repeat customer because they have 2 orders. This would show as a 33% repeat purchase rate for month_number 0. For Month_number=1 we have 2 customers that have purchased again in the period but only def#gmail.com is unique as abc#gmail.com already made the purchase. This would then bring the repeat_rate to 66% as now 2 customers have comeback and purchased out of the 3 that originally purchased.
cohortMonth
month_number
repeat_purchase_rate
10/2019
0
33%
10/2019
1
66%
10/2019
2
66%
With every unique customer that purchases in the subsequent periods we want to add that to the total to understand the repeat rate at a cumulative level.
I have tried a ton of different ways to figure this out but backing out the customers that made purchases in the previous period and only showing the unique customers is where I am struggling at. Any help is greatly appreciated!
Side Note: Whenever I format a table it looks like how I want it to look in the preview but then when I review I get the error :"Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon."
I then indent and it breaks the way the table looks. Any help on that would be great as well. Thank you

How to allow user that after order placed before shipping user can update the product quantity in Shopify

Scenario
User loges and selected 3 products e.g. A - 2 Quantity , B - 1 Quantity , C - 4 Quantity
After selecting user placed order.
Now user thinks that wrong quantity of product selected and s/he wants to update quantity like A - 4, B - 2, C - 1
How we can achieve this scenario using code, API or App in Shopify
order placed is order placed.
Anything happened after, eg. price, quantity, cannot modify.
You can cancel the order, create a new order manually with different quantity within Shopify Admin.

how to display fields with header only if they are greater than 0 in crystal reports?

I am creating a crystal report from a datatable which has two columns: cash and card. The datatable is populated via an SQL query.
My report shows correctly, but now I want to change it to only show cash or card entries if they have values (not 0). Otherwise, the field should not show with its header.
For example, if cash has a value of 100 and card has no value or is 0, then the report shows only the cash entry with its header. If cash and card both have values then both should be display with their headers.
Right now I see this:
cash 100
card 0
I'd like to see this for the same data:
cash 100
How can I do this?
You can split the detail section yo Detail a and Detail b (right-click, Insert Section Below). Place the card info in Detail b.
Then, set a dynamic Suppress expression for each section to ensure they don't show if their respective amounts are zero (Value = 0).

Display all product in sale report

in sale report you can choose only products and quantity bought per costumers and export it as an excel file
what i need is a way to show all products even if the quantity is 0
Is that possible ?
Thanks.
you can using the advanced filters in the search bar
chose quantity on hand equal 0 or greater than 0

i get wrong data with WebI report Filter

I Created webi report result in crosstabe table,
when I try to get only the customer who made trans more than 50 in total like the customer 222 all the data less than 50 not show up,
example:
customer (222)
did two actions 1- 3/25/2018 with amount 209 gb,
2- 3/29/2018 with amount 14 gb,
the sum of both is (223),
I need to get all customer who made more than 50 actions in all days, when I try that by adding a filter the action in day 3/29/2018 is not shown & only the action in 3/25/2018 is what I get.