Skip to Content

Contributors

Re: Is there a way to create account.analytic.line from stock.move?

look at the module stock_account

Regards,
Dominique


On Mon, 12 Oct 2020 at 20:05, Radovan Skolnik <radovan@skolnik.info> wrote:
Oh, now I see (after long staring at various pieces of code). Account Move
(account.move) ensures creation of Analytic Entries (account.analytic.line)
for Account Move Lines (account.move.line) that are validated. So that way OCA
module stock_analytic provides the possibility to create Analytic Entries in
_prepare_account_move_line method...

OK, now I'll update the code of procurement_mto_analytic (actually only the
second part as the first part is there already - or should that be another
module or even a new one?) with the code you provided, the analytical account
value should be propagated into stock move lines. Now does stock move somehow
relate to account move (to generate analytic entries)? Does not seem to me
so...

Thank you very much for info. Best regards

        Radovan

On pondelok 12. októbra 2020 12:26:51 CEST Dominique k wrote:
> in odoo standard, analytic entries (account.analytic.line) are generated
> with journal entries (== invoices in v13 onwards). It is also possible to
> create analytic entries separately, typically with timesheet. In fact
> timesheet entries are analytic lines with the OCA module stock_analytic,
> analytic entries are created when a stock move is validated. that is all as
> far as i know. other modules, do not generate analytic lines, instead, they
> add an analytic account to a document, which eventually ends up/link up
> as/with a timesheet, an invoice or a stock move. Regards, Dominique
> _______________________________________________
> Mailing-List: https://odoo-community.org/groups/contributors-15 [1]
> Post to: mailto:contributors@odoo-community.org
> Unsubscribe: https://odoo-community.org/groups?unsubscribe [2]
>
>
>
> [1] https://odoo-community.org/groups/contributors-15
> [2] https://odoo-community.org/groups?unsubscribe





by dominique.k - 05:01 - 12 Oct 2020

Reference

  • Is there a way to create account.analytic.line from stock.move?
    Hello,
    
    we would like to use analytic accounts to track profitability of individual 
    sales. So I'd setup automatic creation of analytic account on confirmed sale 
    orders which would be propagated to invoices. This would cover the credit 
    side. What I am struggling with is the debit side - i.e. costs of products. 
    One way would be adding analytic account on POs/POLs but that is not feasible 
    because we can have products in stock from past which we decide to sell. So my 
    idea is to generate account.analytic.line records from stock.moves and assign 
    them value according to average value. Are there any modules that would 
    support this? Or should I choose different approach?
    
    Thank you. Best regards
    
    	Radovan Skolnik
    
    
    

    by Radovan Skolnik - 10:15 - 8 Oct 2020