mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[ADD] printing_auto_label_printer
This commit is contained in:
16
printing_auto_label_printer/models/printing_auto.py
Normal file
16
printing_auto_label_printer/models/printing_auto.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Copyright 2022 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
|
||||
# Copyright 2022 Michael Tietz (MT Software) <mtietz@mt-software.de>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PrintingAuto(models.Model):
|
||||
_inherit = "printing.auto"
|
||||
|
||||
is_label = fields.Boolean("Is Label")
|
||||
|
||||
def _get_behaviour(self):
|
||||
if self.is_label and not self.printer_id:
|
||||
return {"printer": self.env.user.default_label_printer_id}
|
||||
return super()._get_behaviour()
|
||||
Reference in New Issue
Block a user