presupuesto_venta_bioelectric.py 813 B

12345678910111213141516171819202122
  1. from openerp import api, models
  2. import datetime
  3. class report_presupuesto_bioelectric(models.AbstractModel):
  4. _name = 'report.presupuesto_venta_bioelectric.report_presupuesto_bioelectric'
  5. @api.multi
  6. def render_html(self, data=None):
  7. report_obj = self.env['report']
  8. report = report_obj._get_report_from_name('presupuesto_venta_bioelectric.report_presupuesto_bioelectric')
  9. docargs = {
  10. 'doc_ids': self._ids,
  11. 'doc_model': report.model,
  12. 'docs': self.env[report.model].browse(self._ids),
  13. 'calcular_precio':self.calcular_precio,
  14. }
  15. return report_obj.render('presupuesto_venta_bioelectric.report_presupuesto_bioelectric', docargs)
  16. def calcular_precio(self,precio):
  17. return (precio*1.1)