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