[MERGE] lp:openobject-addons
authorJigar Amin - OpenERP <jam@tinyerp.com>
Wed, 18 Jul 2012 08:35:51 +0000 (14:05 +0530)
committerJigar Amin - OpenERP <jam@tinyerp.com>
Wed, 18 Jul 2012 08:35:51 +0000 (14:05 +0530)
bzr revid: jam@tinyerp.com-20120718083551-f6288gz1ibhqsgns

29 files changed:
addons/account_accountant/__openerp__.py
addons/account_voucher/__openerp__.py
addons/crm/__openerp__.py
addons/event/__openerp__.py
addons/hr/__openerp__.py
addons/hr_evaluation/__openerp__.py
addons/hr_expense/__openerp__.py
addons/hr_holidays/__openerp__.py
addons/hr_recruitment/__openerp__.py
addons/hr_timesheet_sheet/__openerp__.py
addons/mail/__openerp__.py
addons/mrp/__openerp__.py
addons/point_of_sale/__openerp__.py
addons/project/__openerp__.py
addons/project_gtd/__openerp__.py
addons/project_issue/__openerp__.py
addons/purchase/__openerp__.py
addons/sale/__openerp__.py
addons/stock/__openerp__.py
addons/web/common/http.py
addons/web/static/src/js/view_form.js
addons/web/static/src/js/views.js
addons/web/static/src/xml/base.xml
openerp/addons/base/ir/ir_actions.py
openerp/addons/base/module/wizard/base_language_install_view.xml
openerp/addons/base/module/wizard/base_module_update_view.xml
openerp/addons/base/publisher_warranty/publisher_warranty_view.xml
openerp/addons/base/res/res_users.py
openerp/addons/base/res/res_users_view.xml

index f115531..4bdca34 100644 (file)
@@ -24,6 +24,7 @@
     "author" : "OpenERP SA",
     "category": 'Accounting & Finance',
     "sequence": 10,
+    "summary": "Accounts Moves, Journals, Chart of Accounts",
     "description": """
 Accounting Access Rights.
 =========================
index a789933..c943724 100644 (file)
@@ -23,6 +23,7 @@
     "name" : "eInvoicing & Payments",
     "version" : "1.0",
     "author" : 'OpenERP SA',
+    "summary": 'Supplier & Customer Invoices, Payments',
     "description": """
 Account Voucher module includes all the basic requirements of Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc.
 ====================================================================================================================================
index 0c9b75b..65a1461 100644 (file)
@@ -25,6 +25,7 @@
     'version': '1.0',
     'category': 'Customer Relationship Management',
     "sequence": 2,
+    "summary": "Agenda, Leads, Opportunities",
     'description': """
 The generic OpenERP Customer Relationship Management.
 =====================================================
index 1a7f3ba..919cfb5 100644 (file)
@@ -25,6 +25,7 @@
     'name': 'Events Organisation',
     'version': '0.1',
     'category': 'Tools',
+    'summary': 'Invitation, Subscription',
     'description': """
 Organization and management of Events.
 ======================================
index 71d7d9a..9833e2d 100644 (file)
@@ -26,6 +26,7 @@
     "category": "Human Resources",
     "sequence": 12,
     "website": "http://www.openerp.com",
+    "summary": "Hierarchy, Jobs, Departments",
     "description": """
 Module for human resource management.
 =====================================
index 231f459..fbb1bcb 100644 (file)
@@ -25,6 +25,7 @@
     "author": "OpenERP SA",
     "category": "Human Resources",
     "website": "http://www.openerp.com",
+    "summary": "Top-Down and Bottom-Up Evaluation",
     "images": ["images/hr_evaluation_analysis.jpeg","images/hr_evaluation.jpeg"],
     "depends": ["hr","base_calendar","survey"],
     "description": """
index 2a1d302..c406705 100644 (file)
@@ -25,6 +25,7 @@
     'version': '1.0',
     'category': 'Human Resources',
     "sequence": 30,
+    "summary": "Expenses Validation, Invoicing",
     'description': """
 This module aims to manage employee's expenses.
 ===============================================
index 4509508..d1559de 100644 (file)
@@ -26,6 +26,7 @@
     "author": "OpenERP SA",
     "category": "Human Resources",
     "sequence": 28,
+    "summary": "Allocation and Leaves Requests, Reporting by Department",
     "website": "http://www.openerp.com",
     "description": """
 This module allows you to manage leaves and leaves' requests.
