stock.picking: action server on report doesn't work

Asked by yohan pannet

Hi,

I'm trying to have the stock.picking report (packing list) to be printed automatically when the picking is validated (after clicking the button 'Product Received'). To do so, i've created a Server Action:
Object: Packing List (stock.picking)
Action type: Client Action
Client Action: Packing List (report from stock.picking)

I've added this action to the activity 'move' from stock.picking.basic workflow.

When I validate a picking (press the button...), nothing happened (no report printed).

I've done a similar action with purchase order and it works fine.
I've tried using a power email action instead of the report on the picking and it works fine.
I've tried to put the actions (mail and report) on other activities (done and assigned) and it's rthe same (mail ok, report ko).

I've looked in the code but I haven't found anything.

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
yohan pannet
Solved:
Last query:
Last reply:
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#1

Hello Yohan Pannet ,

I am making this bug into question.

Thanks.

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#2

Hello Yohan Pannet ,

You can apply the following patch for solution.
I have tested this at my end and it's working very smoothly.

=== modified file 'stock/wizard/wizard_partial_picking.py'
--- stock/wizard/wizard_partial_picking.py 2010-07-08 07:03:58 +0000
+++ stock/wizard/wizard_partial_picking.py 2010-07-08 07:31:23 +0000
@@ -236,10 +236,15 @@
             'result': {'type': 'form', 'arch': _moves_arch_end,
                 'fields': _moves_fields_end,
                 'state': (
- ('end', 'Close'),
+ ('end', 'Close'),('report','Print','gtk-print')
                 )
             },
         },
+ 'report': {
+ 'actions': [],
+ 'result': {'type':'print', 'report':'stock.picking.list', 'state':'end'}
+ }
+
     }

 partial_picking('stock.partial_picking')

Hope this will help you.

Thanks.

Revision history for this message
yohan pannet (yohan-pannet) said :
#3

Ok, thanks