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] [SOLVED] Print a report with automated action

By
FEDERICO LEONI
on 3/24/15, 6:44 PM 1,186 views

What I want as a result is the ability to reprint a pos order after the validation (set to paid).

Since I don't have a Ethernet thermal printer but just an USB one and I can't set a proxy printer, I need to exit the POS, enter the order and use the "reprint" button. Luckily, since I've installed the Report to printer module I am able to print directly to my thermal printer when I press the button.

I've already installed the modules Automated Action Rules and now I'm begging an help to identify the correct workflow and the syntax to reprint.

Edit:

Please have a look here for a workaround: bind a report to a workflow

1
FEDERICO LEONI
On 4/15/15, 8:20 PM

A little step forward... After reading this old doc

https://doc.odoo.com/6.0/developer/4_13_server_action/

I manage to replicate the function of the "reprint" button on POS Order.

Then I created an automated action to create (and print) the qweb report based on the order status "paid":

-Automated action-

Rule name: Kitchen_order

Related Document Model: Point of Sale

Active: yes

Sequence: 0

-Conditions-

When to Run: On Creation & Update

Filter: Paid

Actions:

Fields to Change

Set Responsible: Administrator

Add Followers: none

Server actions to run

Sequence: 1

Action Name: Reprint_Pos

Action To Do: Run a Client Action

-----------------------

Server Action:

Name: Reprint_Pos

Base Model: Point of Sale

Action To Do: Run a Client Action

Condition: True

Sequence: 1

Client Action: Receipt (Action Type is ir.actions.report.xml)

I've enable it on "More" tab and is working in both cases, I mean when I set it as a PDF or when I send it directly to my printer (using report to printer module).

Then I edit the "paid" function on Pos Workflow, adding my server action (Reprint_Pos) on Actions and leaving untouched all the other parameters.

Seems all good to me but the PDF is not generated automatically. Where I'm wrong?

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: 3/24/15, 6:44 PM
Seen: 1186 times
Last updated: 6/4/15, 2:19 PM