Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4315 Zobrazení

Hey i have customized stock.picking to force back date entry in stock move and stock move line while product receipt. But when i successfully post an entry in back date it do get posted but shows no effect on stock.valuation.layer. Is there something i am missing in the workflow? Kindly help

This is how i am overriding action_done()

def action_done(self):
for pick in self:
for ops in pick.move_line_ids.filtered(lambda x: not x.move_id):
new_move = self.env['stock.move'].create({
'date': pick.force_date,
})
self.write({'date_done': self.force_date})
res = super(Picking,self).action_done()
return res
Thanks in advance
Avatar
Zrušit
Nejlepší odpověď

There are no field date in stock.valuation.layer model, stock.valuation.layer is working with create_date

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
dub 17
3013
1
srp 24
2242
0
led 23
1878
3
lis 15
5572
1
pro 17
6992