Server Error Model: Stock Move (stock.move), Field: Product (product_id) - bundle

I downloaded this app "Odoo Product Pack (Bundle) or Combo Products"
for the odoo store but after creating the Bundle when I try to use it in Quotations
this "Server Error" shows
The operation cannot be completed:
Create/update: a mandatory field is not set.
Delete: another model requires the record being deleted. If possible, archive it instead.
Model: Stock Move (stock.move), Field: Product (product_id)
The error happens when I try to confirm

This error comes when you try to delete product which is associated with some stock move. So please delete stock moves of the product first and then delete products

Related

How can I solve "out of stock" in magento?

I have build magento website.
But I add products but their quantity are showed as out of stock.
what should I do?
Please help me.
I want to show the quantity as in stock.
First it is necessary to validate some product data
Access your store's administrative panel at: Catalog => Products
Select the product that has the error
Check if the value of the “quantity” attribute is greater than 0
Check if the value of the “stock status” attribute is “in stock”
If everything is ok, a possible error could be the lack of indexing of the catalog, to validate this probability go to: System => Index Manager
Change indexing mode to “update on save” of indexes: stock, catalog product rule, product catalog, category products, and inventory
After checking the indexes, access your product again and click on the “save” button, clear all store caches in: System => Manage Cache and check if the product now appears as “in stock”
If the error persists, it is necessary to carry out a more technical analysis, analyze possible error logs when indexing the store and check the status of the indexes via ssh
Some useful commands are:
Display status of indexes:
php bin/magento indexer:status
Reindex:
php bin/magento indexer:reindex

Update a existing record instead of creating new record of same entity in MS CRM

I have work order product entity which have product, status and quantity field in MS CRM online. When user tries to create a new record of work order product entity, quantity of existing work order product record with same product should be increased instead of creating new work order product record (without letting user know). Can anyone explain how to achieve this requirement ? This should work for creating record by form or by data import/export.
You must write a plugin in the creation event (post operation) of the order product. In this plugin you need to check if you have another ordering product with the same product.
If so, you must increase the quantity of your existing product order and delete the new one.
If you want to have a good user experience, you can send an alert to your user to inform them of this logic when creating a new order product with the same product as that of an old one.

Some products not showing up in magento backend but exist

When am trying to search a product by sku for example "abc123" in backend then magento not gives any result but when am trying to find this in Global Record Search then magento give me a record of this product. I don't understand that actually where this product exist and from where i can found in backend?
and probably this product was added by quick product creation.
Please go to the product configuration page and go to the inventory and set particular product qty as you want and select stock availability as "in stock"
I hope you solve your problem instantly.

Products are not displaying in Frontend after import in Magento

