[FIX] Minor fixes all around portal.
bzr revid: vta@openerp.com-20121120155010-rl1aei08bjm7v0wu
This commit is contained in:
parent
c275e9e52a
commit
6c921f84eb
|
@ -20,7 +20,7 @@
|
|||
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='invoice_open'][last()]" position="after">
|
||||
<button name="invoice_pay_customer" type="object" string="Pay" states="open" class="oe_highlight"/>
|
||||
<button name="invoice_pay_customer" type="object" string="Pay" states="open" class="oe_highlight" groups="base.group_user"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -41,14 +41,10 @@ class base_stage(object):
|
|||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
if not context:
|
||||
return False
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
if context.get('portal'):
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
return user.partner_id.id
|
||||
if hasattr(user, 'partner_address_id') and user.partner_address_id:
|
||||
return user.partner_address_id
|
||||
return user.company_id.partner_id.id
|
||||
return False
|
||||
|
||||
def _get_default_email(self, cr, uid, context=None):
|
||||
""" Gives default email address for current user
|
||||
|
@ -56,10 +52,10 @@ class base_stage(object):
|
|||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
if not context or not context.get('portal'):
|
||||
return False
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
return user.email
|
||||
if context.get('portal'):
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
return user.email
|
||||
return False
|
||||
|
||||
def _get_default_user(self, cr, uid, context=None):
|
||||
""" Gives current user id
|
||||
|
|
|
@ -205,7 +205,6 @@ class wizard_user(osv.osv_memory):
|
|||
'name': user.name,
|
||||
'login': user.login,
|
||||
'url': user.signup_url,
|
||||
'password': user.password,
|
||||
}
|
||||
mail_mail = self.pool.get('mail.mail')
|
||||
mail_values = {
|
||||
|
|
|
@ -31,19 +31,18 @@
|
|||
<field name="res_model">account.invoice</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="domain">[('type','=','out_invoice')]</field>
|
||||
<field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
|
||||
<field name="context">{'type':'out_invoice', 'journal_type': 'sale'}</field>
|
||||
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
|
||||
<field name="help">We haven't sent you any invoice.</field>
|
||||
</record>
|
||||
|
||||
<record id="action_vendor_receipt" model="ir.actions.act_window">
|
||||
<field name="name">Customer Payment</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt')]</field>
|
||||
<field name="context">{'type':'receipt'}</field>
|
||||
<field name="search_view_id" ref="account_voucher.view_voucher_filter_customer_pay"/>
|
||||
<field name="target">current</field>
|
||||
<field name="help">We haven't sent you any credit note.</field>
|
||||
<field name="name">Customer Refunds</field>
|
||||
<field name="res_model">account.invoice</field>
|
||||
<field name="domain">[('type','=','out_refund')]</field>
|
||||
<field name="context">{'type':'out_refund'}</field>
|
||||
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
|
||||
<field name="help">We haven't sent you any refund.</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Quotations" id="portal_quotations" parent="portal.portal_orders"
|
||||
|
@ -52,7 +51,7 @@
|
|||
action="action_order_form" sequence="20"/>
|
||||
<menuitem name="Invoices" id="portal_invoices" parent="portal.portal_orders"
|
||||
action="action_invoice_tree1" sequence="30"/>
|
||||
<menuitem name="Credit Notes" id="portal_payments" parent="portal.portal_orders"
|
||||
<menuitem name="Customer Refunds" id="portal_payments" parent="portal.portal_orders"
|
||||
action="action_vendor_receipt" sequence="40"/>
|
||||
|
||||
</data>
|
||||
|
|
|
@ -21,13 +21,6 @@
|
|||
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="portal_personal_payment" model="ir.rule">
|
||||
<field name="name">Portal Personal Payments</field>
|
||||
<field name="model_id" ref="account_voucher.model_account_voucher"/>
|
||||
<field name="domain_force">[('message_follower_ids','in',[user.partner_id.id])]</field>
|
||||
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="portal_personal_contact" model="ir.rule">
|
||||
<field name="name">Portal Personal Contacts</field>
|
||||
<field name="model_id" ref="base.model_res_partner"/>
|
||||
|
|
Loading…
Reference in New Issue