commit
143027b369
|
|
@ -308,7 +308,8 @@ msgstr "مبلغ الدفعة"
|
|||
#: model_terms:ir.ui.view,arch_db:odex_fleet.odex_fleet_vehicle_log_services_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.vehicle_infraction_view_form
|
||||
msgid "Approve"
|
||||
msgstr ""
|
||||
msgstr "اعتماد"
|
||||
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model:ir.model.fields.selection,name:odex_fleet.selection__fleet_vehicle_log_fuel__state__approve
|
||||
|
|
@ -990,6 +991,16 @@ msgstr "الاسم المعروض"
|
|||
msgid "Draft"
|
||||
msgstr "مسودة"
|
||||
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model:res.groups,name:odex_fleet.fleet_group_draft
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.fleet_form_renew_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.fleet_request_maintenance_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.odex_fleet_vehicle_log_fuel_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.odex_fleet_vehicle_log_services_view_form
|
||||
msgid "Set To Draft"
|
||||
msgstr "إرسال الى مسودة"
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model:ir.model.fields,field_description:odex_fleet.field_fleet_maintenance__employee_id
|
||||
#: model:ir.model.fields,field_description:odex_fleet.field_fleet_vehicle__driver_id
|
||||
|
|
@ -1345,14 +1356,14 @@ msgstr ""
|
|||
#. module: odex_fleet
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.invoice_report_pdf
|
||||
msgid "From"
|
||||
msgstr ""
|
||||
msgstr "استمارة"
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model:ir.model.fields.selection,name:odex_fleet.selection__fleet_account_config__type__fuel
|
||||
#: model:ir.model.fields.selection,name:odex_fleet.selection__fleet_vehicle_cost__cost_type__fuel
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.car_consumption_cost_report_pdf
|
||||
msgid "Fuel"
|
||||
msgstr ""
|
||||
msgstr "وقود"
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.fleet_vehicle_log_fuel_view_tree
|
||||
|
|
@ -1698,7 +1709,7 @@ msgstr "تقرير الفاتورة"
|
|||
#: model:ir.model.fields.selection,name:odex_fleet.selection__fleet_vehicle_log_fuel__state__invoiced
|
||||
#: model:ir.model.fields.selection,name:odex_fleet.selection__fleet_vehicle_log_services__status__invoiced
|
||||
msgid "Invoiced"
|
||||
msgstr ""
|
||||
msgstr "مفوتر"
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model:ir.model.fields,field_description:odex_fleet.field_hr_employee__driver
|
||||
|
|
@ -2209,6 +2220,13 @@ msgid ""
|
|||
" contracts (fixed or recurring) and fuel logs."
|
||||
msgstr ""
|
||||
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model:ir.model.fields.selection,name:odex_fleet.selection__fleet_account_config__type__form
|
||||
msgid "Form"
|
||||
msgstr "استمارة"
|
||||
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model:ir.model.fields,field_description:odex_fleet.field_fleet_quotation__offer
|
||||
msgid "Offer Attachment"
|
||||
|
|
@ -2271,7 +2289,7 @@ msgstr "المالك"
|
|||
#: model:ir.model.fields.selection,name:odex_fleet.selection__fleet_maintenance__state__paid
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.fleet_request_maintenance_view_form
|
||||
msgid "Paid"
|
||||
msgstr ""
|
||||
msgstr "إنشاء فاتورة"
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model:ir.model.fields,field_description:odex_fleet.field_fleet_vehicle_cost__parent_id
|
||||
|
|
@ -2394,7 +2412,7 @@ msgstr "بيانات تعبئة الوقود"
|
|||
#: model_terms:ir.ui.view,arch_db:odex_fleet.odex_fleet_vehicle_log_services_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.vehicle_infraction_view_form
|
||||
msgid "Refuse"
|
||||
msgstr ""
|
||||
msgstr "رفض"
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model:ir.model.fields.selection,name:odex_fleet.selection__fleet_vehicle_log_fuel__state__refused
|
||||
|
|
@ -2403,7 +2421,7 @@ msgstr ""
|
|||
#: model:ir.model.fields.selection,name:odex_fleet.selection__vehicle_delegation__state__refused
|
||||
#: model:ir.model.fields.selection,name:odex_fleet.selection__vehicle_infraction__state__refused
|
||||
msgid "Refused"
|
||||
msgstr "رفض"
|
||||
msgstr "مرفوض"
|
||||
|
||||
#. module: odex_fleet
|
||||
#: model_terms:ir.ui.view,arch_db:odex_fleet.fleet_request_maintenance_view_form
|
||||
|
|
@ -2556,7 +2574,15 @@ msgstr ""
|
|||
msgid "Serial Number"
|
||||
msgstr "الرقم المسلسل"
|
||||
|
||||
|
||||
#. module: odex_fleet
|
||||
#: code:addons/odex_fleet/models/fleet_service_type.py:0
|
||||
#, python-format
|
||||
msgid "service"
|
||||
msgstr "الخدمة"
|
||||
|
||||
#. module: odex_fleet
|
||||
#: code:addons/odex_fleet/models/fleet_service_type.py:0
|
||||
#: model:ir.model.fields,field_description:odex_fleet.field_fleet_quotation_service__service_id
|
||||
#: model:ir.model.fields,field_description:odex_fleet.field_fleet_service_line_config__service_ids
|
||||
#: model:ir.model.fields,field_description:odex_fleet.field_fleet_vehicle_cost__service_id
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ from . import form_renew
|
|||
from . import account_config
|
||||
from . import insurance_companies
|
||||
from . import infractions
|
||||
from . import driver_departments
|
||||
from . import driver_departments
|
||||
from . import fleet_service_type
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
from odoo import models, fields, api, _
|
||||
from odoo.api import returns
|
||||
|
||||
|
||||
class FleetServiceType(models.Model):
|
||||
_inherit = 'fleet.service.type'
|
||||
_description = 'Fleet Service Type'
|
||||
|
||||
category = fields.Selection(selection='get_new_category_selection', string='Category', required=True,
|
||||
help='Choose whether the service refer to contracts, vehicle services or both')
|
||||
|
||||
def get_new_category_selection(self):
|
||||
selection = [(_('service'), _('Service'))]
|
||||
return selection
|
||||
|
|
@ -21,56 +21,60 @@ class FleetMaintenance(models.Model):
|
|||
else:
|
||||
raise ValidationError(_("You Need To Configurate Account Details"))
|
||||
return res
|
||||
|
||||
|
||||
name = fields.Char(string="Name")
|
||||
next_request_date = fields.Date(string="Next Request Date")
|
||||
date = fields.Date(string=" Request Date", default=fields.Date.context_today)
|
||||
next_odometer = fields.Float(string="Next Odometer")
|
||||
next_odometer = fields.Float(string="Next Odometer", compute='get_old_odometer', store=True)
|
||||
odometer = fields.Float(string="Odometer")
|
||||
type = fields.Selection([('corrective', 'Corrective'), ('preventive', 'Preventive')], string='Maintenance Type', default="corrective")
|
||||
state = fields.Selection([('draft', 'Draft'),
|
||||
type = fields.Selection([('corrective', 'Corrective'), ('preventive', 'Preventive')], string='Maintenance Type',
|
||||
default="corrective")
|
||||
state = fields.Selection([('draft', 'Draft'),
|
||||
('confirm', 'Confirm'),
|
||||
('approve', 'Approve'),
|
||||
('paid', 'Paid'),
|
||||
('refused', 'Refuse'),
|
||||
('cancel', 'Cancel'),
|
||||
], string='state', default="draft")
|
||||
], string='state', default="draft")
|
||||
vehicle_id = fields.Many2one('fleet.vehicle', string="Vehicle")
|
||||
license_plate = fields.Char(required=True, related='vehicle_id.license_plate', store=True,
|
||||
)
|
||||
employee_id = fields.Many2one('hr.employee', string="Driver" )
|
||||
quotation_ids = fields.One2many('fleet.quotation','request_id',string="Quotations")
|
||||
service_ids = fields.One2many('fleet.quotation.service','request_id',string="Quotations")
|
||||
branch_id = fields.Many2one('res.branch', string="Branch", default=lambda self: self.env.user.branch_id )
|
||||
license_plate = fields.Char(required=True, related='vehicle_id.license_plate')
|
||||
employee_id = fields.Many2one('hr.employee', string="Driver")
|
||||
quotation_ids = fields.One2many('fleet.quotation', 'request_id', string="Quotations")
|
||||
service_ids = fields.One2many('fleet.quotation.service', 'request_id', string="Quotations")
|
||||
branch_id = fields.Many2one('hr.department', string="Branch")
|
||||
# log_id = fields.Many2one('fleet.vehicle.log.services', string="Service Log")
|
||||
total_cost = fields.Float( string="Total Cost", compute="get_cost",store=True )
|
||||
total1 = fields.Float(string="Total",compute="get_total",store=True )
|
||||
total_cost = fields.Float(string="Total Cost", compute="get_cost", store=True)
|
||||
total1 = fields.Float(string="Total", compute="get_total", store=True)
|
||||
account_id = fields.Many2one('account.account', string="Account")
|
||||
invoice_id = fields.Many2one('account.move', string="Invoice", copy=False)
|
||||
line_id = fields.Many2one('fleet.service.line.config', string="Line", copy=False)
|
||||
reason = fields.Text(string="Reject Reason", tracking=True,)
|
||||
reason = fields.Text(string="Reject Reason", tracking=True, )
|
||||
tax_id = fields.Many2one('account.tax', string='Tax', ondelete='restrict')
|
||||
user_id = fields.Many2one('res.users', string='Responsible', required=False, default=lambda self: self.env.user)
|
||||
edit_access = fields.Boolean(compute="get_access",)
|
||||
edit_access = fields.Boolean(compute="get_access", )
|
||||
|
||||
@api.onchange('vehicle_id')
|
||||
def get_old_odometer(self):
|
||||
for rec in self:
|
||||
rec.next_odometer = rec.vehicle_id.odometer
|
||||
|
||||
def get_access(self):
|
||||
for rec in self:
|
||||
rec.edit_access = False
|
||||
if rec.state == 'approve' and self.env.user.has_group('odex_fleet.fleet_group_account'):
|
||||
if rec.state == 'approve' and self.env.user.has_group('odex_fleet.fleet_group_account'):
|
||||
rec.edit_access = True
|
||||
|
||||
@api.depends('service_ids')
|
||||
def get_total(self):
|
||||
for rec in self:
|
||||
if rec.service_ids:
|
||||
rec.total1 = sum(rec.service_ids.mapped('qty'))
|
||||
|
||||
rec.total1 = sum(rec.service_ids.mapped('qty'))
|
||||
|
||||
def create_invoice(self):
|
||||
partner = self.quotation_ids.filtered(lambda r:r.approve == True).mapped('partner_id')
|
||||
partner = self.quotation_ids.filtered(lambda r: r.approve == True).mapped('partner_id')
|
||||
if not partner:
|
||||
raise ValidationError(_("You NEED To ADD And Approve Quotation Lines"))
|
||||
amount = sum(self.quotation_ids.filtered(lambda r:r.approve == True).mapped('cost'))
|
||||
amount = sum(self.quotation_ids.filtered(lambda r: r.approve == True).mapped('cost'))
|
||||
invoice = self.env['account.move'].sudo().create({
|
||||
'partner_id': partner[0].id,
|
||||
'currency_id': self.env.user.company_id.currency_id.id,
|
||||
|
|
@ -100,11 +104,11 @@ class FleetMaintenance(models.Model):
|
|||
self.invoice_id = invoice.id
|
||||
# invoice.sudo().action_invoice_open()
|
||||
|
||||
@api.depends('quotation_ids','quotation_ids.approve')
|
||||
@api.depends('quotation_ids', 'quotation_ids.approve')
|
||||
def get_cost(self):
|
||||
for rec in self:
|
||||
if rec.quotation_ids.filtered(lambda r:r.approve == True):
|
||||
rec.total_cost = sum(rec.quotation_ids.filtered(lambda r:r.approve == True).mapped('cost'))
|
||||
if rec.quotation_ids.filtered(lambda r: r.approve == True):
|
||||
rec.total_cost = sum(rec.quotation_ids.filtered(lambda r: r.approve == True).mapped('cost'))
|
||||
|
||||
@api.onchange('vehicle_id')
|
||||
def get_vehcile_date(self):
|
||||
|
|
@ -115,17 +119,16 @@ class FleetMaintenance(models.Model):
|
|||
|
||||
def action_confirm(self):
|
||||
for rec in self:
|
||||
record = rec.quotation_ids.sudo().filtered(lambda r: r.approve == True)
|
||||
if not record:
|
||||
raise ValidationError(_("You Need Approve Quotation First"))
|
||||
rec.sudo().state = 'confirm'
|
||||
|
||||
def action_approve(self):
|
||||
for rec in self:
|
||||
record = rec.quotation_ids.sudo().filtered(lambda r: r.approve == True)
|
||||
if not record:
|
||||
raise ValidationError(_("You Need Approve Quotation First"))
|
||||
rec.state = 'approve'
|
||||
rec.vehicle_id.next_request_date = rec.next_request_date
|
||||
|
||||
|
||||
def action_refuse(self):
|
||||
for rec in self:
|
||||
rec.state = 'refused'
|
||||
|
|
@ -143,17 +146,18 @@ class FleetMaintenance(models.Model):
|
|||
for rec in self:
|
||||
rec.state = 'cancel'
|
||||
|
||||
|
||||
class FleetQuotation(models.Model):
|
||||
_name = 'fleet.quotation'
|
||||
_description = 'Fleet Quotation'
|
||||
|
||||
cost = fields.Float(string="Cost")
|
||||
offer = fields.Binary(string="Offer Attachment")
|
||||
partner_id = fields.Many2one('res.partner',string="Partner")
|
||||
partner_id = fields.Many2one('res.partner', string="Partner")
|
||||
approve = fields.Boolean()
|
||||
request_id = fields.Many2one('fleet.maintenance' )
|
||||
request_id = fields.Many2one('fleet.maintenance')
|
||||
reason = fields.Text(string="Reject Reason")
|
||||
state = fields.Selection(related='request_id.state',store=True)
|
||||
state = fields.Selection(related='request_id.state', store=True)
|
||||
edit_access = fields.Boolean(compute="get_access", )
|
||||
|
||||
def get_access(self):
|
||||
|
|
@ -162,7 +166,6 @@ class FleetQuotation(models.Model):
|
|||
if rec.state == 'approve' and self.env.user.has_group('odex_fleet.fleet_group_account'):
|
||||
rec.edit_access = True
|
||||
|
||||
|
||||
def action_approve(self):
|
||||
rec = self.request_id.quotation_ids.filtered(lambda r: r.approve)
|
||||
print("YYYYYYYYYYYY", rec)
|
||||
|
|
@ -175,7 +178,7 @@ class FleetQuotation(models.Model):
|
|||
form_view_id = self.env.ref("odex_fleet.wizard_reject_reason_fleet_wiz_form").id
|
||||
return {
|
||||
'name': _("Reject Reason"),
|
||||
|
||||
|
||||
'view_mode': 'form',
|
||||
'res_model': 'reject.reason.fleet.wiz',
|
||||
'views': [(form_view_id, 'form')],
|
||||
|
|
@ -184,6 +187,7 @@ class FleetQuotation(models.Model):
|
|||
'context': {'default_request_id': self.id},
|
||||
}
|
||||
|
||||
|
||||
class FleetQuotationService(models.Model):
|
||||
_name = 'fleet.quotation.service'
|
||||
_description = 'Fleet Service'
|
||||
|
|
@ -192,13 +196,10 @@ class FleetQuotationService(models.Model):
|
|||
cost = fields.Float(string="Cost")
|
||||
number = fields.Float(string="Number")
|
||||
total = fields.Float(string="Total", compute='_compute_total', readonly=True)
|
||||
service_id = fields.Many2one('fleet.service.type',string="Service")
|
||||
service_id = fields.Many2one('fleet.service.type', string="Service")
|
||||
request_id = fields.Many2one('fleet.maintenance')
|
||||
|
||||
@api.onchange('number', 'qty')
|
||||
def _compute_total(self):
|
||||
for r in self:
|
||||
r.total = r.number * r.qty
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,15 +5,18 @@ from datetime import timedelta
|
|||
from dateutil.relativedelta import relativedelta
|
||||
import math
|
||||
|
||||
|
||||
class FleetBranch(models.Model):
|
||||
_inherit = 'res.branch'
|
||||
|
||||
state_id = fields.Many2one('res.country.state', string="State", )
|
||||
|
||||
|
||||
|
||||
class Partner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
car_owner = fields.Boolean( string="Car Owner", )
|
||||
car_owner = fields.Boolean(string="Car Owner", )
|
||||
|
||||
|
||||
class FleetVehicle(models.Model):
|
||||
_inherit = 'fleet.vehicle'
|
||||
|
|
@ -22,7 +25,7 @@ class FleetVehicle(models.Model):
|
|||
insurance_companies_id = fields.Many2one('insurance.companies', string="Insurance Companies")
|
||||
employee_id = fields.Many2one('hr.employee', string="Driver")
|
||||
driver_id = fields.Many2one(related='employee_id.user_id.partner_id', store=True, string="Driver")
|
||||
branch_id = fields.Many2one('hr.department', string="Branch",)
|
||||
branch_id = fields.Many2one('hr.department', string="Branch", )
|
||||
states = fields.Many2one('res.country.state', string="State", )
|
||||
old_branch_id = fields.Many2one('res.branch', string="Old Branch", )
|
||||
license_end = fields.Date(string="License End")
|
||||
|
|
@ -307,7 +310,7 @@ class FleetVehicleLogServices(models.Model):
|
|||
account_id = fields.Many2one('account.account', string="Account")
|
||||
tax_id = fields.Many2one('account.tax', string='Tax', ondelete='restrict')
|
||||
invoice_id = fields.Many2one('account.move', string="Invoice", copy=False)
|
||||
partner_id = fields.Many2one('res.partner', string="Service Provider")
|
||||
partner_id = fields.Many2one('res.partner', string="Service Provider", required=1)
|
||||
request_id = fields.Many2one('fleet.maintenance', string="Maintenance Request")
|
||||
state = fields.Selection([
|
||||
('draft', 'Draft'),
|
||||
|
|
@ -336,6 +339,13 @@ class FleetVehicleLogServices(models.Model):
|
|||
default=lambda self: self.env.ref('fleet.type_service_service_8', raise_if_not_found=False),
|
||||
)
|
||||
|
||||
def copy(self, default=None):
|
||||
default = dict(default or {})
|
||||
default.update({
|
||||
'status': 'draft',
|
||||
})
|
||||
return super(FleetVehicleLogServices, self).copy(default)
|
||||
|
||||
@api.onchange('odometer')
|
||||
def onchange_odometer(self):
|
||||
for rec in self:
|
||||
|
|
@ -350,7 +360,7 @@ class FleetVehicleLogServices(models.Model):
|
|||
|
||||
def set_to_draft(self):
|
||||
for rec in self:
|
||||
rec.state = 'draft'
|
||||
rec.status = 'draft'
|
||||
|
||||
def action_confirm(self):
|
||||
self.sudo().status = 'confirm'
|
||||
|
|
@ -443,7 +453,8 @@ class FleetVehicleLogFuel(models.Model):
|
|||
print("pass")
|
||||
# pass
|
||||
else:
|
||||
raise ValidationError(_("You Need To Configurate Account Details"))
|
||||
pass
|
||||
# raise ValidationError(_("You Need To Configurate Account Details"))
|
||||
return res
|
||||
|
||||
liter = fields.Float()
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ fleet.fleet_vehicle_log_contract_access_right_user,fleet_vehicle_log_contract_ac
|
|||
fleet_vehicle_log_contract_access_right_user_hr,fleet_vehicle_log_contract_access_right_hr,fleet.model_fleet_vehicle_log_contract,fleet_group_hr,1,1,1,1
|
||||
fleet_vehicle_log_contract_access_right_user_hr_off,fleet_vehicle_log_contract_access_right_hr_off,fleet.model_fleet_vehicle_log_contract,fleet_group_hr_officer,1,0,1,0
|
||||
fleet_vehicle_log_line,fleet_vehicle_log_line,model_fleet_service_line_config,,1,1,1,0
|
||||
fleet_vehicle_log_line_quotation,fleet_vehicle_log_line_quotation,model_fleet_quotation,,1,1,1,0
|
||||
fleet_vehicle_log_line_quotation_ser,fleet_vehicle_log_line_quotation_ser,model_fleet_quotation_service,,1,1,1,0
|
||||
fleet_vehicle_log_line_quotation,fleet_vehicle_log_line_quotation,model_fleet_quotation,,1,1,1,1
|
||||
fleet_vehicle_log_line_quotation_ser,fleet_vehicle_log_line_quotation_ser,model_fleet_quotation_service,,1,1,1,1
|
||||
fleet_vehicle_access_right_general,fleet_vehicle_access_right_general,fleet.model_fleet_vehicle,,1,0,0,0
|
||||
fleet_vehicle_access_right_acc,fleet_vehicle_access_right_general,fleet.model_fleet_vehicle,fleet_group_account,1,1,0,0
|
||||
fleet_vehicle_access_right_hr_off,fleet_vehicle_access_right_general,fleet.model_fleet_vehicle,fleet_group_hr_officer,1,1,0,0
|
||||
|
|
|
|||
|
|
|
@ -49,7 +49,7 @@
|
|||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<!-- <menuitem name="Departments" parent="fleet.menu_root" id="vehicles_infractions" sequence="2"/>-->
|
||||
<menuitem action="driver_department_action" name="Departments" parent="fleet.fleet_configuration" id="driver_department_menu"/>
|
||||
<!-- <menuitem name="Departments" parent="fleet.menu_root" id="vehicles_infractions" sequence="2" active="False"/>-->
|
||||
<!-- <menuitem action="driver_department_action" name="Departments" parent="fleet.fleet_configuration" id="driver_department_menu"/>-->
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
<button name="action_refuse" groups="odex_fleet.fleet_group_account,odex_fleet.fleet_group_gm" string="Refuse" type="object" class="oe_highlight" states="confirm"/>
|
||||
<button name="action_paid" groups="odex_fleet.fleet_group_account,odex_fleet.fleet_group_supervisor" string="Paid" type="object" class="oe_highlight" states="approve"/>
|
||||
<button name="action_cancel" groups="odex_fleet.fleet_group_gm,odex_fleet.fleet_group_vice_gm" string="Cancel" type="object" class="oe_highlight" states="draft,confirm,approve"/>
|
||||
<button name="set_to_draft" groups="odex_fleet.fleet_group_draft" type="object" states="refused" class="oe_highlight" string="Set To Draft"/>
|
||||
<button name="set_to_draft" groups="odex_fleet.fleet_group_draft" type="object" states="refused,cancel" class="oe_highlight" string="Set To Draft"/>
|
||||
<field name="state" widget="statusbar" />
|
||||
</header>
|
||||
<sheet>
|
||||
|
|
@ -56,13 +56,13 @@
|
|||
</page>
|
||||
<page string="Quotations">
|
||||
<field name="quotation_ids" nolabel="1" attrs="{'readonly': [('state', '!=', 'draft'),('edit_access', '!=', True)]}">
|
||||
<tree editable="bottom">
|
||||
<tree editable="bottom" delete="1">
|
||||
<field name="partner_id" required="1"/>
|
||||
<field name="cost" required="1"/>
|
||||
<field name="offer" required="1"/>
|
||||
<field name="reason" attrs="{'invisible': [('approve', '=',True)],'readonly':True}" force_save="1"/>
|
||||
<button name="action_approve" string="Approve" type="object" class="oe_highlight" attrs="{'invisible': ['|',('approve', '=', True),('edit_access', '!=', True),('state','!=','confirm')]}"/>
|
||||
<button name="action_reject" string="Reject" type="object" class="oe_highlight" attrs="{'invisible': ['|',('approve', '=', False),('edit_access', '!=', True),('state','!=','confirm')]}"/>
|
||||
<button name="action_approve" string="Approve" type="object" class="oe_highlight" attrs="{'invisible': ['|',('approve', '=', True),('edit_access', '!=', True),('state','!=','draft')]}"/>
|
||||
<button name="action_reject" string="Reject" type="object" class="oe_highlight" attrs="{'invisible': ['|',('approve', '=', False),('edit_access', '!=', True),('state','!=','draft')]}"/>
|
||||
<field name="approve" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="edit_access" invisible="1"/>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<button name="action_approve" groups="odex_fleet.fleet_group_gm" type="object" states="confirm" class="oe_highlight" string="Approve"/>
|
||||
<button name="action_cancel" groups="odex_fleet.fleet_group_supervisor" type="object" states="draft" class="oe_highlight" string="Cancel"/>
|
||||
<button name="action_refuse" groups="odex_fleet.fleet_group_gm" type="object" states="confirm" class="oe_highlight" string="Refuse"/>
|
||||
<button name="set_to_draft" groups="odex_fleet.fleet_group_draft" type="object" states="refused" class="oe_highlight" string="Set To Draft"/>
|
||||
<button name="set_to_draft" groups="odex_fleet.fleet_group_draft" type="object" states="refused,cancel" class="oe_highlight" string="Set To Draft"/>
|
||||
<field name="state" widget="statusbar" />
|
||||
</header>
|
||||
<sheet>
|
||||
|
|
|
|||
|
|
@ -179,7 +179,8 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- <menuitem action="fleet_vehicle_costs_action" parent="fleet.fleet_vehicles" id="fleet_vehicle_costs_menu" groups="fleet.fleet_group_manager"/>-->
|
||||
<!-- <menuitem action="fleet_vehicle_costs_action" parent="fleet.fleet_vehicles" id="fleet_vehicle_costs_menu"-->
|
||||
<!-- groups="fleet.fleet_group_manager"/>-->
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="odex_view_fleet_vehicle_form">
|
||||
|
|
@ -246,7 +247,7 @@
|
|||
<field name="vehicle_type" invisible="1"/>
|
||||
<field name="states"/>
|
||||
<field name="branch_id"/>
|
||||
<!-- <field name="owner_id" domain="[('car_owner','=',True)]" required="1"/>-->
|
||||
<field name="owner_id" domain="[('car_owner','=',True)]"/>
|
||||
<field name="fleet_type_id" readonly="1"/>
|
||||
<field name="car_category"/>
|
||||
<field name="man_company" readonly="1"/>
|
||||
|
|
@ -397,11 +398,13 @@
|
|||
name="Vehicle Type" parent="fleet.fleet_configuration" id="fleet_type_menu" sequence="100"
|
||||
groups="fleet.fleet_group_user"/>
|
||||
|
||||
<!-- <menuitem id="res_states_menu" name="States" sequence="1"-->
|
||||
<!-- parent="fleet.fleet_configuration" groups="fleet.fleet_group_user,fleet_group_hr_officer" action="base.action_country_state" />-->
|
||||
<menuitem id="res_states_menu" name="States" sequence="1"
|
||||
parent="fleet.fleet_configuration" groups="fleet.fleet_group_user,fleet_group_hr_officer"
|
||||
action="base.action_country_state"/>
|
||||
|
||||
<!-- <menuitem id="res_branches_menu" name="Branch"-->
|
||||
<!-- parent="fleet.fleet_configuration" groups="fleet_group_supervisor,fleet_group_hr_officer" action="branch.branch_action_res_branch" sequence="2"/>-->
|
||||
<menuitem id="res_branches_menu" name="Branch"
|
||||
parent="fleet.fleet_configuration" groups="fleet_group_supervisor,fleet_group_hr_officer"
|
||||
action="branch.branch_action_res_branch" sequence="2"/>
|
||||
|
||||
<!-- fuel type-->
|
||||
<record id='fleet_fuel_price_view_form' model='ir.ui.view'>
|
||||
|
|
@ -543,8 +546,9 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- <menuitem action="man_company_action"-->
|
||||
<!-- name="Manufacture Company" parent="fleet.fleet_configuration" id="man_company_menu" groups="fleet.fleet_group_user" sequence="101"/>-->
|
||||
<menuitem action="man_company_action"
|
||||
name="Manufacture Company" parent="fleet.fleet_configuration" id="man_company_menu"
|
||||
groups="fleet.fleet_group_user" sequence="101"/>
|
||||
<!-- Transmission Type -->
|
||||
<record id='fleet_transmission_view_form' model='ir.ui.view'>
|
||||
<field name="name">fleet.vehicle.transmission.setting.model.form</field>
|
||||
|
|
@ -653,7 +657,8 @@
|
|||
</record>
|
||||
|
||||
<!-- -->
|
||||
<!-- <menuitem action="action_partner_owner_form" groups="fleet.fleet_group_user" parent="fleet.fleet_vehicles" sequence="3" id="fleet_vehicle_owner_menu"/>-->
|
||||
<!-- <menuitem action="action_partner_owner_form" groups="fleet.fleet_group_user" parent="fleet.fleet_vehicles"-->
|
||||
<!-- sequence="3" id="fleet_vehicle_owner_menu"/>-->
|
||||
<!-- -->
|
||||
<menuitem action="fleet.fleet_vehicle_action" parent="fleet.fleet_vehicles" id="fleet.fleet_vehicle_menu"
|
||||
groups="fleet.fleet_group_user" sequence="2"/>
|
||||
|
|
@ -680,7 +685,7 @@
|
|||
states="draft" class="oe_highlight" string="Cancel"/>
|
||||
<button name="action_refuse" groups="odex_fleet.fleet_group_gm" type="object" states="confirm"
|
||||
class="oe_highlight" string="Refuse"/>
|
||||
<button name="set_to_draft" groups="odex_fleet.fleet_group_draft" type="object" states="refused"
|
||||
<button name="set_to_draft" groups="odex_fleet.fleet_group_draft" type="object" states="refused,cancel"
|
||||
class="oe_highlight" string="Set To Draft"/>
|
||||
<field name="state" widget="statusbar" nolabel="1"/>
|
||||
</header>
|
||||
|
|
@ -746,7 +751,7 @@
|
|||
<tree string="Fuel Logs">
|
||||
<field name="date"/>
|
||||
<field name="vehicle_id"/>
|
||||
<field name="purchaser_id"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="inv_ref" invisible="1"/>
|
||||
<field name="vendor_id" invisible="1"/>
|
||||
<field name="odometer"/>
|
||||
|
|
@ -806,7 +811,7 @@
|
|||
<button name="action_refuse" groups="odex_fleet.fleet_group_gm" type="object"
|
||||
states="confirm" class="oe_highlight" string="Refuse"/>
|
||||
<button name="set_to_draft" groups="odex_fleet.fleet_group_draft" type="object"
|
||||
states="refused" class="oe_highlight" string="Set To Draft"/>
|
||||
states="refused,cancel" class="oe_highlight" string="Set To Draft"/>
|
||||
<field name="status" widget="statusbar" nolabel="1"/>
|
||||
</header>
|
||||
<sheet>
|
||||
|
|
@ -881,6 +886,17 @@
|
|||
<field name="inv_ref" position="after">
|
||||
<field name="state"/>
|
||||
</field>
|
||||
<field name="purchaser_id" position="replace">
|
||||
<field name="employee_id"/>
|
||||
</field>
|
||||
|
||||
<field name="service_type_id" position="replace">
|
||||
<field name="cost_subtype_id"/>
|
||||
</field>
|
||||
|
||||
<field name="vendor_id" position="replace">
|
||||
<field name="partner_id"/>
|
||||
</field>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -892,6 +908,9 @@
|
|||
<menuitem action="fleet.fleet_vehicle_model_brand_action" groups="fleet.fleet_group_user"
|
||||
parent="fleet.fleet_configuration" id="fleet.fleet_vehicle_model_brand_menu" sequence="2"/>
|
||||
|
||||
<menuitem action="fleet.fleet_vehicle_log_contract_action" parent="fleet.fleet_vehicles"
|
||||
id="fleet.fleet_vehicle_log_contract_menu" groups="fleet.fleet_group_user,fleet_group_hr_officer"
|
||||
active="False"/>
|
||||
<menuitem action="fleet.fleet_vehicle_service_types_action" parent="fleet.fleet_configuration"
|
||||
groups="fleet.fleet_group_user" id="fleet.fleet_vehicle_service_types_menu" sequence="3"/>
|
||||
<menuitem id="fleet.fleet_vehicle_tag_menu" parent="fleet.fleet_configuration"
|
||||
|
|
|
|||
Loading…
Reference in New Issue