[MERGE] portal fixes groups, payments, shortcut
portal_stock has been removed from this merge, sale_order state is enough. bzr revid: al@openerp.com-20121208230309-2rajdsjfrb5ddlch
This commit is contained in:
commit
fb0ded57ff
|
@ -50,7 +50,7 @@
|
||||||
% endif
|
% endif
|
||||||
</p>
|
</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)
|
comp_name = quote(object.company_id.name)
|
||||||
inv_number = quote(object.number)
|
inv_number = quote(object.number)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
<!-- Top menu item -->
|
<!-- Top menu item -->
|
||||||
<menuitem name="Tools" id="base.menu_tools" sequence="120"/>
|
<menuitem name="Tools" id="base.menu_tools" sequence="120" groups="base.group_tool_user"/>
|
||||||
<!-- Idea Categories Search View-->
|
<!-- Idea Categories Search View-->
|
||||||
<record model="ir.ui.view" id="view_idea_category_search">
|
<record model="ir.ui.view" id="view_idea_category_search">
|
||||||
<field name="name">idea.category.search</field>
|
<field name="name">idea.category.search</field>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
<!-- Top menu item -->
|
<!-- Top menu item -->
|
||||||
<menuitem id='menu_lunch' name='Lunch' sequence="100"/>
|
<menuitem id='menu_lunch' name='Lunch' sequence="100" groups="group_lunch_user"/>
|
||||||
<menuitem name="Lunch" parent="menu_lunch" id="menu_lunch_title" sequence="50" />
|
<menuitem name="Lunch" parent="menu_lunch" id="menu_lunch_title" sequence="50" />
|
||||||
<menuitem name="Administrate Orders" parent="menu_lunch" id="menu_lunch_admin" sequence="51" groups="group_lunch_manager"/>
|
<menuitem name="Administrate Orders" parent="menu_lunch" id="menu_lunch_admin" sequence="51" groups="group_lunch_manager"/>
|
||||||
<menuitem name="Administrate Cash Moves" parent="menu_lunch" id="menu_lunch_cash" sequence="52" groups="group_lunch_manager"/>
|
<menuitem name="Administrate Cash Moves" parent="menu_lunch" id="menu_lunch_cash" sequence="52" groups="group_lunch_manager"/>
|
||||||
|
|
|
@ -71,6 +71,14 @@ class acquirer(osv.Model):
|
||||||
return
|
return
|
||||||
|
|
||||||
def _wrap_payment_block(self, cr, uid, html_block, amount, currency, context=None):
|
def _wrap_payment_block(self, cr, uid, html_block, amount, currency, context=None):
|
||||||
|
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')
|
payment_header = _('Pay safely online')
|
||||||
amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
|
amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
|
||||||
currency_str = currency.symbol or currency.name
|
currency_str = currency.symbol or currency.name
|
||||||
|
@ -93,6 +101,8 @@ class acquirer(osv.Model):
|
||||||
return
|
return
|
||||||
html_forms = []
|
html_forms = []
|
||||||
for this in self.browse(cr, uid, acquirer_ids):
|
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))
|
html_block = '\n'.join(filter(None,html_forms))
|
||||||
return self._wrap_payment_block(cr, uid, html_block, amount, currency, context=context)
|
return self._wrap_payment_block(cr, uid, html_block, amount, currency, context=context)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form,calendar</field>
|
<field name="view_mode">tree,form,calendar</field>
|
||||||
<field name="view_id" ref="crm_claim.crm_case_claims_tree_view"/>
|
<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="search_view_id" ref="crm_claim.view_crm_case_claims_filter"/>
|
||||||
<field name="target">current</field>
|
<field name="target">current</field>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<field name="inherit_id" ref="event.view_event_form"/>
|
<field name="inherit_id" ref="event.view_event_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//page[last()]" position="after">
|
<xpath expr="//page[last()]" position="after">
|
||||||
<page string="Portal Settings">
|
<page string="Portal Settings" groups="base.group_user">
|
||||||
<group>
|
<group>
|
||||||
<field name="visibility"/>
|
<field name="visibility"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
|
@ -32,10 +32,21 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</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">
|
<record id="action_team" model="ir.actions.act_window">
|
||||||
<field name="name">Meet the team</field>
|
<field name="name">Meet the team</field>
|
||||||
<field name="res_model">hr.employee</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_mode">kanban</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="domain">[('visibility','!=','private')]</field>
|
<field name="domain">[('visibility','!=','private')]</field>
|
||||||
|
|
|
@ -67,7 +67,7 @@ class account_invoice(osv.Model):
|
||||||
result = dict.fromkeys(ids, False)
|
result = dict.fromkeys(ids, False)
|
||||||
payment_acquirer = self.pool.get('portal.payment.acquirer')
|
payment_acquirer = self.pool.get('portal.payment.acquirer')
|
||||||
for this in self.browse(cr, uid, ids, context=context):
|
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,
|
result[this.id] = payment_acquirer.render_payment_block(cr, uid, this, this.number,
|
||||||
this.currency_id, this.residual, context=context)
|
this.currency_id, this.residual, context=context)
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
href="${signup_url}">View Invoice</a>
|
href="${signup_url}">View Invoice</a>
|
||||||
% endif
|
% 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)
|
comp_name = quote(object.company_id.name)
|
||||||
inv_number = quote(object.number)
|
inv_number = quote(object.number)
|
||||||
|
|
|
@ -51,8 +51,13 @@ class mail_mail(osv.osv):
|
||||||
if mail.model == 'sale.order':
|
if mail.model == 'sale.order':
|
||||||
so_obj = self.pool.get('sale.order')
|
so_obj = self.pool.get('sale.order')
|
||||||
partner = so_obj.browse(cr, uid, mail.res_id, context=context)['partner_id']
|
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']:
|
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)
|
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)
|
return super(mail_mail, self)._postprocess_sent_message(cr, uid, mail=mail, context=context)
|
||||||
|
|
||||||
mail_mail()
|
mail_mail()
|
|
@ -170,7 +170,7 @@
|
||||||
<page string="Order Lines">
|
<page string="Order Lines">
|
||||||
<field name="order_line">
|
<field name="order_line">
|
||||||
<form string="Sales Order Lines" version="7.0">
|
<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"/>
|
<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"}'/>
|
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<xpath expr="//button[@name='action_view_invoice']" position="after">
|
<xpath expr="//button[@name='action_view_invoice']" position="after">
|
||||||
<field name="picking_ids" invisible="1"/>
|
<field name="picking_ids" invisible="1"/>
|
||||||
<button name="action_view_delivery" string="View Delivery Order" type="object" class="oe_highlight"
|
<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>
|
||||||
<xpath expr="//button[@name='action_cancel']" position="after">
|
<xpath expr="//button[@name='action_cancel']" position="after">
|
||||||
<button name="ship_cancel" states="shipping_except" string="Cancel"/>
|
<button name="ship_cancel" states="shipping_except" string="Cancel"/>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
<!-- Top menu item -->
|
<!-- Top menu item -->
|
||||||
<menuitem name="Tools" id="base.menu_tools" sequence="120"/>
|
<menuitem name="Tools" id="base.menu_tools" sequence="120" groups="base.group_tool_user"/>
|
||||||
<menuitem id="next_id_45" name="Recurring Events" parent="base.menu_tools" sequence="4"/>
|
<menuitem id="next_id_45" name="Recurring Events" parent="base.menu_tools" sequence="4"/>
|
||||||
|
|
||||||
<!-- Subscription Views -->
|
<!-- Subscription Views -->
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
<!-- Top menu item -->
|
<!-- Top menu item -->
|
||||||
<menuitem name="Tools" id="base.menu_tools" sequence="120"/>
|
<menuitem name="Tools" id="base.menu_tools" sequence="120" groups="base.group_tool_user"/>
|
||||||
|
|
||||||
<menuitem name="Surveys" id="menu_surveys" parent="base.menu_tools" sequence="2" groups="base.group_tool_user,base.group_tool_manager,base.group_survey_user"/>
|
<menuitem name="Surveys" id="menu_surveys" parent="base.menu_tools" sequence="2" groups="base.group_tool_user,base.group_tool_manager,base.group_survey_user"/>
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,8 @@ instance.web.ViewManagerAction.include({
|
||||||
$shortcut_toggle.hide();
|
$shortcut_toggle.hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Anonymous users don't have user_menu
|
||||||
|
if (shortcuts_menu) {
|
||||||
$shortcut_toggle.toggleClass('oe_shortcuts_remove', shortcuts_menu.has(self.session.active_id));
|
$shortcut_toggle.toggleClass('oe_shortcuts_remove', shortcuts_menu.has(self.session.active_id));
|
||||||
$shortcut_toggle.unbind("click").click(function() {
|
$shortcut_toggle.unbind("click").click(function() {
|
||||||
if ($shortcut_toggle.hasClass("oe_shortcuts_remove")) {
|
if ($shortcut_toggle.hasClass("oe_shortcuts_remove")) {
|
||||||
|
@ -141,6 +143,7 @@ instance.web.ViewManagerAction.include({
|
||||||
$shortcut_toggle.toggleClass("oe_shortcuts_remove");
|
$shortcut_toggle.toggleClass("oe_shortcuts_remove");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue