Victor Tabuenca (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-improve_portal_fixes-vta into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve_portal_fixes-vta/+merge/138140

Fixes:
  - Display the online payment ribbon if there is an acquirer account, else it 
will be hidden for portal users (if the option visible to employees is checked, 
they see a message explaining the issue)
  - Display the online payment ribbon only in 'out_invoice'
  - When sending a SO by email, add all the recipients as followers
  - Fixed context of Claims menu action
  - Hide 'Portal Settings' tab for non base.group_user
  - Show the 'public_info' field in the employees kanban view
  - Hide 'Invoice' button on sale.order.line form view to portal users
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve_portal_fixes-vta/+merge/138140
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-improve_portal_fixes-vta.
=== modified file 'account/edi/invoice_action_data.xml'
--- account/edi/invoice_action_data.xml	2012-11-29 22:26:45 +0000
+++ account/edi/invoice_action_data.xml	2012-12-05 13:13:32 +0000
@@ -49,7 +49,7 @@
        % endif
     </p>  
     
-    % if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'):
+    % if object.company_id.paypal_account and object.type in ('out_invoice'):
     <% 
     comp_name = quote(object.company_id.name)
     inv_number = quote(object.number)

=== modified file 'auth_signup/__openerp__.py'
--- auth_signup/__openerp__.py	2012-12-04 10:31:46 +0000
+++ auth_signup/__openerp__.py	2012-12-05 13:13:32 +0000
@@ -30,10 +30,15 @@
     'category': 'Authentication',
     'website': 'http://www.openerp.com',
     'installable': True,
+<<<<<<< TREE
     'depends': [
         'base_setup',
         'email_template',
     ],
+=======
+    'auto_install': True,
+    'depends': ['base_setup'],
+>>>>>>> MERGE-SOURCE
     'data': [
         'auth_signup_data.xml',
         'res_config.xml',

=== modified file 'base_setup/__openerp__.py'
--- base_setup/__openerp__.py	2012-11-29 22:26:45 +0000
+++ base_setup/__openerp__.py	2012-12-05 13:13:32 +0000
@@ -42,7 +42,7 @@
     ],
     'demo': [],
     'installable': True,
-    'auto_install': False,
+    'auto_install': True,
     'images': ['images/base_setup1.jpeg','images/base_setup2.jpeg','images/base_setup3.jpeg','images/base_setup4.jpeg',],
     'css': ['static/src/css/base_setup.css'],
 }

=== modified file 'mail/__openerp__.py'
--- mail/__openerp__.py	2012-11-29 22:26:45 +0000
+++ mail/__openerp__.py	2012-12-05 13:13:32 +0000
@@ -70,7 +70,7 @@
         'data/mail_group_demo_data.xml',
     ],
     'installable': True,
