Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

[V8] [WORKAROUND] Bind a report to a workflow: some guides around here?

By
FEDERICO LEONI
on 4/17/15, 4:52 PM 555 views

I would like to create a pdf automatically when a Pos Order is marked as "paid" (after validate in the POS UI).

The report I want is point_of_sale.report_receipt (ir.actions.report.xml,388) and I would like to insert it on pos workflow. I've already created a server action to call it and I know is working since I've added it to the "more" menu and I can use it without issues.

The problem is the lack of instruction about this kind of settings, I'm working on it on a dev machine since the last week but without any tangible result. Any help?

1
Anton Chepurov
On 5/12/15, 11:22 AM

Not sure if it's a bug or a design limitation, but Server Actions seem to only be triggered by a button signal, not by workflow signal.

Try changing your view xml: change the button name from a method name (which triggers workflow signal) to the signal itself. E.g. in Sale Order, that would be <button name='order_confirm'> instead of <button name='action_confirm_order'>.

Or add another dummy node to the workflow with an outgoing transition requiring a button to be pressed and set a button signal as the button's name (not an object method which triggers the workflow signal).

More here.


Yes, in that way will work but should work even with workflow signal. I've added a comment on your thread on Github too. Thanks.

FEDERICO LEONI
on 5/13/15, 11:28 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/17/15, 4:52 PM
Seen: 555 times
Last updated: 5/20/15, 9:19 AM