[WIP] mrp_jit

bzr revid: qdp-launchpad@openerp.com-20130710153855-jceozpqwf4m89btq
This commit is contained in:
Quentin (OpenERP)
2013-07-10 17:38:55 +02:00
parent b6862f6272
commit 2c959b6e81
6 changed files with 41 additions and 27 deletions
+2 -1
View File
@@ -19,5 +19,6 @@
#
##############################################################################
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
import mrp_jit
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -2
View File
@@ -40,9 +40,9 @@ In that case, you can not use priorities any more on the different picking.
""",
'author': 'OpenERP SA',
'depends': ['procurement'],
'data': [], #'mrp_jit.xml'
'data': [],
'demo': [],
'test': [], #'test/mrp_jit.yml'
'test': ['test/mrp_jit.yml'],
'installable': True,
'auto_install': False,
}
+34
View File
@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2013 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp.osv import osv
class procurement_order(osv.osv):
_inherit = "procurement.order"
def create(self, cr, uid, vals, context=None):
procurement_id = super(procurement_order, self).create(cr, uid, vals, context=context)
self.run(cr, uid, [procurement_id], context=context)
self.check(cr, uid, [procurement_id], context=context)
return procurement_id
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="workflow.transition" id="trans_direct_confirm_to_wait">
<!-- Duplicates the transition between the act_confirm and act_confirm_wait activites
but, this time, without the signal -->
<field name="act_from" ref="procurement.act_confirm"/>
<field name="act_to" ref="procurement.act_confirm_wait"/>
<field name="condition">check_conditions_confirm2wait()</field>
</record>
</data>
</openerp>
+2 -9
View File
@@ -5,20 +5,13 @@
!record {model: procurement.order, id: procurement_order_test1}:
company_id: base.main_company
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_id: stock.stock_location_stock
name: PROC/TEST/0001
product_id: product.product_product_16
product_qty: 10.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
-
|
I confirm the procurement order PROC/TEST/0001.
-
!workflow {model: procurement.order, action: button_confirm, ref: procurement_order_test1}
-
|
I check that the procurement is scheduled automatically.
I check that the procurement is automatically in exception because nothing is configured to handle this procurement.
-
!assert {model: procurement.order, id: procurement_order_test1, string: procstate}:
- state<>'confirmed'
- state == 'exception'
+1 -1
View File
@@ -196,7 +196,7 @@ class procurement_order(osv.osv):
:param procurement: browse record
:rtype: boolean
'''
return True
return False
#
# Scheduler