index e5df8cf..3784185 100644 (file)
@@ -24,6 +24,7 @@
     'version': '1.0',
     'category': 'Human Resources',
     "sequence": 24,
+    "summary": "Job Description, Recruitment Process",
     'description': """
 Manages job positions and the recruitment process.
 ==================================================
index defa3ee..04be604 100644 (file)
@@ -25,6 +25,7 @@
     'version': '1.0',
     'category': 'Human Resources',
     "sequence": 16,
+    "summary": "Attendances, Activities, Timing",
     'description': """
 This module helps you to easily encode and validate timesheet and attendances within the same view.
 ===================================================================================================
index e911f24..cb949a6 100644 (file)
@@ -24,6 +24,7 @@
     'version': '1.0',
     'category':'Social Network',
     "sequence": 2,
+    "summary": "Discussions, Feeds, Alerts",
     'description': """
 A bussiness oriented Social Networking with a fully-integrated email 
 and message management.
index bdf6f63..826175b 100644 (file)
@@ -27,6 +27,7 @@
     "website" : "http://www.openerp.com",
     "category" : "Manufacturing",
     "sequence": 18,
+    "summary": "Manufacture, Production, Bill of Material",
     "images" : ["images/bill_of_materials.jpeg", "images/manufacturing_order.jpeg", "images/planning_manufacturing_order.jpeg", "images/production_analysis.jpeg", "images/production_dashboard.jpeg","images/routings.jpeg","images/work_centers.jpeg"],
     "depends" : ["procurement", "stock", "resource", "purchase", "product","process"],
     "description": """
index 5e7e557..31d0319 100644 (file)
@@ -25,6 +25,7 @@
     'version': '1.0.1',
     'category': 'Point Of Sale',
     "sequence": 6,
+    "summary": "Touchscreen to manage your shop",
     'description': """
 This module provides a quick and easy sale process.
 ===================================================
index dad67f5..b646461 100644 (file)
@@ -27,6 +27,7 @@
     "website": "http://www.openerp.com",
     "category": "Project Management",
     "sequence": 8,
+    "summary": "Projects, Tasks",
     "images": ["images/gantt.png", "images/project_dashboard.jpeg","images/project_task_tree.jpeg","images/project_task.jpeg","images/project.jpeg","images/task_analysis.jpeg"],
     "depends": ["base_setup", "base_status", "product", "analytic", "board",  "mail", "resource","web_kanban"],
     "description": """
index d6fa568..c28bc6f 100644 (file)
@@ -25,6 +25,7 @@
     'version': '1.0',
     'category': 'Project Management',
     "sequence": 20,
+    "summary": "Personal Tasks",
     'description': """
 This module implements all concepts defined by the Getting Things Done methodology.
 ===================================================================================
index 9037523..fa7d002 100644 (file)
@@ -25,6 +25,7 @@
     'version': '1.0',
     'category': 'Project Management',
     "sequence": 22,
+    "summary": "Multi Level Support",
     'description': """
 This module provides Issues/Bugs Management in Project.
 =======================================================
index d84408a..1f32f3a 100644 (file)
@@ -25,6 +25,7 @@
     'version': '1.1',
     'category': 'Purchase Management',
     "sequence": 19,
+    "summary": "Requests for Quotation, Invoicing Control",
     'description': """
 Purchase module is for generating a purchase order for purchase of goods from a supplier.
 =========================================================================================
index 968d8d1..f28a051 100644 (file)
@@ -24,6 +24,7 @@
     'version': '1.0',
     'category': 'Sales Management',
     "sequence": 14,
+    "summary": "Quotations, Sales, Invoicing",
     'description': """
 The base module to manage quotations and sales orders.
 ======================================================
index 50bcb23..2eaaa1f 100644 (file)
@@ -23,6 +23,7 @@
     "name" : "Warehouse Management",
     "version" : "1.1",
     "author" : "OpenERP SA",
