diff --git a/addons/lunch/lunch.py b/addons/lunch/lunch.py index 36c304f072a..7b410b04628 100644 --- a/addons/lunch/lunch.py +++ b/addons/lunch/lunch.py @@ -35,6 +35,16 @@ class lunch_order(osv.Model): _description = 'Lunch Order' _order = 'date desc' + def name_get(self, cr, uid, ids, context=None): + if not ids: + return [] + res = [] + for elmt in self.browse(cr, uid, ids, context=context): + name = _("Lunch Order") + name = name + ' ' + str(elmt.id) + res.append((elmt.id, name)) + return res + def _price_get(self, cr, uid, ids, name, arg, context=None): """ get and sum the order lines' price diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml index a72bf75de6c..c4683001d46 100644 --- a/addons/lunch/lunch_view.xml +++ b/addons/lunch/lunch_view.xml @@ -84,6 +84,39 @@ + + + cashmove tree + lunch.cashmove + + + + + + + + + + + + cashmove form + lunch.cashmove + +
+ + + + + + + +
+
+
+ + New Order @@ -110,6 +143,19 @@ + + + cashmove tree + lunch.cashmove + + + + + + + + + @@ -118,6 +164,7 @@ tree {"search_default_is_mine_group":1} +

Here you can see your cash moves.
A cash moves can be either an expense or a payment. @@ -174,6 +221,7 @@ tree,form {"search_default_group_by_user":1} +

Click to create a new payment. @@ -195,6 +243,7 @@ tree,form {"search_default_is_payment":1} +

Click to create a payment. @@ -386,38 +435,7 @@ - - - cashmove tree - lunch.cashmove - - - - - - - - - - - - cashmove form - lunch.cashmove - -

- - - - - - - -
-
-
- + alert tree