|
@ -1,5 +1,5 @@ |
|
|
# -*- coding: utf-8 -*- |
|
|
# -*- coding: utf-8 -*- |
|
|
from openerp import models, fields |
|
|
|
|
|
|
|
|
from openerp import models, fields, api |
|
|
|
|
|
|
|
|
class BeesPOS(models.Model): |
|
|
class BeesPOS(models.Model): |
|
|
_inherit = 'pos.config' |
|
|
_inherit = 'pos.config' |
|
@ -24,3 +24,16 @@ class BeesAccountBankStatement(models.Model): |
|
|
return [(0, 0, {'coin_value' : bill_value_rec.name}) for bill_value_rec in pos_session_rec.config_id.bill_value] |
|
|
return [(0, 0, {'coin_value' : bill_value_rec.name}) for bill_value_rec in pos_session_rec.config_id.bill_value] |
|
|
|
|
|
|
|
|
cashbox_lines_ids = fields.One2many(default=_get_default_line) |
|
|
cashbox_lines_ids = fields.One2many(default=_get_default_line) |
|
|
|
|
|
|
|
|
|
|
|
class BeescoopPosOrder(models.Model): |
|
|
|
|
|
|
|
|
|
|
|
_inherit = 'pos.order' |
|
|
|
|
|
|
|
|
|
|
|
@api.model |
|
|
|
|
|
def send_order(self, receipt_name): |
|
|
|
|
|
order = self.search([('pos_reference', '=', receipt_name)]) |
|
|
|
|
|
if not order.partner_id.email: |
|
|
|
|
|
return False |
|
|
|
|
|
mail_template = self.env.ref("beescoop_pos.email_send_ticket") |
|
|
|
|
|
mail_template.send_mail(order.id) |
|
|
|
|
|
return True |