[IMP] point_of_sale: edit ean wizards for users and products
bzr revid: fva@openerp.com-20120725142608-tsvrxvvxg42sx1yr
This commit is contained in:
parent
ff4f70f120
commit
4201c58f36
|
@ -1253,9 +1253,9 @@ class product_product(osv.osv):
|
|||
'to_weight' : False,
|
||||
}
|
||||
|
||||
def add_ean13(self, cr, uid, ids, context):
|
||||
def edit_ean(self, cr, uid, ids, context):
|
||||
return {
|
||||
'name': _('Return Products'),
|
||||
'name': "Edit Ean",
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
|
|
|
@ -633,7 +633,7 @@
|
|||
</group>
|
||||
</group>
|
||||
<field name="ean13" position="after">
|
||||
<button name="add_ean13" type="object" string="Edit" />
|
||||
<button name="edit_ean" type="object" string="Edit" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -47,6 +47,18 @@ class res_users(osv.osv):
|
|||
for user in self.browse(cr, uid, ids, context=context)
|
||||
)
|
||||
|
||||
def edit_ean(self, cr, uid, ids, context):
|
||||
return {
|
||||
'name': "Edit Ean",
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'pos.ean_wizard',
|
||||
'target' : 'new',
|
||||
'view_id': False,
|
||||
'context':context,
|
||||
}
|
||||
|
||||
_constraints = [
|
||||
(_check_ean, "Error: Invalid ean code", ['ean13'],),
|
||||
]
|
||||
|
|
|
@ -22,8 +22,11 @@
|
|||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Point Of Sale">
|
||||
<field name="ean13" />
|
||||
<field name="pos_config" />
|
||||
<group>
|
||||
<field name="pos_config" />
|
||||
<field name="ean13" />
|
||||
<button name="edit_ean" type="object" string="Edit" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue