1234567891011121314151617181920212223242526272829303132333435363738 |
- from openerp import api, models
- import datetime
- class report_factura_kinesia(models.AbstractModel):
- _name = 'report.factura_comun_kinesia.report_factura_kinesia'
- @api.multi
- def render_html(self, data=None):
- report_obj = self.env['report']
- report = report_obj._get_report_from_name('factura_comun_kinesia.report_factura_kinesia')
- docargs = {
- 'doc_ids': self._ids,
- 'doc_model': report.model,
- 'docs': self.env[report.model].browse(self._ids),
- 'calcular_precio':self.calcular_precio,
- }
- return report_obj.render('factura_comun_kinesia.report_factura_kinesia', docargs)
- def calcular_precio(self,precio):
- return (precio*1.1)
- # class report_facturaventa_kinesia(models.AbstractModel):
- # _name = 'report.factura_comun_kinesia.report_facturaventa_kinesia'
- #
- # @api.multi
- # def render_html(self, data=None):
- # report_obj = self.env['report']
- # report = report_obj._get_report_from_name('factura_comun_kinesia.report_facturaventa_kinesia')
- # docargs = {
- # 'doc_ids': self._ids,
- # 'doc_model': report.model,
- # 'docs': self.env[report.model].browse(self._ids),
- #
- # }
- # return report_obj.render('factura_comun_kinesia.report_facturaventa_kinesia', docargs)
|