[IMP] Several UX improvements from saas6 version
calendar : When you create an event (for example from a job interview), you should be set as an attendee. crm : Lead/opportunity : Bounce should be read only hr_recruitment : 'Create Employee' should be an action button, instead of a link in the form website_sale : SO report typo invoicing address instead of invoice address website : remove Unpublish on the dropdown website_sale : if accessory product is a non published product : do not show it on the ecommerce (avoid 403 error)
This commit is contained in:
committed by
Richard Mathot
parent
101092b5aa
commit
8483ca57ca
@@ -1106,6 +1106,17 @@ class calendar_event(osv.Model):
|
|||||||
if self.pool['calendar.attendee']._send_mail_to_attendees(cr, uid, att_id, email_from=mail_from, context=context):
|
if self.pool['calendar.attendee']._send_mail_to_attendees(cr, uid, att_id, email_from=mail_from, context=context):
|
||||||
self.message_post(cr, uid, event.id, body=_("An invitation email has been sent to attendee %s") % (partner.name,), subtype="calendar.subtype_invitation", context=context)
|
self.message_post(cr, uid, event.id, body=_("An invitation email has been sent to attendee %s") % (partner.name,), subtype="calendar.subtype_invitation", context=context)
|
||||||
|
|
||||||
|
if current_user.partner_id.id not in new_att_partner_ids:
|
||||||
|
access_token = self.new_invitation_token(cr, uid, event, current_user.partner_id.id)
|
||||||
|
values = {
|
||||||
|
'partner_id': current_user.partner_id.id,
|
||||||
|
'event_id': event.id,
|
||||||
|
'access_token': access_token,
|
||||||
|
'email': current_user.partner_id.email,
|
||||||
|
}
|
||||||
|
current_user_att_id = self.pool['calendar.attendee'].create(cr, uid, values, context=context)
|
||||||
|
new_attendees.append(current_user_att_id)
|
||||||
|
new_att_partner_ids.append(current_user.partner_id.id)
|
||||||
if new_attendees:
|
if new_attendees:
|
||||||
self.write(cr, uid, [event.id], {'attendee_ids': [(4, att) for att in new_attendees]}, context=context)
|
self.write(cr, uid, [event.id], {'attendee_ids': [(4, att) for att in new_attendees]}, context=context)
|
||||||
if new_att_partner_ids:
|
if new_att_partner_ids:
|
||||||
|
|||||||
@@ -188,7 +188,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<group string="Mailings">
|
<group string="Mailings">
|
||||||
<field name="opt_out"/>
|
<field name="opt_out"/>
|
||||||
<field name="message_bounce"/>
|
<field name="message_bounce" readonly="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group string="Categorization" groups="base.group_multi_company,base.group_no_one" name="categorization">
|
<group string="Categorization" groups="base.group_multi_company,base.group_no_one" name="categorization">
|
||||||
<field name="company_id"
|
<field name="company_id"
|
||||||
|
|||||||
@@ -60,6 +60,8 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Jobs - Recruitment Form">
|
<form string="Jobs - Recruitment Form">
|
||||||
<header>
|
<header>
|
||||||
|
<button string="Create Employee" name="create_employee_from_applicant" type="object"
|
||||||
|
class="oe_highlight" attrs="{'invisible': [('emp_id', '!=', False)]}"/>
|
||||||
<field name="stage_id" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}"/>
|
<field name="stage_id" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}"/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
@@ -105,9 +107,6 @@
|
|||||||
<label for="partner_name" class="oe_edit_only"/>
|
<label for="partner_name" class="oe_edit_only"/>
|
||||||
<h2>
|
<h2>
|
||||||
<field name="partner_name" class="oe_inline"/>
|
<field name="partner_name" class="oe_inline"/>
|
||||||
<button string="Create Employee" name="create_employee_from_applicant" type="object"
|
|
||||||
class="oe_link oe_inline" style="margin-left: 8px;"
|
|
||||||
attrs="{'invisible': [('emp_id', '!=', False)]}"/>
|
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
<div class="oe_structure"/>
|
<div class="oe_structure"/>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<strong t-if="doc.partner_shipping_id == doc.partner_invoice_id">Invoice and shipping address:</strong>
|
<strong t-if="doc.partner_shipping_id == doc.partner_invoice_id">Invoicing and shipping address:</strong>
|
||||||
<strong t-if="doc.partner_shipping_id != doc.partner_invoice_id">Invoice address:</strong>
|
<strong t-if="doc.partner_shipping_id != doc.partner_invoice_id">Invoicing address:</strong>
|
||||||
<div t-field="doc.partner_invoice_id"
|
<div t-field="doc.partner_invoice_id"
|
||||||
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
|
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
|
||||||
<p t-if="doc.partner_id.vat">VAT: <span t-field="doc.partner_id.vat"/></p>
|
<p t-if="doc.partner_id.vat">VAT: <span t-field="doc.partner_id.vat"/></p>
|
||||||
|
|||||||
@@ -498,12 +498,6 @@
|
|||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % object.id">
|
<ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % object.id">
|
||||||
<li>
|
|
||||||
<a href="#" class="js_publish_btn">
|
|
||||||
<span class="css_unpublish">Unpublish</span>
|
|
||||||
<span class="css_publish">Publish</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<t t-raw="0"/>
|
<t t-raw="0"/>
|
||||||
<li t-if="publish_edit">
|
<li t-if="publish_edit">
|
||||||
<a t-attf-href="/web#return_label=Website&view_type=form&model=#{object._name}&id=#{object.id}&action=#{action}"
|
<a t-attf-href="/web#return_label=Website&view_type=form&model=#{object._name}&id=#{object.id}&action=#{action}"
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class sale_order(osv.Model):
|
|||||||
|
|
||||||
def _cart_accessories(self, cr, uid, ids, context=None):
|
def _cart_accessories(self, cr, uid, ids, context=None):
|
||||||
for order in self.browse(cr, uid, ids, context=context):
|
for order in self.browse(cr, uid, ids, context=context):
|
||||||
s = set(j.id for l in (order.website_order_line or []) for j in (l.product_id.accessory_product_ids or []))
|
s = set(j.id for l in (order.website_order_line or []) for j in (l.product_id.accessory_product_ids or []) if j.website_published)
|
||||||
s -= set(l.product_id.id for l in order.order_line)
|
s -= set(l.product_id.id for l in order.order_line)
|
||||||
product_ids = random.sample(s, min(len(s), 3))
|
product_ids = random.sample(s, min(len(s), 3))
|
||||||
return self.pool['product.product'].browse(cr, uid, product_ids, context=context)
|
return self.pool['product.product'].browse(cr, uid, product_ids, context=context)
|
||||||
|
|||||||
Reference in New Issue
Block a user