Add mrp_progress_button

This commit is contained in:
Florian da Costa
2017-07-27 12:28:54 +02:00
committed by AaronHForgeFlow
parent d60cf789f4
commit a8d9a1de78
8 changed files with 200 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Akretion (http://www.akretion.com). All Rights Reserved
# @author Florian DA COSTA <florian.dacosta@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime
from odoo import api, models
class MrpProduction(models.Model):
_inherit = 'mrp.production'
@api.multi
def action_progress(self):
self.write({
'state': 'progress',
'date_start': datetime.now(),
})
return True