mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[MIG] base_report_to_printer: Migration to 17.0
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
{
|
||||
"name": "Report to printer",
|
||||
"version": "16.0.1.1.5",
|
||||
"version": "17.0.1.0.0",
|
||||
"category": "Generic Modules/Base",
|
||||
"author": "Agile Business Group & Domsense, Pegueroles SCP, NaN,"
|
||||
" LasLabs, Camptocamp, Odoo Community Association (OCA),"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** @odoo-module */
|
||||
import {_t} from "@web/core/l10n/translation";
|
||||
import {registry} from "@web/core/registry";
|
||||
|
||||
async function cupsReportActionHandler(action, options, env) {
|
||||
@@ -17,9 +18,9 @@ async function cupsReportActionHandler(action, options, env) {
|
||||
action.data,
|
||||
]);
|
||||
if (result) {
|
||||
env.services.notification.add(env._t("Successfully sent to printer!"));
|
||||
env.services.notification.add(_t("Successfully sent to printer!"));
|
||||
} else {
|
||||
env.services.notification.add(env._t("Could not sent to printer!"));
|
||||
env.services.notification.add(_t("Could not sent to printer!"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<field name="name">printing.job.form (in base_report_to_printer)</field>
|
||||
<field name="model">printing.job</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Job">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="action_cancel"
|
||||
type="object"
|
||||
string="Cancel"
|
||||
attrs="{'invisible': [('job_state', 'in', ('canceled', 'aborted', 'completed'))]}"
|
||||
invisible="job_state in ['canceled','aborted','completed']"
|
||||
/>
|
||||
<field name="job_state" widget="statusbar" />
|
||||
</header>
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
<field name="name">printing.printer.form (in base_report_to_printer)</field>
|
||||
<field name="model">printing.printer</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Printers">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="enable"
|
||||
type="object"
|
||||
string="Enable"
|
||||
attrs="{'invisible': [('status', 'in', ('available', 'printing'))]}"
|
||||
invisible="status in ['available','printing']"
|
||||
/>
|
||||
<button
|
||||
name="disable"
|
||||
type="object"
|
||||
string="Disable"
|
||||
attrs="{'invisible': [('status', '=', 'unavailable')]}"
|
||||
invisible="status == 'unavailable'"
|
||||
/>
|
||||
<button
|
||||
name="action_cancel_all_jobs"
|
||||
@@ -43,7 +43,7 @@
|
||||
name="web_ribbon"
|
||||
text="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
invisible="active"
|
||||
/>
|
||||
<field name="active" invisible="1" />
|
||||
<div class="oe_title">
|
||||
@@ -61,14 +61,14 @@
|
||||
name="set_default"
|
||||
string="Set Default"
|
||||
type="object"
|
||||
attrs="{'invisible': [('default','=', True)]}"
|
||||
invisible="default"
|
||||
colspan="2"
|
||||
/>
|
||||
<button
|
||||
name="unset_default"
|
||||
string="Unset Default"
|
||||
type="object"
|
||||
attrs="{'invisible': [('default','=', False)]}"
|
||||
invisible="not default"
|
||||
colspan="2"
|
||||
/>
|
||||
</group>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="printing_report_xml_action_view_form">
|
||||
<field
|
||||
name="name"
|
||||
>printing.report.xml.action.form (in base_report_to_printer)</field>
|
||||
<field name="name">printing.report.xml.action.form (in base_report_to_printer)
|
||||
</field>
|
||||
<field name="model">printing.report.xml.action</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Report Printing Actions">
|
||||
<form>
|
||||
<group col="2">
|
||||
<field name="user_id" />
|
||||
<field name="action" />
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<field name="name">printing.server.form (in base_report_to_printer)</field>
|
||||
<field name="model">printing.server</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Servers">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="action_update_printers"
|
||||
@@ -24,17 +24,18 @@
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field name="address" />
|
||||
<field name="port" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="user" />
|
||||
<field name="password" />
|
||||
<field name="encryption_policy" />
|
||||
</group>
|
||||
<group name="printers" string="Printers">
|
||||
<field name="printer_ids" nolabel="1" colspan="2" />
|
||||
<group>
|
||||
<field name="address" />
|
||||
<field name="port" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="user" />
|
||||
<field name="password" />
|
||||
<field name="encryption_policy" />
|
||||
</group>
|
||||
</group>
|
||||
<separator name="printers" string="Printers" />
|
||||
<field name="printer_ids" />
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<field name="name">wizard.print.attachment</field>
|
||||
<field name="model">wizard.print.attachment</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print attachments">
|
||||
<form>
|
||||
<group>
|
||||
<field name="printer_id" />
|
||||
<field name="attachment_line_ids">
|
||||
|
||||
Reference in New Issue
Block a user