bzr revid: uco@tinyerp.com-20101013044503-i7pwqsa3hb4q93s4
This commit is contained in:
uco (OpenERP)
2010-10-13 10:15:03 +05:30
232 changed files with 2465 additions and 2546 deletions
+1 -5
View File
@@ -322,7 +322,7 @@ class procurement_order(osv.osv):
if procurement.procure_method == 'make_to_order':
source = procurement.product_id.product_tmpl_id.property_stock_procurement.id
id = move_obj.create(cr, uid, {
'name': 'PROC:' + procurement.name,
'name': procurement.name,
'location_id': source,
'location_dest_id': procurement.location_id.id,
'product_id': procurement.product_id.id,
@@ -374,10 +374,6 @@ class procurement_order(osv.osv):
"Not enough stock and no minimum orderpoint rule defined.") % \
procurement.name
self.log(cr, uid, procurement.id, message)
if procurement.state=='exception' and procurement.message=='':
cr.execute('update procurement_order set message=%s where id=%s',
(_('Not enough stock '), procurement.id) )
return ok
def action_produce_assign_service(self, cr, uid, ids, context={}):
+1 -1
View File
@@ -72,9 +72,9 @@
<field colspan="4" name="message" readonly="1"/>
<field name="state" readonly="1"/>
<group col="7" colspan="2">
<button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
<button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
<button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
<button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
<button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/>
</group>
</page>
+5 -3
View File
@@ -23,8 +23,10 @@ import time
from mx import DateTime
from osv import osv
from tools.translate import _
import netsvc
import pooler
from tools.translate import _
class procurement_order(osv.osv):
_inherit = 'procurement.order'
@@ -169,8 +171,8 @@ class procurement_order(osv.osv):
else:
continue
proc_id = proc_obj.create(cr, uid, {
'name': 'Automatic OP: %s' % product.name,
'origin': 'SCHEDULER',
'name': _('Automatic OP: %s') % (product.name,),
'origin': _('SCHEDULER'),
'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'),
'product_id': product.id,
'product_qty': -product.virtual_available,
@@ -229,7 +231,7 @@ class procurement_order(osv.osv):
continue
if op.product_id.type not in ('consu'):
proc_id = procurement_obj.create(cr, uid, {
'name': 'OP:' + str(op.id),
'name': op.name,
'date_planned': newdate.strftime('%Y-%m-%d'),
'product_id': op.product_id.id,
'product_qty': qty,