Arnaud Pineux (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/7.0-lunch-api into lp:openobject-addons/7.0.
Requested reviews: OpenERP Core Team (openerp) Related bugs: Bug #1095566 in OpenERP Addons: "[Lunch] comma in the order name" https://bugs.launchpad.net/openobject-addons/+bug/1095566 Bug #1095568 in OpenERP Addons: "[Lunch] Create button is inactive in Lunch => Lunch => Your Lunch Account" https://bugs.launchpad.net/openobject-addons/+bug/1095568 For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-lunch-api/+merge/141742 Remove the create "Button" only for the "Your Lunch Account" menu API -- https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-lunch-api/+merge/141742 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/7.0-lunch-api.
=== modified file 'lunch/lunch.py' --- lunch/lunch.py 2012-12-26 10:55:40 +0000 +++ lunch/lunch.py 2013-01-03 12:32:22 +0000 @@ -35,6 +35,16 @@ _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 === modified file 'lunch/lunch_view.xml' --- lunch/lunch_view.xml 2012-12-21 16:48:08 +0000 +++ lunch/lunch_view.xml 2013-01-03 12:32:22 +0000 @@ -83,6 +83,39 @@ </field> </record> + <!--view for cashmove--> + <record model="ir.ui.view" id="casmove_tree_view"> + <field name="name">cashmove tree</field> + <field name="model">lunch.cashmove</field> + <field name="arch" type="xml"> + <tree string="cashmove tree"> + <field name="date"/> + <field name="user_id"/> + <field name="description"/> + <field name="amount" sum="Total"/> + </tree> + </field> + </record> + + <record model="ir.ui.view" id="casmove_form_view"> + <field name="name">cashmove form</field> + <field name="model">lunch.cashmove</field> + <field name="arch" type="xml"> + <form string="cashmove form" version="7.0"> + <sheet> + <group> + <field name="user_id"/> + <field name="date"/> + <field name="amount"/> + </group> + <label for='description'/> + <field name="description"/> + </sheet> + </form> + </field> + </record> + + <!--Action for Your Orders--> <record model="ir.actions.act_window" id="action_lunch_order_form"> <field name="name">New Order</field> @@ -109,6 +142,19 @@ </field> </record> <menuitem name="Previous Orders" parent="menu_lunch_title" id="menu_lunch_order_tree" action="action_lunch_order_tree" sequence="2"/> + + <record model="ir.ui.view" id="casmove_tree"> + <field name="name">cashmove tree</field> + <field name="model">lunch.cashmove</field> + <field name="arch" type="xml"> + <tree string="cashmove tree" version="7.0" create='false'> + <field name="date"/> + <field name="user_id"/> + <field name="description"/> + <field name="amount" sum="Total"/> + </tree> + </field> + </record> <!--Action for Lunch cashmoves--> <record model="ir.actions.act_window" id="action_lunch_cashmove_form"> @@ -117,6 +163,7 @@ <field name="view_mode">tree</field> <field name="search_view_id" ref="view_lunch_employee_payment_filter"/> <field name="context">{"search_default_is_mine":1}</field> + <field name="view_id" ref="casmove_tree"/> <field name="help" type="html"> <p> Here you can see your cash moves.<br/>A cash moves can be either an expense or a payment. @@ -173,6 +220,7 @@ <field name="view_mode">tree,form</field> <field name="search_view_id" ref="view_lunch_cashmove_filter"/> <field name="context">{"search_default_group_by_user":1}</field> + <field name="view_id" ref="casmove_tree_view"/> <field name="help" type="html"> <p class="oe_view_nocontent_create"> Click to create a new payment. @@ -194,6 +242,7 @@ <field name="view_mode">tree,form</field> <field name="search_view_id" ref="view_lunch_employee_payment_filter"/> <field name="context">{"search_default_is_payment":1}</field> + <field name="view_id" ref="casmove_tree_view"/> <field name="help" type="html"> <p class="oe_view_nocontent_create"> Click to create a payment. @@ -385,38 +434,7 @@ </field> </record> - <!--view for cashmove--> - <record model="ir.ui.view" id="casmove_tree_view"> - <field name="name">cashmove tree</field> - <field name="model">lunch.cashmove</field> - <field name="arch" type="xml"> - <tree string="cashmove tree"> - <field name="date"/> - <field name="user_id"/> - <field name="description"/> - <field name="amount" sum="Total"/> - </tree> - </field> - </record> - - <record model="ir.ui.view" id="casmove_form_view"> - <field name="name">cashmove form</field> - <field name="model">lunch.cashmove</field> - <field name="arch" type="xml"> - <form string="cashmove form" version="7.0"> - <sheet> - <group> - <field name="user_id"/> - <field name="date"/> - <field name="amount"/> - </group> - <label for='description'/> - <field name="description"/> - </sheet> - </form> - </field> - </record> - + <!--view for alerts--> <record model="ir.ui.view" id="alert_tree_view"> <field name="name">alert tree</field>
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp