mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[IMP] Allow users to define their default behaviour and printer
This commit is contained in:
committed by
Graeme Gellatly
parent
96f2ea85fc
commit
f3bbcea043
@@ -26,3 +26,14 @@ class ResUsers(models.Model):
|
||||
)
|
||||
printing_printer_id = fields.Many2one(comodel_name='printing.printer',
|
||||
string='Default Printer')
|
||||
|
||||
@api.model
|
||||
def _register_hook(self):
|
||||
self.SELF_WRITEABLE_FIELDS.extend([
|
||||
'printing_action',
|
||||
'printing_printer_id',
|
||||
])
|
||||
self.SELF_READABLE_FIELDS.extend([
|
||||
'printing_action',
|
||||
'printing_printer_id',
|
||||
])
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<footer position="before">
|
||||
<group string="Printing" name="printing">
|
||||
<field name="printing_action"/>
|
||||
<field name="printing_printer_id" options="{'no_create': True}"/>
|
||||
<field name="printing_action" readonly="0"/>
|
||||
<field name="printing_printer_id" readonly="0" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</footer>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user