-    'auto_install': False,
+    'auto_install': True,
     'application': True,
     'images': [
         'images/customer_history.jpeg',

=== modified file 'portal/__openerp__.py'
--- portal/__openerp__.py	2012-11-29 22:26:45 +0000
+++ portal/__openerp__.py	2012-12-05 13:13:32 +0000
@@ -22,6 +22,8 @@
 {
     'name' : 'Portal',
     'version': '1.0',
+    'installable': True,
+    'auto_install': True,
     'depends': [
         'base',
         'share',
@@ -53,7 +55,6 @@
     ],
     'demo': ['portal_demo.xml'],
     'css': ['static/src/css/portal.css'],
-    'installable': True,
 }
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'portal/acquirer.py'
--- portal/acquirer.py	2012-11-21 10:12:10 +0000
+++ portal/acquirer.py	2012-12-05 13:13:32 +0000
@@ -71,10 +71,18 @@
             return
 
     def _wrap_payment_block(self, cr, uid, html_block, amount, currency, context=None):
-        payment_header = _('Pay safely online')
-        amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
-        currency_str = currency.symbol or currency.name
-        amount = u"%s %s" % ((currency_str, amount_str) if currency.position == 'before' else (amount_str, currency_str))  
+        if not html_block:
+            link = '#action=account.action_account_config'
+            payment_header = _('You can finish the configuration in the <a href="%s">Bank&Cash settings</a>') % link
+            amount = _('No online payment acquirers configured')
+            group_ids = self.pool.get('res.users').browse(cr, uid, uid, context=context).groups_id
+            if any(group.is_portal for group in group_ids):
+                return ''
+        else:
+            payment_header = _('Pay safely online')
+            amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
+            currency_str = currency.symbol or currency.name
+            amount = u"%s %s" % ((currency_str, amount_str) if currency.position == 'before' else (amount_str, currency_str))
         result =  """<div class="payment_acquirers">
                          <div class="payment_header">
                              <div class="payment_amount">%s</div>
@@ -93,6 +101,8 @@
             return
         html_forms = []
         for this in self.browse(cr, uid, acquirer_ids):
-            html_forms.append(this.render(object, reference, currency, amount, context=context, **kwargs))
+            content = this.render(object, reference, currency, amount, context=context, **kwargs)
+            if content:
+                html_forms.append(content)
         html_block = '\n'.join(filter(None,html_forms))
         return self._wrap_payment_block(cr, uid, html_block, amount, currency, context=context)  

=== modified file 'portal_claim/portal_claim_view.xml'
--- portal_claim/portal_claim_view.xml	2012-11-29 22:26:45 +0000
+++ portal_claim/portal_claim_view.xml	2012-12-05 13:13:32 +0000
@@ -8,7 +8,7 @@
             <field name="view_type">form</field>
             <field name="view_mode">tree,form,calendar</field>
             <field name="view_id" ref="crm_claim.crm_case_claims_tree_view"/>
-            <field name="context">{"search_default_user_id":'', "stage_type":'claim', "portal":'True'}</field>
+            <field name="context">{"stage_type":'claim', "portal":'True'}</field>
             <field name="search_view_id" ref="crm_claim.view_crm_case_claims_filter"/>
             <field name="target">current</field>
             <field name="help"  type="html">

=== modified file 'portal_event/event_view.xml'
--- portal_event/event_view.xml	2012-11-29 22:26:45 +0000
+++ portal_event/event_view.xml	2012-12-05 13:13:32 +0000
@@ -9,7 +9,7 @@
             <field name="inherit_id" ref="event.view_event_form"/>
             <field name="arch" type="xml">
                 <xpath expr="//page[last()]" position="after">
-                    <page string="Portal Settings">
+                    <page string="Portal Settings" groups="base.group_user">
                         <group>
                             <field name="visibility"/>
                         </group>

=== modified file 'portal_hr_employees/hr_employee_view.xml'
--- portal_hr_employees/hr_employee_view.xml	2012-11-29 22:26:45 +0000
+++ portal_hr_employees/hr_employee_view.xml	2012-12-05 13:13:32 +0000
@@ -15,6 +15,8 @@
             </field>
         </record>
 
+
+
         <record id="portal_view_employee_filter" model="ir.ui.view">
             <field name="name">Employees</field>
             <field name="model">hr.employee</field>
@@ -32,10 +34,21 @@
             </field>
         </record>
 
+        <record model="ir.ui.view" id="portal_hr_kanban_view_employees">
+            <field name="name">HR - Employess Kanban</field>
+            <field name="model">hr.employee</field>
+            <field name="inherit_id" ref="hr.hr_kanban_view_employees"/>
+            <field name="arch" type="xml">
+                <xpath expr="//div[@class='oe_employee_details']" position="inside">
+                    <t t-if="record.public_info.raw_value"><field name="public_info"/></t>
+                </xpath>
+            </field>
+        </record>
+
         <record id="action_team" model="ir.actions.act_window">
             <field name="name">Meet the team</field>
             <field name="res_model">hr.employee</field>
-            <field name="view_id" ref="hr.hr_kanban_view_employees"/>
+            <field name="view_id" ref="portal_hr_kanban_view_employees"/>
             <field name="view_mode">kanban</field>
             <field name="view_type">form</field>
             <field name="domain">[('visibility','!=','private')]</field>

=== modified file 'portal_sale/portal_sale.py'
--- portal_sale/portal_sale.py	2012-11-16 17:06:43 +0000
+++ portal_sale/portal_sale.py	2012-12-05 13:13:32 +0000
@@ -67,7 +67,7 @@
         result = dict.fromkeys(ids, False)
         payment_acquirer = self.pool.get('portal.payment.acquirer')
         for this in self.browse(cr, uid, ids, context=context):
-            if this.state not in ('draft','done') and not this.reconciled:
+            if this.type == 'out_invoice' and this.state not in ('draft','done') and not this.reconciled:
                 result[this.id] = payment_acquirer.render_payment_block(cr, uid, this, this.number,
                     this.currency_id, this.residual, context=context)
         return result

=== modified file 'portal_sale/portal_sale_data.xml'
--- portal_sale/portal_sale_data.xml	2012-11-21 10:11:33 +0000
+++ portal_sale/portal_sale_data.xml	2012-12-05 13:13:32 +0000
@@ -150,7 +150,7 @@
            href="${signup_url}">View Invoice</a>
     % endif
     
-    % if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'):
+    % if object.company_id.paypal_account and object.type in ('out_invoice'):
     <% 
     comp_name = quote(object.company_id.name)
     inv_number = quote(object.number)

=== modified file 'portal_sale/sale.py'
--- portal_sale/sale.py	2012-11-20 13:23:00 +0000
+++ portal_sale/sale.py	2012-12-05 13:13:32 +0000
@@ -51,8 +51,13 @@
         if mail.model == 'sale.order':
             so_obj = self.pool.get('sale.order')
             partner = so_obj.browse(cr, uid, mail.res_id, context=context)['partner_id']
+            # Add the customer in the SO as follower
             if partner.id not in so_obj.browse(cr, uid, mail.res_id, context=context)['message_follower_ids']:
                 so_obj.message_subscribe(cr, uid, [mail.res_id], [partner.id], context=context)
+            # Add all recipients of the email as followers
+            for p in mail.partner_ids:
+                if p.id not in so_obj.browse(cr, uid, mail.res_id, context=context)['message_follower_ids']:
+                    so_obj.message_subscribe(cr, uid, [mail.res_id], [p.id], context=context)
         return super(mail_mail, self)._postprocess_sent_message(cr, uid, mail=mail, context=context)
 
 mail_mail()
\ No newline at end of file

=== added directory 'portal_stock'
=== added file 'portal_stock/__init__.py'
--- portal_stock/__init__.py	1970-01-01 00:00:00 +0000
+++ portal_stock/__init__.py	2012-12-05 13:13:32 +0000
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+

=== added file 'portal_stock/__openerp__.py'
--- portal_stock/__openerp__.py	1970-01-01 00:00:00 +0000
+++ portal_stock/__openerp__.py	2012-12-05 13:13:32 +0000
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+
+{
+    'name': 'Portal Stock',
+    'version': '0.1',
+    'category': 'Tools',
+    'complexity': 'easy',
+    'description': """
+This module adds claim menu and features to your portal if claim and portal are installed.
+==========================================================================================
+    """,
+    'author': 'OpenERP SA',
+    'depends': ['sale_stock','portal'],
+    'data': [
+        'security/ir.model.access.csv',
+    ],
+    'installable': True,
+    'auto_install': True,
+    'category': 'Hidden',
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'portal_stock/security'
=== added file 'portal_stock/security/ir.model.access.csv'
--- portal_stock/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ portal_stock/security/ir.model.access.csv	2012-12-05 13:13:32 +0000
@@ -0,0 +1,5 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_stock_picking,stock.picking,stock.model_stock_picking,portal.group_portal,1,0,0,0
+access_stock_picking.out,stock.picking.out,stock.model_stock_picking_out,portal.group_portal,1,0,0,0
+access_stock_move,stock.move,stock.model_stock_move,portal.group_portal,1,0,0,0
+access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,procurement.model_stock_warehouse_orderpoint,portal.group_portal,1,0,0,0

=== modified file 'sale/sale_view.xml'
--- sale/sale_view.xml	2012-11-29 22:26:45 +0000
+++ sale/sale_view.xml	2012-12-05 13:13:32 +0000
@@ -207,7 +207,7 @@
                         <page string="Order Lines">
                             <field name="order_line">
                                 <form string="Sales Order Lines" version="7.0">
-                                    <header>
+                                    <header groups="base.group_user">
                                         <button name="%(action_view_sale_order_line_make_invoice)d" states="confirmed" string="Invoice" type="action" icon="terp-document-new"/>
                                         <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
                                     </header>

=== modified file 'sale_stock/sale_stock_view.xml'
--- sale_stock/sale_stock_view.xml	2012-11-06 15:04:31 +0000
+++ sale_stock/sale_stock_view.xml	2012-12-05 13:13:32 +0000
@@ -40,7 +40,7 @@
                    <xpath expr="//button[@name='action_view_invoice']" position="after">
                        <field name="picking_ids" invisible="1"/>
                        <button name="action_view_delivery" string="View Delivery Order" type="object" class="oe_highlight"
-                           attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}"/>
+                           attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}" groups="base.group_user"/>
                    </xpath>
                     <xpath expr="//button[@name='action_cancel']" position="after">
                         <button name="ship_cancel" states="shipping_except" string="Cancel"/>

=== modified file 'share/__openerp__.py'
--- share/__openerp__.py	2012-11-29 22:26:45 +0000
+++ share/__openerp__.py	2012-12-05 13:13:32 +0000
@@ -49,6 +49,7 @@
         'wizard/share_wizard_view.xml'
     ],
     'installable': True,
+    'auto_install': True,
     'web': True,
     'js': ['static/src/js/share.js'],
     'css': ['static/src/css/share.css'],

_______________________________________________
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

Reply via email to