mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
new api for 'printing.report.xml.action'
This commit is contained in:
committed by
Graeme Gellatly
parent
3b51e67f68
commit
4a4a015be5
@@ -19,20 +19,21 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from openerp.osv import orm, fields
|
from openerp import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
class ReportXMLAction(orm.Model):
|
class ReportXMLAction(models.Model):
|
||||||
_inherit = 'printing.report.xml.action'
|
_inherit = 'printing.report.xml.action'
|
||||||
|
|
||||||
_columns = {
|
printer_tray_id = fields.Many2one(
|
||||||
'printer_tray_id': fields.many2one(
|
comodel_name='printing.tray',
|
||||||
'printing.tray', 'Paper Source',
|
string='Paper Source',
|
||||||
domain="[('printer_id', '=', printer_id)]"),
|
domain="[('printer_id', '=', printer_id)]",
|
||||||
}
|
)
|
||||||
|
|
||||||
def behaviour(self, cr, uid, act_id, context=None):
|
@api.multi
|
||||||
res = super(ReportXMLAction, self).behaviour(cr, uid, act_id, context=context)
|
def behaviour(self):
|
||||||
action = self.browse(cr, uid, act_id, context=context)
|
self.ensure_one()
|
||||||
res['tray'] = action.printer_tray_id.system_name
|
res = super(ReportXMLAction, self).behaviour()
|
||||||
|
res['tray'] = self.printer_tray_id.system_name
|
||||||
return res
|
return res
|
||||||
|
|||||||
Reference in New Issue
Block a user