+    "summary": "Incoming Shipments, Deliveries, Inventory, Stock",
     "description" : """
 OpenERP Inventory Management module can manage multi-warehouses, multi and structured stock locations.
 ======================================================================================================
index cd17f57..cc76a55 100644 (file)
@@ -452,7 +452,7 @@ class Root(object):
 
         static_dirs = self._load_addons(openerp_addons_namespace)
         if options.serve_static:
-            self.dispatch = SuperSharedDataMiddleware(
+            self.dispatch = werkzeug.wsgi.SharedDataMiddleware(
                 self.dispatch, static_dirs, cache=False)
 
         if options.session_storage:
@@ -555,75 +555,6 @@ class Root(object):
                         return m
                 ps, _slash, meth = ps.rpartition('/')
         return None
-    
-class SuperSharedDataMiddleware(werkzeug.wsgi.SharedDataMiddleware):
-    """Redefine SharedDataMiddleware to better handle the cache = False directive.
-    Also desactivate 304 Not Modified headers only when the referer has 'debug' in its
-    arguments.
-    """
-    def __call__(self, environ, start_response):
-        import os
-        import mimetypes
-        import werkzeug.http
-        import urlparse
-        # sanitize the path for non unix systems
-        cleaned_path = environ.get('PATH_INFO', '').strip('/')
-        for sep in os.sep, os.altsep:
-            if sep and sep != '/':
-                cleaned_path = cleaned_path.replace(sep, '/')
-        path = '/'.join([''] + [x for x in cleaned_path.split('/')
-                                if x and x != '..'])
-        file_loader = None
-        for search_path, loader in self.exports.iteritems():
-            if search_path == path:
-                real_filename, file_loader = loader(None)
-                if file_loader is not None:
-                    break
-            if not search_path.endswith('/'):
-                search_path += '/'
-            if path.startswith(search_path):
-                real_filename, file_loader = loader(path[len(search_path):])
-                if file_loader is not None:
-                    break
-        if file_loader is None or not self.is_allowed(real_filename):
-            return self.app(environ, start_response)
-
-        guessed_type = mimetypes.guess_type(real_filename)
-        mime_type = guessed_type[0] or self.fallback_mimetype
-        f, mtime, file_size = file_loader()
-        
-        etag = self.generate_etag(mtime, file_size, real_filename)
-        modified = werkzeug.http.is_resource_modified(environ, etag, last_modified=mtime)
-        
-        headers = [('Date', werkzeug.http.http_date())]
-        if self.cache:
-            timeout = self.cache_timeout
-            headers += [
-                ('Etag', '"%s"' % etag),
-                ('Cache-Control', 'max-age=%d, public' % timeout)
-            ]
-            if modified:
-                headers.append(('Expires', werkzeug.http.http_date(time() + timeout)))
-        else:
-            headers.append(('Cache-Control', 'no-cache'))
-            
-        referer = environ.get('HTTP_REFERER', '')
-        parsed = urlparse.urlparse(referer)
-        debug = not urlparse.parse_qs(parsed.query).has_key('debug')
-        # it's important to put it at the end
-        if not debug and not modified:
-            f.close()
-            start_response('304 Not Modified', headers)
-            return []
-
-        headers.extend((
-            ('Content-Type', mime_type),
-            ('Content-Length', str(file_size)),
-            ('Last-Modified', werkzeug.http.http_date(mtime))
-        ))
-        start_response('200 OK', headers)
-        return werkzeug.wsgi.wrap_file(environ, f)
-
 
 class LibException(Exception):
     """ Base of all client lib exceptions """
index 3f389d3..8fdaffa 100644 (file)
@@ -1212,6 +1212,12 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
                     $child = $td.children(':first');
                 switch ($child[0].tagName.toLowerCase()) {
                     case 'separator':
+                        if ($child.attr('orientation') === 'vertical') {
+                            $td.addClass('oe_vertical_separator').attr('width', '1');
+                            $td.empty();
+                            row_cols-= $td.attr('colspan') || 1;
+                            total--;
+                        }
                         break;
                     case 'label':
                         if ($child.attr('for')) {
index bd102d8..5fc1463 100644 (file)
@@ -657,6 +657,32 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
 
         this.$element.find('.oe_debug_view').change(this.on_debug_changed);
         this.$element.addClass("oe_view_manager_" + (this.action.target || 'current'));
+
+        if (this.action.help && !this.flags.low_profile) {
+            var Users = new instance.web.DataSet(self, 'res.users'),
+                $tips = this.$element.find('.oe_view_manager_menu_tips');
+            $tips.delegate('blockquote button', 'click', function() {
+                var $this = $(this);
+                //noinspection FallthroughInSwitchStatementJS
+                switch ($this.attr('name')) {
+                case 'disable':
+                    Users.write(self.session.uid, {menu_tips:false});
+                case 'hide':
+                    $this.closest('blockquote').hide();
+                    self.session.hidden_menutips[self.action.id] = true;
+                }
+            });
+            if (!(self.action.id in self.session.hidden_menutips)) {
+                Users.read_ids([this.session.uid], ['menu_tips']).then(function(users) {
+                    var user = users[0];
+                    if (!(user && user.id === self.session.uid)) {
+                        return;
+                    }
+                    $tips.find('blockquote').toggle(user.menu_tips);
+                });
+            }
+        }
+
         return manager_ready;
     },
     on_debug_changed: function (evt) {
index 70b0cd8..2d9caa4 100644 (file)
     </div>
 </t>
 <t t-name="FormRenderingSeparator">
-    <div t-attf-class="oe_horizontal_separator oe_clear #{classnames}">
+    <div t-attf-class="oe_horizontal_separator #{classnames}">
         <t t-esc="string"/>
     </div>
 </t>
index 8861a59..1d91ab8 100644 (file)
@@ -210,6 +210,10 @@ class act_window(osv.osv):
             res[act.id] = str(field_get)
         return res
 
+    def _get_help_status(self, cr, uid, ids, name, arg, context=None):
+        activate_tips = self.pool.get('res.users').browse(cr, uid, uid).menu_tips
+        return dict([(id, activate_tips) for id in ids])
+
     _columns = {
         'name': fields.char('Action Name', size=64, translate=True),
         'type': fields.char('Action Type', size=32, required=True),
@@ -247,6 +251,8 @@ class act_window(osv.osv):
         'help': fields.text('Action description',
             help='Optional help text for the users with a description of the target view, such as its usage and purpose.',
             translate=True),
+        'display_menu_tip':fields.function(_get_help_status, type='boolean', string='Display Menu Tips',
+            help='It gives the status if the tip has to be displayed or not when a user executes an action'),
         'multi': fields.boolean('Action on Multiple Doc.', help="If set to true, the action will not be displayed on the right toolbar of a form view"),
     }
 
index d31956c..d632c46 100644 (file)
@@ -8,6 +8,7 @@
             <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="Load a Translation" version="7.0">
+                    <separator string="Load a Translation"/>
                     <field name="state" invisible="1"/>
                     <group states="init">
                         <field name="lang"/>
 You must change the preferences of the user and open a new menu to view the changes."/>
                     </group>
                     <footer states="init">
-                        <button name="lang_install" string="Load" type="object" class="oe_highlight"/> or 
-                        <button special="cancel" string="Cancel" class="oe_link"/>
+                        <button name="lang_install" string="Load" type="object" icon="gtk-ok" class="oe_highlight"/> or 
+                        <button special="cancel" string="Cancel" icon="gtk-cancel" class="oe_link"/>
                     </footer>
                     <footer states="done">
-                        <button special="cancel" string="Close"/>
+                        <button special="cancel" string="Close" icon="gtk-cancel"/>
                     </footer>
                 </form>
            </field>
index 43b8919..235b21f 100644 (file)
                     </group>
                     <footer>
                         <div states="init">
-                            <button name="update_module" string="Update" type="object" class="oe_highlight"/> or 
-                            <button special="cancel" string="Cancel" class="oe_link"/>
+                            <button name="update_module" string="Update" type="object" icon="gtk-ok" class="oe_highlight"/> or 
+                            <button special="cancel" string="Cancel" icon="gtk-cancel" class="oe_link"/>
                         </div>
                         <div states="done">
-                            <button name="action_module_open" string="Open Modules" type="object" class="oe_highlight"/> or 
-                            <button special="cancel" string="Close" class="oe_link"/>
+                            <button name="action_module_open" string="Open Modules" type="object" icon="gtk-go-forward" class="oe_highlight"/> or 
+                            <button special="cancel" string="Close" icon="gtk-ok" class="oe_link"/>
                         </div>
                     </footer>
                 </form>
index 97fa2b5..334dbc9 100644 (file)
             <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="Register a Contract" version="7.0">
-                    <field name="state" invisible="1"/>
-                    <separator string="Register a Contract"/>
-                    <group states="draft">
-                        <label string="Please enter the serial key provided in your contract document:" colspan="2"/>
-                        <field name="name"/>
-                    </group>
-                    <group states="finished">
-                        <label string="Publisher warranty contract successfully registered!" colspan="4"/>
-                    </group>
-                    <footer>
-                        <button name="action_validate" string="Register" type="object" states="draft" class="oe_highlight"/>
+                    <header>
+                        <button name="action_validate" string="Register" type="object" states="draft" class="oe_highlight"  />
                         <label string="or" states="draft"/>
-                        <button string="Cancel" class="oe_link" special="cancel"/>
-                    </footer>
+                        <button string="Cancel" class="oe_link" special="cancel" />
+                    </header>
+                    <group colspan="4" col="8">
+                        <group colspan="1">
+                            <field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
+                            <newline/>
+                            <label colspan="4" width="220" string="This wizard helps you register a publisher warranty contract in your OpenERP system. After the contract has been registered, you will be able to send issues directly to OpenERP."/>
+                            <label colspan="4" width="220"/>
+                            <label colspan="4" width="220" string=""/>
+                            <field name="state" invisible="1"/>
+                        </group>
+                        <separator orientation="vertical" rowspan="12" colspan="1"/>
+                        <group colspan="6">
+                            <separator string="Register a Contract" colspan="4"/>
+                            <group states="draft" colspan="4">
+                                <label string="Please enter the serial key provided in your contract document:" colspan="4"/>
+                                <field name="name" colspan="4"/>
+                            </group>
+                            <group states="finished" colspan="4">
+                                <label string="Publisher warranty contract successfully registered!" colspan="4"/>
+                            </group>
+                        </group>
+                    </group>
                 </form>
             </field>
         </record>
index 97ca6ec..e22b5ad 100644 (file)
@@ -231,6 +231,7 @@ class users(osv.osv):
             help="The user's timezone, used to output proper date and time values inside printed reports. "
                  "It is important to set a value for this field. You should use the same timezone "
                  "that is otherwise used to pick and render date and time values: your computer's timezone."),
+        'menu_tips': fields.boolean('Menu Tips', help="Check out this box if you want to always display tips on each menu action"),
         'date': fields.datetime('Latest Connection', readonly=True),
     }
 
@@ -335,10 +336,11 @@ class users(osv.osv):
         'company_id': _get_company,
         'company_ids': _get_companies,
         'groups_id': _get_group,
+        'menu_tips': False
     }
 
     # User can write to a few of her own fields (but not her groups for example)
-    SELF_WRITEABLE_FIELDS = ['password', 'signature', 'action_id', 'company_id', 'user_email', 'name', 'avatar', 'avatar_big']
+    SELF_WRITEABLE_FIELDS = ['menu_tips','password', 'signature', 'action_id', 'company_id', 'user_email', 'name', 'avatar', 'avatar_big']
 
     def write(self, cr, uid, ids, values, context=None):
         if not hasattr(ids, '__iter__'):
index 31b5fbf..98ee6d5 100644 (file)
                         <div class="oe_title">
                             <label for="name" class="oe_edit_only"/>
                             <h1><field name="name"/></h1>
-                            <label for="login" class="oe_edit_only"/>
-                            <h2><field name="login"/></h2>
                         </div>
                         <group>
                             <group>
+                                <field name="login"/>
                                 <field name="new_password" password="True" attrs="{'required': [('id','=',False)]}"/>
-                                <field name="company_id" context="{'user_preference': 0}"/>
                             </group>
                             <group>
+                                <field name="company_id" context="{'user_preference': 0}"/>
                                 <field name="active"/>
                             </group>
                         </group>
                                     <group name="preferences">
                                         <field name="context_lang"/>
                                         <field name="context_tz"/>
+                                        <field name="menu_tips"/>
                                     </group>
                                     <group groups="base.group_no_one">
                                         <field name="action_id"/>