I have imported products using System - Import/Export - Import option.
I can see my products in Admin panel, but not in Frontend.
I tried Re-indexing, cache clear, cache refresh, physical cache remove.
also checked product stock status, availability etc. Everything is ok.
But they are not displaying in frontend. I marked onething, If I open product that I imported using csv, just saved without any change, it starts displaying. But I have 100s of products. So I can't use this solution.
So please help me where I am going wrong in csv. below is my csv screenshot.
You need to ensure that the products are attached to a website.
This can be done via a bulk update:
Access the product listm select all
Alter attribute
Products information -> websites
It can also be done in the csv by using a "_product_websites" field and setting it to the website name or 'base'.
I forgot which CSV columns are mandatory but I do remember that if some are missing the importer does not tell you that but instead you get the behaviour that you are describing.
The simplest way to find out what is mandatory is to:
Fix bugs in Magento ImportExport module
Create a new product in admin
Check that the new product is visible on front-end
Export the new product with Magento ImportExport exporter
Delete created product
Import the previously exported product csv
Clear cache and reindex data
Check that product is visible on front-end (it should be)
Compare your CSV with the exported one and try to figure out what is missing from it
Try to import your CSV with added/fixed columns and add data untill the product is imported so that it is visible on front-end
This requires allot of trial and error...
The missing columns in my case had always the same value so if this will be the case with your problem as well you can simply extend CSV importer and hard code those values in there instead of fixing your CSV manually.
Since your product gets saved correctly if you open it in admin and save it you can also:
Import a product
Export that product
Open that product in admin and save it
Export newly saved product
Compare exported CSV-s where they differ
Fixing Magento ImportExport bugs:
First bug is that if you import multiple products the quantity informatino from the first product is used for all the products. To fix this you have to add $row = array(); right before $row['product_id'] = $this->_newSku[$rowData[self::COL_SKU]]['entity_id']; in Mage_ImportExport_Model_Import_Entity_Product::_saveStockItem() function.
The second bug causes Magento ImportExport module to return a foreign key constraint error when importing multiple products. Error happens because magento splits products data into multiple segments and if one product is located in two segments importer will delete data that was imported for the product in first segment before importing the second segment thereby causing database corruption (see this link for detailed explanation - this is where I got the solution below).
Note that removing foreign key constraint will not fix the problem but will instead make it worse since the database will contain corrupt data.
To fix it you have to change the code in Mage_ImportExport_Model_Import_Entity_Abstract::_saveValidatedBunches() function:
After if ($startNewBunch || !$source->valid()) { add
if ($startNewBunch && count($bunchRows) > 1) {
$arrKeys = array_keys($bunchRows);
$arrNew = array();
while(($tRow = array_pop($bunchRows))) {
$tKey = array_pop($arrKeys);
$arrNew[$tKey] = $tRow;
if ($tRow['sku']) {
break;
}
}
$nextRowBackup = array_reverse($arrNew, TRUE) + $nextRowBackup;
}
Hope this helps.
I had the same problem recently and I spent some time tring to figure it out...
Looks like magento needs a status flag for every product otherwise magento will not show it in the dashboard.
Solution : add a "status" column to your CSV file and set all the statuses to "Enabled"
(yes it's not a boolean. Just use the string inside the quotes as it is :)
I was stuck with the same problem, i then visited my var/export/export_all_products file, downloaded it again and uploaded the same back through import, logged out of my account and logged-in back, all products were back. This worked as a backup for me and i could see all the products back at the back-end.
Import as you have. If they are enabled, but not showing...
then you can fix this by clicking "select all" products in the "manage products" table and then "change status" and then select "enabled." This process might take a minute.
Visit your store and you should see your frontend with products.
Some kind of bug with the status/enabled setting.
You must have next fields in CSV
sku
_attribute_set
_type
_category
description
image
name
price
short_description
status
tax_class_id
thumbnail
visibility
weight
qty
_product_websites
is_in_stock
Please note that field is_in_stock is mandatory even if qty more then 1
In magento 2 we need to reindex in index management to display the products in frontend.
We can reindex through cmd.like the given example we need to enter magento file directory after that cmd php -f bin/magento indexer:reindex to reindex .
When I first started importing products via csv although I set the product to enabled, I figured out that even though it shows in the magento back end as enabled, it actually isnt - think its to do with setting the field contents as "1" or "0" rather than "enabled" or "disabled/null".
To get around this, after a import I simply selected all the products in the back end and change status to enabled - it fixes issue.
But, I do think if I simply changed the data in the csv import it would save me this minor in-convenience.

Magento Stock (Configurable, Bundle)

I have a website made with Magento, and a theme by me. The problem is:
The simple product with low stock is associated to a configurable product, and when i try to add a higher quantity of that simple product, it allows, and then, after the checkout proccess, we receive a e-mail from the store that there is a failure in the proccess like:
Payment operation failed:
Reason:
Not all products are available in the requested quantity
It occurs in bundle products that have a default quanity more than 1 too.
Someone can help me?
Thanks.
EDIT:
Found this solution but i can't truncate my sales tables on database. I have all my sales records there, and there are a lot of them. I can't loose it. Magento: After ordering configurable product, its canceled because its out of stock
How many orders do you need to remove? If you got a handful that you can count by hand, you can try this solution to remove unwanted orders.
how can i delete test order from magento
It looks like it should work, but, as always, review the code and try it on one order first..

Resources