← Back to team overview

openerp-dev-web team mailing list archive

lp:~openerp-dev/openobject-addons/addons-training-portal-training-fix-ysa into lp:~openobject-training/openobject-addons/training

 

Yogesh(Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/addons-training-portal-training-fix-ysa into lp:~openobject-training/openobject-addons/training.

Requested reviews:
  OpenObject Training (openobject-training)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/addons-training-portal-training-fix-ysa/+merge/56153

[FIX] training, portal, portal_training and board_training:- fix problem in group by, create user wizard and  create menu wizard.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/addons-training-portal-training-fix-ysa/+merge/56153
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/addons-training-portal-training-fix-ysa.
=== modified file 'board_training/board_orders.xml'
--- board_training/board_orders.xml	2011-03-25 10:15:51 +0000
+++ board_training/board_orders.xml	2011-04-04 13:03:31 +0000
@@ -13,6 +13,9 @@
                     <field name="course_id" link="0"/>
                     <field name="product_qty"/>
                     <field name="product_id" link="0" />
+                    <field name="partner_id" invisible="1"/>
+                    <field name="order_id" invisible="1"/>
+                    <field name="state" invisible="1"/>
                     <field name="name"/>
                     <field name="price_unit"/>
                     <field name="price_subtotal" sum="Total"/>

=== modified file 'board_training/board_training_view.xml'
--- board_training/board_training_view.xml	2011-03-25 09:27:46 +0000
+++ board_training/board_training_view.xml	2011-04-04 13:03:31 +0000
@@ -304,6 +304,7 @@
                     <field name="seance_id" />
                     <field name="date" />
                     <field name="state" />
+                    <field name="group_id" invisible="1"/>
                 </tree>
             </field>
         </record>

=== modified file 'portal/portal.py'
--- portal/portal.py	2011-03-31 09:17:04 +0000
+++ portal/portal.py	2011-04-04 13:03:31 +0000
@@ -111,12 +111,12 @@
                 vids[0]=(0,0, {
                 'sequence':0,
                 'view_id': view_ids[v[0]],
-                'view_mode': v[0],
+                'view_mode': v and v[0] or False,
                 })
                 vids[1]=(0,0, {
                 'sequence':1,
                 'view_id': view_ids[v[1]],
-                'view_mode': v[1],
+                'view_mode': len(v) > 1 and v[1] or False,
                 })
             else:
                 if view_type & (cur_first_view['view_mode']=='tree'):
@@ -139,7 +139,7 @@
             if view_ids['tree'] != False:
                 if view_type & (cur_first_view['view_mode']=='tree'):
                     temp = vids[0]
-                    vids[0] = vids[1]
+                    vids[0] = len(vids) > 1 and vids[1] or False
                     vids[1] = temp
                 if v[0] =='tree':
                     vids[0]=(0,0, {
@@ -155,8 +155,8 @@
                     })
             else:
                 if view_type & (cur_first_view['view_mode'] =='tree'):
-                    temp = vids[0]
-                    vids[0] = vids[1]
+                    temp = vids and vids[0] or False
+                    vids[0] = len(vids) > 1 and vids[1] or False
                     vids[1] = temp
 
         ## Duplicate the action and give the fetched views to the new one:

=== modified file 'portal/wizard/portal_create_menu.py'
--- portal/wizard/portal_create_menu.py	2011-03-31 08:32:23 +0000
+++ portal/wizard/portal_create_menu.py	2011-04-04 13:03:31 +0000
@@ -115,6 +115,16 @@
     def action_back(self, cr, uid, ids, context=None):
         if context is None:
             context = {}
+        if not ids:
+            return False
+        data = self.browse(cr, uid, ids[0], context)
+        context.update({'default_menu': data.menu,
+                        'default_action_id': data.action_id and data.action_id.id or False,
+                        'default_parent_menu_id': data.parent_menu_id and data.parent_menu_id.id or False,
+                        'default_view_id_tree' : data.view_id_tree and data.view_id_tree.id or False,
+                        'default_view_id_form': data.view_id_form and data.view_id_form.id or False,
+                        'default_view_type': data.view_type
+                        })
         return {
             'view_type': 'form',
             "view_mode": 'form',

=== modified file 'portal_training/lecturer/menus.xml'
--- portal_training/lecturer/menus.xml	2011-03-29 13:23:28 +0000
+++ portal_training/lecturer/menus.xml	2011-04-04 13:03:31 +0000
@@ -135,6 +135,7 @@
             <field name="arch" type="xml">
                 <tree string="Corrections" link="0">
                     <field name="date"/>
+                    <field name="group_id" invisible="1"/>
                     <field name="contact_lastname"/>
                     <field name="contact_firstname"/>
                     <field name="course_questionnaire_id"/>

=== modified file 'portal_training/lecturer/views.xml'
--- portal_training/lecturer/views.xml	2011-03-30 07:41:25 +0000
+++ portal_training/lecturer/views.xml	2011-04-04 13:03:31 +0000
@@ -77,6 +77,7 @@
                     <field name="date"/>
                     <field name="duration"/>
                     <field name="participant_count"/>
+                    <field name="group_id" invisible="1"/>
                     <field name="location_id" link="0" />
                 </tree>
             </field>

=== modified file 'portal_training/portal_training.py'
--- portal_training/portal_training.py	2011-03-31 09:17:04 +0000
+++ portal_training/portal_training.py	2011-04-04 13:03:31 +0000
@@ -22,6 +22,7 @@
 #
 ############################################################################################
 
+import string
 from random import *
 import unicodedata
 import time

=== modified file 'portal_training/supplier/views.xml'
--- portal_training/supplier/views.xml	2011-03-30 07:41:25 +0000
+++ portal_training/supplier/views.xml	2011-04-04 13:03:31 +0000
@@ -119,6 +119,8 @@
                     <field name="product_id" link="0" select="1"/>
                     <field name="name"/>
                     <field name="price_unit"/>
+                    <field name="partner_id" invisible="1"/>
+                    <field name="order_id" invisible="1"/>
                     <field name="price_subtotal" sum="Total"/>
                     <field name="delivery_location_id" link="0"/>
                     <field name="state"/>

=== modified file 'portal_training/views.xml'
--- portal_training/views.xml	2011-03-30 07:41:25 +0000
+++ portal_training/views.xml	2011-04-04 13:03:31 +0000
@@ -51,6 +51,7 @@
                     <field name="contact_firstname" />
                     <field name="contact_lastname" />
                     <field name="present" />
+                    <field name="group_id" invisible="1"/>
                 </tree>
             </field>
         </record>
@@ -63,6 +64,7 @@
             <field name="arch" type="xml">
                 <tree string="Participations">
                     <field name="date" />
+                    <field name="group_id" invisible="1"/>
                     <field name="seance_id" />
                     <field name="duration" />
                     <field name="contact_firstname" />

=== modified file 'training/training.py'
--- training/training.py	2011-04-01 13:04:46 +0000
+++ training/training.py	2011-04-04 13:03:31 +0000
@@ -4678,7 +4678,7 @@
                                              ('done', 'Done'),
                                              ('cancel', 'Cancelled')
                                             ],
-                                string='Order Status', readonly=True, select=True,
+                                string='Order Status', readonly=True, select=True, store=True,
                                 help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.",
                                ),
     }


Follow ups