12345678910111213141516171819202122 |
- from openerp import api, models
- import datetime
- from num2words import num2words
- class report_ticket_ordenimperio(models.AbstractModel):
- _name = 'report.ticket_orden_imperio.report_ticket_ordenimperio'
- @api.multi
- def render_html(self, data=None):
- report_obj = self.env['report']
- report = report_obj._get_report_from_name('ticket_orden_imperio.report_ticket_ordenimperio')
- 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('ticket_orden_imperio.report_ticket_ordenimperio', docargs)
- def calcular_precio(self,precio):
- return (precio*1.1)
|