mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[IMP] Minor usability fix, order trays alphabetically, name xml groups
This commit is contained in:
@@ -9,6 +9,8 @@ class PrinterTray(models.Model):
|
||||
_name = 'printing.tray'
|
||||
_description = 'Printer Tray'
|
||||
|
||||
_order = 'name asc'
|
||||
|
||||
name = fields.Char(required=True)
|
||||
system_name = fields.Char(required=True, readonly=True)
|
||||
printer_id = fields.Many2one(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright 2016 LasLabs Inc.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import test_ir_actions_report_xml
|
||||
from . import test_ir_actions_report
|
||||
from . import test_printing_printer
|
||||
from . import test_printing_report_xml_action
|
||||
from . import test_printing_tray
|
||||
|
||||
@@ -280,7 +280,7 @@ class TestPrintingPrinter(TransactionCase):
|
||||
cups_printer = connection.getPrinters()[self.printer.system_name]
|
||||
|
||||
vals = self.printer._prepare_update_from_cups(connection, cups_printer)
|
||||
self.assertEqual(vals['tray_ids'], [(0, 0, {
|
||||
self.assertItemsEqual(vals['tray_ids'], [(0, 0, {
|
||||
'name': 'Auto (Default)',
|
||||
'system_name': 'Auto',
|
||||
}), (0, 0, {
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<field name="inherit_id" ref="base_report_to_printer.printing_printer_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet/group[3]" position="after">
|
||||
<group string="Trays">
|
||||
<group string="Trays" name="trays">
|
||||
<field name="tray_ids" nolabel="1">
|
||||
<form>
|
||||
<group>
|
||||
<group name="name_fields">
|
||||
<field name="name"/>
|
||||
<field name="system_name"/>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user