parent
b07a8834d0
commit
550e2b4cbb
|
@ -386,6 +386,10 @@ class product_product(osv.osv):
|
|||
res = {}
|
||||
for p in self.browse(cr, uid, ids, context):
|
||||
data = self._get_partner_code_name(cr, uid, [], p.id, context.get('partner_id', None), context)
|
||||
if not data['code']:
|
||||
data['name'] = p.code
|
||||
if not data['name']:
|
||||
data['name'] = p.name
|
||||
res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') + \
|
||||
(data['name'] or '')
|
||||
return res
|
||||
|
|
|
@ -898,6 +898,7 @@ class sale_order_line(osv.osv):
|
|||
}
|
||||
else:
|
||||
result.update({'price_unit': price})
|
||||
print result
|
||||
return {'value': result, 'domain': domain,'warning':warning}
|
||||
|
||||
def product_uom_change(self, cursor, user, ids, pricelist, product, qty=0,
|
||||
|
|
|
@ -612,7 +612,8 @@ class stock_picking(osv.osv):
|
|||
continue
|
||||
payment_term_id = False
|
||||
partner = picking.address_id and picking.address_id.partner_id
|
||||
raise osv.except_osv(_('Error, no partner !'),
|
||||
if not partner:
|
||||
raise osv.except_osv(_('Error, no partner !'),
|
||||
_('Please put a partner on the picking list if you want to generate invoice.'))
|
||||
|
||||
if type in ('out_invoice', 'out_refund'):
|
||||
|
|
|
@ -608,6 +608,7 @@
|
|||
<field name="name" select="1" readonly="1"/>
|
||||
<field name="min_date" select="1"/>
|
||||
<field name="backorder_id" select="2" readonly="1"/>
|
||||
<field name="origin" select="2"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
|
@ -796,6 +797,7 @@
|
|||
<field name="min_date" select="2"/>
|
||||
<field name="invoice_state"/>
|
||||
<field name="backorder_id" select="2" readonly="1"/>
|
||||
<field name="origin" select="2" readonly="1"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
|
|
|
@ -90,9 +90,9 @@ def _get_type(obj, cr, uid, data, context):
|
|||
return {'type': type}
|
||||
|
||||
def _create_invoice(obj, cr, uid, data, context):
|
||||
if context and context.get('new_picking',False):
|
||||
data['id'] = context['new_picking']
|
||||
data['ids'] = [context['new_picking']]
|
||||
if data['form'].get('new_picking',False):
|
||||
data['id'] = data['form']['new_picking']
|
||||
data['ids'] = [data['form']['new_picking']]
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
picking_obj = pooler.get_pool(cr.dbname).get('stock.picking')
|
||||
mod_obj = pool.get('ir.model.data')
|
||||
|
|
Loading…
Reference in New Issue