mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
MIG maintenance_repair For Odoo 13.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
'name': 'Equipment Repair',
|
||||
'version': '12.0.1.0.0',
|
||||
'version': '13.0.1.0.0',
|
||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||
'category': 'Human Resources',
|
||||
'summary': 'Consume products on Maintenance Requests',
|
||||
|
||||
@@ -82,7 +82,6 @@ class MaintenanceRequestRepairLine(models.Model):
|
||||
standard_price = fields.Float(string='Est. Cost', states={'done': [('readonly', True)]})
|
||||
cost = fields.Float(string='Cost', compute='_compute_actual_cost', stored=True)
|
||||
|
||||
@api.multi
|
||||
def unlink(self):
|
||||
if self.filtered(lambda l: l.state == 'done'):
|
||||
raise UserError(_('Only draft lines can be deleted.'))
|
||||
@@ -103,7 +102,6 @@ class MaintenanceRequestRepairLine(models.Model):
|
||||
else:
|
||||
line.cost = 0.0
|
||||
|
||||
@api.multi
|
||||
def action_complete(self):
|
||||
# Create stock movements. - Inspired by mrp_repair
|
||||
MoveObj = self.env['stock.move']
|
||||
|
||||
@@ -11,7 +11,7 @@ class TestMaintenanceRepair(common.TransactionCase):
|
||||
})
|
||||
|
||||
loc_from = self.env.ref('stock.stock_location_stock')
|
||||
loc_to = self.env.ref('stock.location_inventory')
|
||||
loc_to = self.env.ref('stock.stock_location_output')
|
||||
request = self.env['maintenance.request'].create({
|
||||
'name': 'Repair Monitor',
|
||||
'equipment_id': equipment.id,
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='top_priority']" position="after">
|
||||
<xpath expr="//filter[@name='done']" position="after">
|
||||
<filter string="To Repair" name="to_repair" domain="[('repair_status', '=', 'to repair')]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user