how to reserve quantity partially for delivery order in odoo - odoo-10

I have one Product with on-Hand Quantity is 600.
and There are Two Delivery Orders, one is for 400 and other is for 500
but i want reserve both order partially by 300 each DO.
how can i do that in odoo9/10/11.

If I understood properly the question, you just have to edit the "TODO" column before validating the delivery orders and set up 300 units each.
By doing that you can do partial delivers of 300 units for each delivery order.
Then you have the option to select to "create backorder or not create backorder" depending on if you plan to deliver the remaining quantities later or not.
Note that "ToDo" column is only present if in the sale order you allow "partial delivery of goods" (can't remember the exact term in English).
Hope this helps, not 100% sure if this is what you are asking.

Related

DDD Events Between Aggregates Example

I have two aggregates
item and price adjustment.
A price adjustment will contain an item adjustment which will say, for a specific item, raise it by x percent (e.g. 10%)
my item has a list price which is what needs to be updated/adjusted.
so when the price adjustment is processed, it is going to find that item and needs to adjust that item's list price by the percentage specific. When the adjustment is complete, the item adjustment in the price adjustment needs to be marked as complete
My question is how is this updating of the list price and marking of the item adjustment being performed composed into events?
What is the correct way for me to both update the list price and mark the item adjustment as completed following events?
Is this a correct solution?:
call function on the item such as AdjustListPrice and pass in the price adjustment information such as the id and percentage to be adjusted by.
Then raise an event such as ItemListPriceAdjusted have the price adjustment listen so that it can mark the adjustment as complete and raise another event such as itemPriceadjustmentCompleted
if this is the correct way, should the new calculated list price be added to the ItemListPriceAdjusted price, or should just the adjustment percentage be added and this is then calculated when it is applied/read from the aggregate?
Thanks
Edit:
The option i currently went with is when the price adjustment is being processed, it will go through each of the item adjustments.
It will find the item that it targets and call the function
AdjustPrice(Guid priceAdjustmentId, decimal adjustmentPercentage)
This will calculate the new list price for that item and the item will emit an ItemPriceAdjusted event, which contains the price adjustment id, the and the new list price
The price adjustment will then listen for these events and mark the relevant item adjustment as complete, in turn emitting its own ItemAdjustmentCompleted Event
We are talking DDD here. So the first question I'd ask is what's happening in the business that you want to reflect with code.
It is highly unlikely that a business would decide to "adjust prices" by 10% on the whole assortment. That has something to deal with the pricing strategy. Which is individual to a product or a category of products. So, I'd start with asking the business first.
Next, if in the underlying business you have some dedicated people or departments to deal with the pricing, that would give you the context boundary. Most likely pricing is a separate domain from inventory (listing the products). Most likely there is some base price, the prime cost of a product. Then there are some additional costs, some margin to it which will form the profit. So, by "adjusting" a price - what are you going to achieve? Does it mean that a prime cost changed? Or a margin changed? Or some marketing campaign ended? Figure it out - and you'll get the answer to your question. You'll be able to derive the event name from it.
To sum up: store/fire/raise/dispatch an event that is relevant to THE business.

Shopify adding offers to items when checkout to change the total order price

I am looking to be able to add offers to my items in Shopify. E.G if a customer orders 3 items then the total order price would get set to something like $15 but if the customer orders like 5 items the total order price would be set to something like $20.
It would also need to work if 4 items were added to the checkout so the price would come out something like 3 items for $15 + $5.95 for the 4th item and so on for the other items.
Any help is appreciated.
Each variant in your Shopify store has a fixed price. At this time, you are unable to change what you charge for that variant item on an order-by-order basis.
The popular way around this, is to create multiple variants of the same product, with different prices for different quantities.
Example:
product: widget
variant: widget-3-or-less price: $10
variant: widget-4-to-10 price: $8
variant: widget-10-or-more price: $5
Clearly you don't want people to be able to add whichever variant they want, or else everyone would simply add the cheapest one without any regard to the required quantity. So you need some sort of backend application that will safeguard the variant selection, and automatically determine which variant should be in a customer's cart based on their desired quantity, and adjust their cart accordingly.
It's a lot of work to code from scratch. Completely possible, but, in most situations it is more viable to use a 3rd party Shopify App to handle it. In your case, the "Quantity Breaks" app by Bold Apps would work great. It has all of that functionality already made and ready to go.
https://apps.shopify.com/quantity-breaks

Quantity Bought Confusion on Magento Software

We have a Magento software and we are using platform to sell travel deals.
Now when we for instance block say 20 spaces and someone makes a purchase for say 10 people in one bulk purchase, the Quantity bought shows as 1 and it is possible to buy for more people because because the remaining quantity left shows as 19 out of 20 and this is a huge problem because people will still be able to purchase products that are sold out.
Does anyone know how to make the Quantity remaining be a subtraction of the total bought from the total quantity (as opposed to seeing every bulk purchase as 1 Quantity?
Any help will be greatly appreciated.
I think you are defining stock value for block size which is not good way. Add custom attribute for block size and disable stock management, follow steps below
Admin -> System -> Configuration
Select Inventory under Catalog (on left nav bar)
Look Product Stock Options, Set No to Manage Stock. and Save

Expresso Store - Exclude Product from Order Quantity

I'm using Expresso-Store to process product orders for a non-profit. In addition to selling a range of handmade products we are offering visitors an option to donate.
I have most of the donation stuff working just fine. I used Justin Long's advice posted here: http://iamjustinlong.com/blog/single/accepting_donations_with_expresso_store/
As suggested I have created a channel for all the products and then a separate channel which holds a single "Donation" product with a cost of $1.00. The visitor adjusts the quantity of this item which results in a donation amount of $1.00 * qty.
The specific problem I'm running into is displaying the total quantity of items in the cart when there's also a "Donation" product added. Since the donation amount is determined by quantity * $1.00 but in reality it represents a single donation, my {order_qty} is way off since it includes the many multiples of Donation products.
I have a small cart icon that is displaying a number above and next to it with the {order_qty} but I need to exclude the donation product from this calculation. How might I go about this?
This would be fairly difficult to do using the current version. The best I can suggest is not to display the {order_qty} on your checkout page (most sites only display the total anyway).
However, in saying that, the next version of Store has first-class donations support, so it will soon be possible.

Basket price rules - Magento

I tried to set up a basket price rule: save 25 when you spend £300 or more on specific products.
condition:
subtotal equals or greater than 300
product attribute combination: category contains "the specific product"
Action
fix amount for the whole basket: 25
However, the rule always applies when customers spend more than £300 and contains the specific product. It doesn't require them to spend more than £300 on the specific products.
Anyone knows how to set up this kind of rule? I want customers spend £300 on the specific products, and the basket could contain a few different products??
Thanks

Resources