
Address the challenges of Odoo direct dot-matrix printing in high-volume operations with thousands of invoices and orders. The lecture highlights image quality and speed issues, signaling the need for alternatives.
Build a printer proxy that lets a browser directly print from a dot-matrix printer using templates to generate invoices and related documents.
Use the scaffold feature to generate a new Odoo addon template, organize the ad structure, and relocate the metrics folder into the addons directory across Mac, Linux, and Windows.
Edit the Odoo module manifest to configure basic metadata and enable dot-matrix invoice printing, including setting name, description, website, category, and template usage.
Inherit the invoice view to add top section and refresh printer data button, then implement a print action that sends the invoice to proxy server for dot-matrix printing.
Learn how to inherit the invoice model in Odoo, add a new field, and implement a print-related method for a reference printer to generate printing actions.
Install and test an Odoo addon by working with the invoicing module, testing in the database, and adding a refresh button to prepare the invoice version.
Test and use the refresh printer data button in Odoo to update invoice data and related graphs, see the message that appears, and ensure estimates align with the current document.
Complete the refresh printer data method by rendering a template with the current invoice model and sending the output to the dot-matrix printer.
Create a dot-matrix invoice print template inside the main template object, bind fields like invoice number and account to the body, and render and test with a draft invoice.
Center the title on a dot matrix printer by calculating left padding and using a Python-based templating engine to achieve right-justified text within an 80-character line.
Learn to build an Odoo dot-matrix invoice header template by aligning customer, address, and invoice fields. Implement multi-column layouts with right and left justification and python-like syntax for 80-character lines.
assemble the invoice header by placing street, city, state, zip, and country across lines, with conditional object fields and payment term alignment for a precise layout.
Learn to define invoice line fields in Odoo, including product id, quantity, unit price, discount, and taxes, and format them in an 80-character table.
Explore building invoice line templates in odoo by looping through invoice lines, showing truncated descriptions, names, and quantities with proper justification, prices, and taxes.
Adjust the invoice bottom section by fixing content width and column spacing to fit an 80-character line, and recalculating taxes, amounts, and justified alignments for consistency.
Implement a client-side invoice print button handler in JavaScript by overriding the on-click action, gathering event data, and triggering dot-matrix printing.
Import and override javascript assets within the framework to load resources from a static source and render template overrides.
Explain how the print handler triggers only from a specific button by checking the event's custom attribute, then posts dot-matrix print data via ajax to a local proxy.
Build a Flask-based proxy server to receive requests and forward data to a local dot matrix printer. Learn to set up a simple Python web app with Flask for printing.
Test the proxy for dot-matrix printing by setting the Flask app environment variable to the printer name and running it on Linux and Mac, noting Windows adjustments needed.
Create and run a shell script on Linux and macOS to control the dot-matrix printer. Export environment variables and make the script executable for quick print operations.
Set up a Windows proxy server by installing Python, adding it to the PATH, verifying the installation in the command prompt, and installing Flask.
Install pywin32 on Windows to enable Python printing, choosing the correct binary for your Python version and architecture, then run the installer and finish setup to create a Windows proxy.
Learn to build a Windows proxy for printing by opening a printer handle, selecting a printer name, and sending data to a dot-matrix printer, with driver setup and test steps.
Test the proxy by inspecting the browser console, diagnosing browser–server communication, and verifying the printer handler works when the dot-matrix printer connects on Windows.
Start a Windows script that automatically renders the web set, reads the designated file, configures the Flask environment, and runs the Flask app to accept requests.
Refresh printer data when confirming or canceling an invoice by overriding the invoice open flow to refresh the printer after validation, ensuring the invoice number is populated.
Make the printer data readonly to prevent edits and saves, ensuring the printer settings cannot be modified during the Odoo direct dot-matrix printing workflow.
inherit the purchase order view to enable dot-matrix printing, copying and renaming invoice fields, upgrading the module, and aligning external ids and form references.
Inherit the purchase order model, copy invoice logic, set and render the template on the PO object, and wire print and confirm button actions to refresh the view.
Define a PO header template for Odoo dot-matrix printing by configuring the people template, setting header fields, and aligning 20-character columns for a two-column layout.
Learn to construct a po product lines template for Odoo direct dot-matrix printing, featuring a tabular header with product or description, quantity, unit price, taxes, and subtotal and formatting rules.
Finish the bottom part template for the purchase order in the Odoo direct dot-matrix printing course, aligning tax, totals, and product lines with proper right-justified fields and 80-character formatting.
Enhance Odoo direct dot-matrix printing by inheriting the stock picking view, updating inventory and delivery order models, and creating a picking form for domestic printing on deliveries.
Override the stock picking model in Odoo by copying and renaming the model, preparing templates and email fields, and designing the grid, while awaiting the template to enable functionality.
Continue to define the picking header template, implement a four-column twenty-character layout that displays the record name and origin, with a scheduled date, and ensure non-empty fields.
Define a picking template that displays the product and quantity to meet demand, and format delivery slips with header, lines, and bottom line using left justified fields and specific widths.
Inherit the sale order view to implement dot-matrix printing features for sales orders, overriding the base sale model and aligning with the sales management workflow.
Continue inheriting the sale order model, discuss templates and models for the order, and define the template for now while considering an upgrade.
Learn to create a sale order header template in odoo by copying an existing template, renaming fields, and integrating the customer address and payment terms, with header alignment adjustments.
Learn how to design the sale order product lines template in Odoo, covering header rows, product name, description, quantity, unit price, taxes, tax id, and subtotal formatting and alignment.
Design the sale order bottom part template in odoo direct dot-matrix printing, defining the template and arranging fields like name and amount while adjusting format and length for proper pricing.
override the confirm sale function to refresh printer data automatically by calling the super function and triggering the action group, ensuring a seamless dot-matrix printing workflow.
One of the biggest challenge in implementing Odoo in companies which already have so many daily transactions (like thousands of invoices per day), is printing to Dot Matrix Printer!
Yes, it is common in big trading companies to use Dot Matrix printer to print PO, SO, Invoices, Picking List to efficiently print using continuous and carbonized forms so they can print 3-4 document at once. Printing PDF file to dot matrix printers that can take the whole day just to print :(
This can be a big issue in Odoo, because it uses PDF for every document printing. The print result is good when printed at desk jet/ laser jet printers, but when it comes to dot-matrix, the font is broken and almost unreadable. This is because the dot per inch is too small. We can set it up bigger, but it will take some more time to print to dot matrix printer. It is impractical when it comes to print like 5000 invoices daily!
The solution is to use a proxy printing technique. We make a small web server application at the client computer that is connected to the printer. That small application listen at a specific HTTP port and ready to receive request from Odoo's web browser client. At server side, we add an add-on that will send the raw data to print to that local application via HTTP post. The raw data is automatically composed based on the document to print using template.
The result is: AMAZING! printing is now direct to dot matrix printer with it's super fast speed and perfect printing result!
This course explains in details on how to make, configure, and setup the direct dot-matrix printing system for Odoo.
Enjoy!