MIG maintenance_repair For Odoo 13.0

This commit is contained in:
Bhoomi
2019-09-04 14:47:00 -04:00
parent 67ab6b05f9
commit 667bc66618
4 changed files with 3 additions and 5 deletions

View File

@@ -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',

View File

@@ -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']

View File

@@ -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,

View File

@@ -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>