Skip to Content
Menu
This question has been flagged

Hello, someone can help me with this?

I have added 3 custom fields in stock picking view and try to pass the values as default for the wizard where you can select the lot or serial number (the last 3 lines in the function). 

This works fine in Odoo CE but when I try in Odoo EE it doesn't work, someone knows what could be happening? I see that the functions are the same in CE and EE. I have the following code

def action_show_details(self):
        res = super(StockMove, self).action_show_details()
        res.update({'context': 
            dict(
                self.env.context,
                show_owner=self.picking_type_id.code != 'incoming',
                show_lots_m2o=self.has_tracking != 'none' and (self.picking_type_id.use_existing_lots or self.state == 'done' or self.origin_returned_move_id.id),  # able to create lots, whatever the value of ` use_create_lots`.
                show_lots_text=self.has_tracking != 'none' and self.picking_type_id.use_create_lots and not self.picking_type_id.use_existing_lots and self.state != 'done' and not self.origin_returned_move_id.id,
                show_source_location=self.picking_type_id.code != 'incoming',
                show_destination_location=self.picking_type_id.code != 'outgoing',
                show_package=not self.location_id.usage == 'supplier',
                show_reserved_quantity=self.state != 'done' and not self.picking_id.immediate_transfer and self.picking_type_id.code != 'incoming',
                default_kd_cargo = self.picking_id.kd_cargo,
                default_flete_id = self.picking_id.flete_id.id,
                default_qty_done = self.picking_id.net_weigth_usa_cargo)

            })
        return res


Thank you in advance

Avatar
Discard
Related Posts Replies Views Activity
3
Nov 24
1092
1
Jan 23
1489
1
Dec 22
1560
0
Mar 24
416
2
Nov 22
1366