mirror of
https://github.com/bringout/oca-ocb-vertical-industry.git
synced 2026-04-23 13:31:59 +02:00
19.0 vanilla
This commit is contained in:
parent
4607ccbd2e
commit
825ff6514e
487 changed files with 184979 additions and 195262 deletions
|
|
@ -1,13 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from psycopg2 import sql
|
||||
|
||||
from odoo import tools
|
||||
from odoo import api, fields, models
|
||||
from odoo import fields, models
|
||||
from odoo.tools.sql import drop_view_if_exists, SQL
|
||||
|
||||
|
||||
class FleetReport(models.Model):
|
||||
_name = "fleet.vehicle.cost.report"
|
||||
class FleetVehicleCostReport(models.Model):
|
||||
_name = 'fleet.vehicle.cost.report'
|
||||
_description = "Fleet Analysis Report"
|
||||
_auto = False
|
||||
_order = 'date_start desc'
|
||||
|
|
@ -148,9 +147,5 @@ FROM (
|
|||
contract_costs cc)
|
||||
) c
|
||||
"""
|
||||
tools.drop_view_if_exists(self.env.cr, self._table)
|
||||
self.env.cr.execute(
|
||||
sql.SQL("""CREATE or REPLACE VIEW {} as ({})""").format(
|
||||
sql.Identifier(self._table),
|
||||
sql.SQL(query)
|
||||
))
|
||||
drop_view_if_exists(self.env.cr, self._table)
|
||||
self.env.cr.execute(SQL("""CREATE or REPLACE VIEW %s as (%s)""", SQL.identifier(self._table), SQL(query)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue