remove branch dependencies

This commit is contained in:
esraa 2024-10-22 14:17:47 +03:00
parent 9bcac4bda5
commit 12ec1b7ecb
5 changed files with 31 additions and 31 deletions

View File

@ -172,8 +172,8 @@
<th style="text-align:center;">Type</th>
<th style="text-align:center;">Model</th>
<th style="text-align:center;">Plate</th>
<th style="text-align:center;">State</th>
<th style="text-align:center;">Branch</th>
<!-- <th style="text-align:center;">State</th>-->
<!-- <th style="text-align:center;">Branch</th>-->
<th style="text-align:center;">Start</th>
<th style="text-align:center;">End</th>
<th style="text-align:center;">KM Number</th>
@ -202,12 +202,12 @@
<td class="text-center">
<span t-esc="o.license_plate"/>
</td>
<td class="text-center">
<span t-esc="o.vehicle_id.branch_id.state_id.name"/>
</td>
<td class="text-center">
<span t-esc="o.vehicle_id.branch_id.name"/>
</td>
<!-- <td class="text-center">-->
<!-- <span t-esc="o.vehicle_id.branch_id.state_id.name"/>-->
<!-- </td>-->
<!-- <td class="text-center">-->
<!-- <span t-esc="o.vehicle_id.branch_id.name"/>-->
<!-- </td>-->
<td class="text-center">
<span t-esc="o.start_date"/>
</td>

View File

@ -20,8 +20,8 @@
<th style="text-align:center;">Model</th>
<th style="text-align:center;">Plate</th>
<th style="text-align:center;">Driver</th>
<th style="text-align:center;">State</th>
<th style="text-align:center;">Branch</th>
<!-- <th style="text-align:center;">State</th>-->
<!-- <th style="text-align:center;">Branch</th>-->
<th style="text-align:center;">Maintenance</th>
<th style="text-align:center;">Maintenance Date</th>
</tr>
@ -47,12 +47,12 @@
<td class="text-center">
<span t-esc="o.employee_id.name"/>
</td>
<td class="text-center">
<span t-esc="o.branch_id.state_id.name"/>
</td>
<td class="text-center">
<span t-esc="o.branch_id.name"/>
</td>
<!-- <td class="text-center">-->
<!-- <span t-esc="o.branch_id.state_id.name"/>-->
<!-- </td>-->
<!-- <td class="text-center">-->
<!-- <span t-esc="o.branch_id.name"/>-->
<!-- </td>-->
<td class="text-center">
<span t-esc="o.name"/>
</td>

View File

@ -629,18 +629,18 @@
</field>
</record>
<!-- Branch-->
<record id="fleet_branch_form_view" model="ir.ui.view">
<field name="name">fleet.branch.inherit</field>
<field name="model">res.branch</field>
<field name="inherit_id" ref="branch.branch_res_branch_view_form"/>
<field eval="200" name="priority"/>
<!-- <record id="fleet_branch_form_view" model="ir.ui.view">-->
<!-- <field name="name">fleet.branch.inherit</field>-->
<!-- <field name="model">res.branch</field>-->
<!-- <field name="inherit_id" ref="branch.branch_res_branch_view_form"/>-->
<!-- <field eval="200" name="priority"/>-->
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="state_id"/>
</xpath>
</field>
</record>
<!-- <field name="arch" type="xml">-->
<!-- <xpath expr="//field[@name='name']" position="after">-->
<!-- <field name="state_id"/>-->
<!-- </xpath>-->
<!-- </field>-->
<!-- </record>-->
<!-- Partner-->

View File

@ -15,8 +15,8 @@
<field name="project_ids" widget="many2many_tags" attrs="{'invisible': [('vehicle_del_type', '!=' ,'project')]}"/>
<field name="vehicle_ids" widget="many2many_tags"
attrs="{'invisible': [('report_type', 'in', ['service','maintains','to_maintains','all_branch_cost','state_cost','branch_cost','driver','delegation','renew','to_renew'])]}"/>
<field name="branch_ids" widget="many2many_tags"
attrs="{'invisible': [('report_type', 'in', ['invoice','service','state_cost','driver','delegation','renew','to_renew'])]}"/>
<!-- <field name="F" widget="many2many_tags"-->
<!-- attrs="{'invisible': [('report_type', 'in', ['invoice','service','state_cost','driver','delegation','renew','to_renew'])]}"/>-->
<field name="type_ids" widget="many2many_tags"
attrs="{'invisible': [('report_type', 'in', ['invoice','maintains','to_maintains','driver','delegation','renew','to_renew'])]}"/>
<field name="state_ids" widget="many2many_tags"

View File

@ -17,7 +17,7 @@ class FleettWiz(models.TransientModel):
date_from = fields.Date(string='Date From')
date_to = fields.Date(string='Date To')
service_ids = fields.Many2many('fleet.service.type','fleet_service_wiz_rel', 'service_id', 'wiz_id', string='Service', )
branch_ids = fields.Many2many('res.branch', string='Branch', )
# branch_ids = fields.Many2many('res.branch', string='Branch', )
type_ids = fields.Many2many('fleet.type', string='Fleet Type', )
vehicle_ids = fields.Many2many('fleet.vehicle', string='Vehicle', )
state_ids = fields.Many2many('res.country.state', string=' States')
@ -51,7 +51,7 @@ class FleettWiz(models.TransientModel):
def print_report(self):
data ={'state_ids':self.state_ids.ids if self.state_ids else False,'date_from':self.date_from,'date_to':self.date_to,'report_type':self.report_type,
'type_ids':self.type_ids.ids if self.type_ids else False,'branch_ids':self.branch_ids.ids if self.branch_ids else False ,
'type_ids':self.type_ids.ids if self.type_ids else False,
'vehicle_ids':self.vehicle_ids.ids if self.vehicle_ids else False,'cost_subtype_ids': self.cost_subtype_ids.ids if self.cost_subtype_ids else False,
'vehicle_del_type' : self.vehicle_del_type if self.vehicle_del_type else False ,
'department_ids':self.department_ids.mapped('name'),