[IMP]Improvement in Code
bzr revid: ron@tinyerp.com-20101122131615-l4c5xxidfsokhdvs
This commit is contained in:
parent
327be90e0c
commit
68e8e0caec
|
@ -33,7 +33,7 @@ def is_pair(x):
|
|||
def check_ean(eancode):
|
||||
if not eancode:
|
||||
return True
|
||||
if len(eancode) not in [13,14,8]:
|
||||
if len(eancode) not in [13]:
|
||||
return False
|
||||
try:
|
||||
int(eancode)
|
||||
|
@ -463,7 +463,7 @@ class product_product(osv.osv):
|
|||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the product without removing it."),
|
||||
'variants': fields.char('Variants', size=64),
|
||||
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade"),
|
||||
'ean13': fields.char('EAN13', size=14),
|
||||
'ean13': fields.char('EAN13', size=13),
|
||||
'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."),
|
||||
'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Sale Price')),
|
||||
'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Sale Price')),
|
||||
|
|
|
@ -875,6 +875,7 @@
|
|||
<field name="state"/>
|
||||
<button name="%(action_partial_move)d" string="Partial" type="action" states="confirmed,assigned" icon="gtk-justify-fill"/>
|
||||
<button name="action_done" states="confirmed,assigned" string="Process" type="object" icon="gtk-go-forward"/>
|
||||
<button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/>
|
||||
</tree>
|
||||
<form string="Stock Moves">
|
||||
<group colspan="2" col="4">
|
||||
|
|
|
@ -63,7 +63,6 @@ class stock_invoice_onshipping(osv.osv_memory):
|
|||
|
||||
|
||||
_columns = {
|
||||
# 'journal_id': fields.many2one('account.journal', 'Destination Journal', required=True,selection=_get_journal_id),
|
||||
'journal_id': fields.selection(_get_journal_id, 'Destination Journal',required=True),
|
||||
'group': fields.boolean("Group by partner"),
|
||||
'invoice_date': fields.date('Invoiced date'),
|
||||
|
@ -86,7 +85,7 @@ class stock_invoice_onshipping(osv.osv_memory):
|
|||
raise osv.except_osv(_('Warning !'), _('None of these picking lists require invoicing.'))
|
||||
return res
|
||||
|
||||
|
||||
|
||||
|
||||
def create_invoice(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
|
|
Loading…
Reference in New Issue