Fall 231: Bestellbestätigung

develop
Ahmed Aly 2018-07-02 15:18:38 +02:00 committed by Andreas Wabro
parent a7e3d2d779
commit e971f66cef
6 changed files with 41 additions and 2 deletions

1
ext/custom-addons/dp_website/__init__.py Executable file → Normal file
View File

@ -0,0 +1 @@
from . import models

View File

@ -5,7 +5,7 @@
# noinspection PyStatementEffect
{
'name': 'Dp Website',
'summary' : 'datenpol Website Anpassungen',
'summary': 'datenpol Website Anpassungen',
'version': '11.0.1.0.0',
'license': 'OPL-1',
'author': 'datenpol gmbh',
@ -14,6 +14,7 @@
'depends': [
'website',
'website_multi_theme',
'website_multi_company_sale',
],
'data': [
'security/rule.xml'

View File

@ -0,0 +1,2 @@
from . import sale_order
from . import stock_picking

View File

@ -0,0 +1,18 @@
# Copyright 2018-Today datenpol gmbh (<http://www.datenpol.at>)
# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses).
from odoo import models
class SaleOrder(models.Model):
_inherit = 'sale.order'
def action_mark_as_paid(self):
self.ensure_one()
result = super(SaleOrder, self).action_mark_as_paid()
sale_template = self.env.ref('sale.email_template_edi_sale')
sale_template.email_from = '${(object.company_id.email and \'%s <%s>\' % (object.company_id.name, object.company_id.email) or \'\')|safe}'
sale_template.send_mail(self.id)
return result

View File

@ -0,0 +1,17 @@
# Copyright 2018-Today datenpol gmbh (<http://www.datenpol.at>)
# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses).
from odoo import api, models
class StockPicking(models.Model):
_inherit = 'stock.picking'
@api.multi
def action_done(self):
res = super(StockPicking, self).action_done()
delivery_template = self.env.ref('delivery.mail_template_data_delivery_confirmation')
delivery_template.email_from = '${(object.company_id.email and \'%s <%s>\' % (object.company_id.name, object.company_id.email) or \'\')|safe}'
for record in self:
delivery_template.send_mail(record.id)
return res

View File

@ -282,7 +282,7 @@ class DatenpolFunctions(object):
#
# clarico_theme = self.odoo.env.ref('website_multi_theme.clarico_multi')
self.odoo.env.ref('website.default_website').multi_theme_reload()
# self.odoo.env.ref('website.default_website').multi_theme_reload()
# create Salesteam for all websites
cr_team_ir_heizpaneel = crm_team_obj.search([('name', '=', 'IR Heizpaneele')])