Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4253 Vizualizări

Hello,

I am using V11 CE, I need to get the analityc account for each order line into the WH/IN line generated from PO.

Example

PO-01

product A;  Analytic account 1; Q.ty 10

product A;  Analytic account 2; Q.ty 5

I need 

WH/IN/01

product A;  Analytic account 1; Q.ty 10

product A;  Analytic account 2; Q.ty 5

now I get in WH/IN only

product A; Q.ty 10

product A; Q.ty 5

How I can inerih this information?

Thank you

Imagine profil
Abandonează
Cel mai bun răspuns

You need to override the _prepare_stock_moves method and pass your analytic account to the vals of stock move.

@api.multi
def _prepare_stock_moves(self, picking):
    move_vals = super(PurchaseOrderLine, self)._prepare_stock_moves(picking)
 ​   move_vals.update({'analytic_acc_id': self.analytic_acc_id.id})

Make sure you have created analytic account m2o field in the stock move as well.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
nov. 18
5028
2
mai 25
2179
3
dec. 24
6257
1
iul. 24
3046
1
iun. 24
2117