[MERGE] useability addons10
bzr revid: fp@tinyerp.com-20120926074121-tgdlrobcm6cjiz9a
This commit is contained in:
@@ -467,11 +467,15 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="uom_type" on_change="onchange_type(uom_type)"/>
|
||||
<p attrs="{'invisible':[('uom_type','!=','smaller')]}" colspan="2">
|
||||
e.g: 1 * (reference unit) = ratio * (this unit)
|
||||
</p>
|
||||
<p attrs="{'invisible':[('uom_type','!=','bigger')]}" colspan="2">
|
||||
e.g: 1 * (this unit) = ratio * (reference unit)
|
||||
</p>
|
||||
<field name="rounding"/>
|
||||
<field name="factor" attrs="{'invisible':[('uom_type','!=','smaller')]}"/>
|
||||
<label string=" e.g: 1 * (reference unit) = ratio * (this unit)" attrs="{'invisible':[('uom_type','!=','smaller')]}"/>
|
||||
<field name="factor_inv" attrs="{'invisible':[('uom_type','!=','bigger')]}"/>
|
||||
<label string=" e.g: 1 * (this unit) = ratio * (reference unit)" attrs="{'invisible':[('uom_type','!=','bigger')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -1170,8 +1170,9 @@ class stock_picking(osv.osv):
|
||||
return True
|
||||
for move in pick.move_lines:
|
||||
if move.state == 'done':
|
||||
raise osv.except_osv(_('Error!'), _('You cannot cancel picking because stock move is in done state!'))
|
||||
raise osv.except_osv(_('Error!'), _('You cannot cancel the picking as some moves have been done. You should cancel the picking lines.'))
|
||||
return True
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
move_obj = self.pool.get('stock.move')
|
||||
if context is None:
|
||||
@@ -1501,7 +1502,7 @@ class stock_production_lot(osv.osv):
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, domain=[('type', '<>', 'service')]),
|
||||
'date': fields.datetime('Creation Date', required=True),
|
||||
'stock_available': fields.function(_get_stock, fnct_search=_stock_search, type="float", string="Available", select=True,
|
||||
help="Current quantity of products with this Production Lot Number available in company warehouses",
|
||||
help="Current quantity of products with this Serial Number available in company warehouses",
|
||||
digits_compute=dp.get_precision('Product Unit of Measure')),
|
||||
'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),
|
||||
'company_id': fields.many2one('res.company', 'Company', select=True),
|
||||
@@ -1839,8 +1840,8 @@ class stock_move(osv.osv):
|
||||
warning = {}
|
||||
if (location.usage == 'internal') and (product_qty > (amount_actual or 0.0)):
|
||||
warning = {
|
||||
'title': _('Insufficient Stock in Lot !'),
|
||||
'message': _('You are moving %.2f %s products but only %.2f %s available in this lot.') % (product_qty, uom.name, amount_actual, uom.name)
|
||||
'title': _('Insufficient Stock for Serial Number !'),
|
||||
'message': _('You are moving %.2f %s but only %.2f %s available for this serial number.') % (product_qty, uom.name, amount_actual, uom.name)
|
||||
}
|
||||
return {'warning': warning}
|
||||
|
||||
|
||||
@@ -109,7 +109,9 @@
|
||||
</form>
|
||||
</field>
|
||||
<footer>
|
||||
<button name="split_lot" string="Ok" type="object" icon="gtk-ok" class="oe_highlight" />
|
||||
<button name="split_lot" string="Split" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user