Community mailing list archives

community@mail.odoo.com

Re: Account move in real-time inventory

by
Elico Corporation, Eric Caudal
- 05/16/2016 03:34:41
In this case you will have to alter the method and add a condition: if quant.owner = res_user.company_id (or similar) to answer your requirement
--
Eric Caudal [Founder and CEO]
Skype: elico.corp. Phone: + 86 186 2136 1670 (Cell), + 86 21 6211 8017/27/37 (Office)
Elico Shanghai (Hong Kong/Shenzhen/Singapore) Odoo Gold Partner, best Odoo Partner 2014 for APAC
On 05/16/2016 03:22 PM, Apoorv Soral wrote:

In my case it is never blank so it always returns false I.e. No journal entry.

It puts company ID as owner of the quant when we do po or inventory adjustment.

On May 16, 2016 9:47 AM, "Eric Caudal" <eric.caudal@elico-corp.com> wrote:

Hi,
If it is blank, it is supposed to be the company itself so no need to specify

--
Eric Caudal [Founder and CEO]
Skype: elico.corp. Phone: + 86 186 2136 1670 (Cell), + 86 21 6211 8017/27/37 (Office)
Elico Shanghai (Hong Kong/Shenzhen/Singapore) Odoo Gold Partner, best Odoo Partner 2014 for APAC
On 05/16/2016 12:02 PM, Apoorv Soral wrote:

Thanks for the reply but the code is to check if the owner is not blank. if it is YOUR COMPANY'S stock then owner will be YOUR COMPANY, if it is consignee' then the owner will be consignee. That means the owner is never blank and if the owner is not blank then it returns false and doesn't generate account move.

The code you have highlighted in bold checks for cases where you have consignment stock and does not generate an entry since consignment stock is not YOUR stock.

Odoo generates accounting entries for outgoing stock movements of YOUR stock when the related product category is set to real time.

From: Apoorv Soral
Sent: ‎5/‎15/‎2016 4:32 AM
To: Community
Subject: Re: Account move in real-time inventory

I found this post but I didn't get any answers so I thought of emailing it to the community....

On May 15, 2016 4:55 PM, "Apoorv Soral" <soral.apoorv@gmail.com> wrote:

found this below code which restricts to create account.move entries

Ref: stock_account-->stock_account.py-->_account_entry_move

    def _account_entry_move(self, cr, uid, quants, move, context=None):

"""
Accounting Valuation Entries
quants: browse record list of Quants to create accounting valuation entries for. Unempty and all quants are supposed to have the same location id (thay already moved in)
move: Move to use. browse record
"""
if context is None:
context = {}
location_obj = self.pool.get('stock.location')
location_from = move.location_id
location_to = quants[0].location_id
company_from = location_obj._location_owner(cr, uid, location_from, context=context)
company_to = location_obj._location_owner(cr, uid, location_to, context=context)
if move.product_id.valuation != 'real_time':
return False
for q in quants:
if q.owner_id:
#if the quant isn't owned by the company, we don't make any valuation entry
                return False

Can someone please suggest how is a account.move generated for outgoing shipment.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe