mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-25 19:32:03 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -0,0 +1,24 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class BaseDocumentLayout(models.TransientModel):
|
||||
_inherit = 'base.document.layout'
|
||||
|
||||
def _get_preview_template(self):
|
||||
if (
|
||||
self.env.context.get('active_model') == 'sale.order'
|
||||
and self.env.context.get('active_id')
|
||||
):
|
||||
return 'sale.quote_document_layout_preview'
|
||||
return super()._get_preview_template()
|
||||
|
||||
def _get_render_information(self, styles):
|
||||
res = super()._get_render_information(styles)
|
||||
if (
|
||||
self.env.context.get('active_model') == 'sale.order'
|
||||
and self.env.context.get('active_id')
|
||||
):
|
||||
res['doc'] = self.env['sale.order'].browse(self.env.context.get('active_id'))
|
||||
return res
|
||||
Loading…
Add table
Add a link
Reference in a new issue