Connectors mailing list archives

connectors@odoo-community.org

Avatar

Re: Inventory Sync after Mass Inventory Adjustments

by
AlphaPet Ventures Financing GmbH, Markus Schneider
- 04/05/2016 22:55:25
Hi Michael,

odoo inventory is a tree. So just configure the two location that they
have a parent location together and sync the inventory of this location.

Kind Regards

Markus

On 04.05.2016 16:23, Michael Aigner wrote:
> Hi Guewen,
> 
> 
> thanks for your answer! I think I found the problem. The problem is that
> we have 1 warehouse with 2 different locations that we use. Both
> locations can have the product on hand. What I just saw is that in the
> backend settings I have 2 fields called “Quantity On Hand” and I think
> that they are for the 2 different locations that we have configured. So
> is there a way to use both locations as one combined “Quantity On Hand”
> as it is also shown on the product itself in Odoo on the Inventory Tab?
> 
> Thanks,
> Michael
> 
>> On May 2, 2016, at 4:38 PM, Guewen Baconnier
>> <guewen.baconnier@camptocamp.com
>> <mailto:guewen.baconnier@camptocamp.com>> wrote:
>>
>> Hi,
>>
>> The first thing to do is to verify that you don't have a wrong stock
>> field selected on the backend [0]. If the field is empty, "Quantity
>> Available" is used.
>>
>> Then, the mechanism is as follows:
>>
>> 1. On the Magento Binding, a 'magento_qty' field [1] contains the last
>> value exported to Magento
>> 2. A method on the backend [2] looks for all the products exported to
>> Magento and compare the current stock value with the last exported value
>> 3. When there is a difference, an export is triggered (a new job is
>> created for each product)
>>
>> Usually the exportation synchronisations are triggered on the update
>> of the records (invoices, picking, ...). Stock moves are a special
>> case because if you have thousands of products and you export the
>> quantities each time a quantity changes, you'll just kill Magento with
>> way too much requests.
>>
>> So this diff between the last exported value is executed periodically
>> by the cron : "Magento - Update Stock Quantities" [3] so you have to
>> check that this cron is enabled and executed often enough. You can
>> also trigger an update manually using the button on the Magento backend.
>>
>> You could also consider to add a call to
>> "magento_backend.update_product_stock_qty()" right after a mass
>> inventory adjustment if you need it faster than the regular cron job.
>>
>> [0]
>> https://github.com/OCA/connector-magento/blob/8.0/magentoerpconnect/magento_model.py#L153
>> [1]
>> https://github.com/OCA/connector-magento/blob/8.0/magentoerpconnect/magento_model.py#L293
>> [2]
>> https://github.com/OCA/connector-magento/blob/8.0/magentoerpconnect/magento_model.py#L293
>> [3]
>> https://github.com/OCA/connector-magento/blob/8.0/magentoerpconnect/magentoerpconnect_data.xml#L73-L84
>>
>> -- 
>> Guewen Baconnier
>> Business Solutions Software Developer
>>
>> Camptocamp SA
>> PSE A, CH-1015 Lausanne
>> Phone: +41 21 619 10 39
>> Office: +41 21 619 10 10
>> http://www.camptocamp.com/
>>
>> On Mon, May 2, 2016 at 1:08 PM, Michael Aigner <michael@stilnest.com
>> <mailto:michael@stilnest.com>> wrote:
>>
>>     Hi Andrea,
>>
>>
>>     yes, we have a Magento Online Shop that we sync with Odoo and we
>>     use Odoo for Purchase Orders and Inventory Management, so if I do
>>     Mass Inventory Adjustments (Update QTY On-Hand) to our Products I
>>     expect Odoo also to sync them to Magento so that the Shop can
>>     display the correct data!
>>
>>     Thanks,
>>     Michael
>>
>>>     On May 2, 2016, at 12:53 PM, Andrea Colangelo
>>>     <andreacolangelo@openforce.it
>>>     <mailto:andreacolangelo@openforce.it>> wrote:
>>>
>>>     Hi Michael, just to clarify: are you talking about products
>>>     quantities updates? I guess that's the only information from
>>>     Product Inventories you might want to import on Magento. Best,
>>>     Andrea. On Mon, May 2, 2016 at 12:07 PM, Michael Aigner
>>>      wrote:
>>>     > Hi,
>>>     >
>>>     > we just did some Mass Inventory Adjustments in Odoo and I noticed that they
>>>     > are not synced back to Magento. Can you explain the logic to me how Odoo
>>>     > decides that it needs to sync the inventory and is there a way to retrigger
>>>     > all inventory levels?
>>>     >
>>>     > Thanks,
>>>     > Michael
>>>     >
>>>     > _______________________________________________
>>>     > Mailing-List: http://odoo-community.org/groups/connectors-30
>>>     > Post to: mailto:connectors@odoo-community.org > Unsubscribe:
>>>     http://odoo-community.org/groups?unsubscribe
>>>
>>>
>>>
>>>
>>>     -- 
>>>     Andrea Colangelo
>>>     CTO | http://www.openforce.it
>>>     andreacolangelo@openforce.it
>>>     <mailto:andreacolangelo@openforce.it> | Skype: andrea.colangelo |
>>>     Mobile: (+39)348 231 6991 
>>>
>>>     _______________________________________________
>>>     Mailing-List: http://odoo-community.org/groups/connectors-30
>>>     Post to: mailto:connectors@odoo-community.org
>>>     Unsubscribe: http://odoo-community.org/groups?unsubscribe
>>>
>>
>>     _______________________________________________
>>     Mailing-List: http://odoo-community.org/groups/connectors-30
>>     Post to: mailto:connectors@odoo-community.org
>>     <mailto:connectors@odoo-community.org>
>>     Unsubscribe: http://odoo-community.org/groups?unsubscribe
>>
>>
>> _______________________________________________
>> Mailing-List: http://odoo-community.org/groups/connectors-30
>> Post to: mailto:connectors@odoo-community.org
>> Unsubscribe: http://odoo-community.org/groups?unsubscribe
>>
> 
> _______________________________________________
> Mailing-List: http://odoo-community.org/groups/connectors-30
> Post to: mailto:connectors@odoo-community.org
> Unsubscribe: http://odoo-community.org/groups?unsubscribe
> 

-- 
Dipl.-Comp.-Math. Markus Schneider
Leiter der Softwareentwicklung

initOS GmbH
An der Eisenbahn 1
21224 Rosengarten

Mobil:   +49 (0)172 2303699
Phone:   +49 (0)4105 5615613
Fax:     +49 (0)4105 5615610

Email:   markus.schneider@initos.com
Web:     http://www.initos.com

Geschäftsführung:
Dipl. Wirt.-Inf. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke

Sitz der Gesellschaft: Rosengarten – Klecken
Amtsgericht: Tostedt, HRB 205226
Steuer-Nr.: 15/205/21518
USt-IdNr.: DE815580155

Reference