How to print stock moves with current stock quantity - odoo-10

In Inventory location in module Inventory. It shows list of products in that location and the quantity of available stock. It is easy to print that out with a report.
However, if I want to show the stock moves related to each product quantity and show it under the total of each number of current stock, how can that be done?
For example:
Formatting
Also, I would want to print the data out in this format. How could it be done?
I have tried linking the stock.moves field to the stock.quant model but I am not sure how to present the data in that format with the current stock level as a summary above all related stock.moves

Related

How to filter product collection with multiple price range on same time in magento?

I want to filter product listing page collection with multiple price range. Like i want to filter PLP page collection as mentioned below.
40-50
80-90
Above are filtered price ranges and i want plp page collection with this 2 ranges on same time.
I have try to add multiple filter in addFieldtofilter as well as addattributetofilter but it's showing always last range result. Let me know any solution for same.

How to get stock market Index value (NASDAQ,S&P500) in yfinance?

I am looking to download historical NASDAQ, S&P500 values similar to how they are pulled for single stocks.
For example, for apple stock price, this works:
apple = yf.Ticker("AAPL")
apple.history(period="Max")
This outputs a dataframe with apple stock price data
However, for stock market index (such as NASDAQ), i get the following error:
ndq=yf.Ticker('^IXIC')
ndq.history(period='Max')
'Index' object has no attribute 'tz_localize'
How can I pull historical index values (NASDAQ, S&P500, DowJones) using their tickets from Yfinance?

Change Order Date when changing an order

I'm hoping someone will be able to solve an issue that takes us a lot of manual labour, the solution seems simple :-)
Summary:
Is it possible to change the code that, when you Edit an order (invoiced or not yet invoiced) that is does not take the Order Date and Time of when you edited the order, but it uses the Order Date and Time of the original order?
Example:
Order 1000 was placed on 15/05/2015 at 12:00
Order 1000 was edited on 25/05/2015 at 14:00, the new order ID is 1000-1
We will credit or cancel order 1000, depending on the invoice state
Standard Magento will give order 1000-1 the Order date of 25/05/2015 14:00
But we would like order 1000-1 to receive the order date of 15/05/2015 12:00, the same as original order 1000.
Explanation:
We use a Magento Extension (Embedded ERP) which uses product reservations. If a customer orders a product, it does not remove the item from stock, but reserves stock. If the item is on backorder, the customer is placed in queue.
The system uses a first in, first out system. It uses the order date to check which customer is higher in queue than the other customers.
Because we use backorders, customer sometimes like to add or remove items to order, because they have to wait for items anyway. But when changing an order to add or remove items, the new order gets a new Order Date and Time. We want the customer to have the same product reservations as their original order. So now we manually change the product reservation of each item so it's the same as their original order.
I expect we can have the correct product reservations on the new order done automatically when the new order has the same order date and time of the original order.
Copy the file app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php into app/code/local/Mage/Adminhtml/Model/Sales/Order/. Keep the folder structure unchanged!
Find the option createOrder() and change this
if ($this->getSession()->getOrder()->getId()) {
$oldOrder = $this->getSession()->getOrder();
$this->getSession()->getOrder()->setRelationChildId($order->getId());
$this->getSession()->getOrder()->setRelationChildRealId($order->getIncrementId());
$this->getSession()->getOrder()->cancel()
->save();
$order->save();
}
with this:
if ($this->getSession()->getOrder()->getId()) {
$oldOrder = $this->getSession()->getOrder();
$this->getSession()->getOrder()->setRelationChildId($order->getId());
$this->getSession()->getOrder()->setRelationChildRealId($order->getIncrementId());
$this->getSession()->getOrder()->cancel()
->save();
$order->setCreatedAt($oldOrder->getCreatedAt());
$order->save();
}

Google Spreadsheets multiple/scenario filter dropdown

I can create drop down filter options for each of the dimensions in the spreadsheet: month, description, and type. using data validation and then sum(filter in Google Sheets. I want to include an option in the drop-down to include all months, include all types, etc. The end product would sum the amount based on the filters selected. I can sum(filter based on individual selections but my question is how to sum the amounts if one of the scenarios was: all months, groceries only, all descriptions.
https://docs.google.com/spreadsheet/ccc?key=0AgKUNhffHpmZdHZ3TGNXOUplN1R5UUlUSW5tVVp5b1E#gid=0
You'd have to use a Pivot Table. Then you have all this things in one view.
Select colums A to D. Go to Data/Pivot Table.
Add Month to Rows and Description to Colums (or vise versa) and add Amout to Values.
You'll see a total for all Descriptions/month and Grand total/month and /description.

How to set minimum purchase order amount

When customer places an order, how to set minimum order amount?
i.e) Total amount of order not below than $500.
I know how to get total order amount. But I don't know where to place that code and where to check
sOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$oOrder = Mage::getModel('sales/order')->load($sOrderId);
if($oOrder >=$500)
{
.....
}
If customer has purchased total less than $500, they won't allow to checkout at the cart.
Login as admin, then go to System->configuration, then select ‘Sales‘ from left Nav and click on ‘Minimum order amount‘.
Then select Yes from Enable dropdown, enter Minimum order amount, enter message and also enter error message that will be shown whenever the order will be less than specified amount at the shopping cart.
Thanks.
You need to change the scope of the minimum amount setting. For that you need a new module with a system.xml file that contains the same path to the minimum amount field and just changes the <show_in_store> value. Read more about this here.

Resources