diff --git a/addons/account_analytic_default/security/ir.model.access.csv b/addons/account_analytic_default/security/ir.model.access.csv
index cdfebbbb156..dc2ecfdb076 100644
--- a/addons/account_analytic_default/security/ir.model.access.csv
+++ b/addons/account_analytic_default/security/ir.model.access.csv
@@ -1,4 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_analytic_default,account.analytic.default,model_account_analytic_default,account.group_account_user,1,0,0,0
+access_account_analytic_default_analytic,account.analytic.default analytic,model_account_analytic_default,analytic.group_analytic_accounting,1,0,0,0
access_account_analytic_default_invoice,account.analytic.default invoice,model_account_analytic_default,account.group_account_invoice,1,1,1,1
access_account_analytic_default_salesman,account.analytic.default.salesman,model_account_analytic_default,base.group_sale_salesman,1,1,1,1
diff --git a/addons/base_import_module/models/ir_module.py b/addons/base_import_module/models/ir_module.py
index fe5083f096b..cee635ca25c 100644
--- a/addons/base_import_module/models/ir_module.py
+++ b/addons/base_import_module/models/ir_module.py
@@ -105,6 +105,7 @@ class ir_module_module(osv.osv):
self.import_module(cr, uid, mod_name, path, force=force, context=context)
success.append(mod_name)
except Exception, e:
+ _logger.exception('Error while importing module')
errors[mod_name] = exception_to_unicode(e)
r = ["Successfully imported module '%s'" % mod for mod in success]
for mod, error in errors.items():
diff --git a/addons/event/models/event.py b/addons/event/models/event.py
index 801b67660b1..efcd791e9e3 100644
--- a/addons/event/models/event.py
+++ b/addons/event/models/event.py
@@ -3,8 +3,7 @@
import pytz
from openerp import _, api, fields, models
-from openerp.exceptions import UserError
-
+from openerp.exceptions import AccessError, UserError
class event_type(models.Model):
""" Event Type """
@@ -371,11 +370,14 @@ class event_registration(models.Model):
@api.multi
def message_get_suggested_recipients(self):
recipients = super(event_registration, self).message_get_suggested_recipients()
- for attendee in self:
- if attendee.email:
- attendee._message_add_suggested_recipient(recipients, email=attendee.email, reason=_('Customer Email'))
- if attendee.partner_id:
- attendee._message_add_suggested_recipient(recipients, partner=attendee.partner_id, reason=_('Customer'))
+ try:
+ for attendee in self:
+ if attendee.partner_id:
+ attendee._message_add_suggested_recipient(recipients, partner=attendee.partner_id, reason=_('Customer'))
+ elif attendee.email:
+ attendee._message_add_suggested_recipient(recipients, email=attendee.email, reason=_('Customer Email'))
+ except AccessError: # no read access rights -> ignore suggested recipients
+ pass
return recipients
@api.multi
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 95ddb8058c4..9568c962816 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -166,11 +166,7 @@
You can access this document and pay online via our Customer Portal:
@@ -50,7 +50,7 @@ href="${signup_url}">View ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} % endif - % if object.paypal_url and object.amount_total > 0 : + % if object.paypal_url and object.amount_total:It is also possible to directly pay with Paypal:
@@ -117,7 +117,7 @@ % endif - <% set signup_url = object.get_signup_url() %> + % set signup_url = object.get_signup_url() % if signup_url:
You can access the invoice document and pay online via our Customer Portal:
diff --git a/addons/pos_restaurant/static/src/css/restaurant.css b/addons/pos_restaurant/static/src/css/restaurant.css
index 2a7412b44dc..860ab141669 100644
--- a/addons/pos_restaurant/static/src/css/restaurant.css
+++ b/addons/pos_restaurant/static/src/css/restaurant.css
@@ -76,6 +76,7 @@
cursor: pointer;
box-shadow: 0px 3px rgba(0,0,0,0.07);
transition: background, background-color 300ms ease-in-out;
+ overflow: hidden;
}
.floor-map .table .table-cover {
display: block;
@@ -240,7 +241,7 @@
left: 50%;
background: black;
width: 20px;
- margin-top: -10px;
+ margin-top: 1px;
margin-left: -10px;
height: 20px;
line-height: 20px;
diff --git a/addons/pos_restaurant/static/src/xml/floors.xml b/addons/pos_restaurant/static/src/xml/floors.xml
index e96173d42dd..10ee218a33e 100644
--- a/addons/pos_restaurant/static/src/xml/floors.xml
+++ b/addons/pos_restaurant/static/src/xml/floors.xml
@@ -30,7 +30,7 @@
diff --git a/addons/website_mass_mailing/controllers/main.py b/addons/website_mass_mailing/controllers/main.py
index c328c963d24..5a67a326f6d 100644
--- a/addons/website_mass_mailing/controllers/main.py
+++ b/addons/website_mass_mailing/controllers/main.py
@@ -6,7 +6,7 @@ from openerp.http import request
class MassMailController(http.Controller):
- @http.route(['/mail/mailing/ Hello ${object.partner_id.name}, Here is your ${object.state in ('draft', 'sent') and 'quotation' or 'order confirmation'} from ${object.company_id.name}:
- REFERENCES
- You can view your quotation online:
- It is also possible to directly pay with Paypal: If you have any question, do not hesitate to contact us. Thank you for choosing ${object.company_id.name or 'us'}!
- Order number: ${object.name}
- Order total: ${object.amount_total} ${object.pricelist_id.currency_id.name}
- Order date: ${object.date_order}
- % if object.origin:
- Order reference: ${object.origin}
- % endif
- % if object.client_order_ref:
- Your reference: ${object.client_order_ref}
- % endif
- % if object.user_id:
- Your contact: ${object.user_id.name}
- % endif
-
-
-
- % endif
-
-
-
-
-
- ${object.company_id.name}
-
- You can access this document and pay online via our Customer Portal: + You can view your quotation online:
- View ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} - % endif + View ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} - % if object.paypal_url and object.amount_total > 0 : + % if object.paypal_url and object.amount_total:It is also possible to directly pay with Paypal:
diff --git a/addons/website_quote/models/order.py b/addons/website_quote/models/order.py index a683d132328..c21b930dceb 100644 --- a/addons/website_quote/models/order.py +++ b/addons/website_quote/models/order.py @@ -145,7 +145,7 @@ class sale_order(osv.osv): _columns = { 'access_token': fields.char('Security Token', required=True, copy=False), 'template_id': fields.many2one('sale.quote.template', 'Quotation Template', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}), - 'website_description': fields.html('Description'), + 'website_description': fields.html('Description', translate=True), 'options' : fields.one2many('sale.order.option', 'order_id', 'Optional Products Lines', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, copy=True), 'amount_undiscounted': fields.function(_get_total, string='Amount Before Discount', type="float", digits=0), 'quote_viewed': fields.boolean('Quotation Viewed'), @@ -396,14 +396,17 @@ class sale_order_option(osv.osv): domain = {'uom_id': [('category_id', '=', product_obj.uom_id.category_id.id)]} return {'value': vals, 'domain': domain} + # TODO master: to remove, replaced by onchange of the new api def product_uom_change(self, cr, uid, ids, product, uom_id, context=None): context = context or {} if not uom_id: return {'value': {'price_unit': 0.0, 'uom_id': False}} return self.on_change_product_id(cr, uid, ids, product, uom_id=uom_id, context=context) - @api.onchange('product_id') + @api.onchange('product_id', 'uom_id') def _onchange_product_id(self): + if not self.product_id: + return product = self.product_id.with_context(lang=self.order_id.partner_id.lang) self.price_unit = product.list_price self.website_description = product.quote_description or product.website_description @@ -415,6 +418,10 @@ class sale_order_option(osv.osv): partner_id = self.order_id.partner_id.id pricelist = self.order_id.pricelist_id.id self.price_unit = self.order_id.pricelist_id.price_get(product.id, self.quantity, partner_id)[pricelist] + if self.uom_id and self.uom_id != self.product_id.uom_id: + self.price_unit = self.product_id.uom_id._compute_price(self.price_unit, self.uom_id.id) + domain = {'uom_id': [('category_id', '=', self.product_id.uom_id.category_id.id)]} + return {'domain': domain} class product_template(osv.Model): diff --git a/addons/website_quote/models/payment.py b/addons/website_quote/models/payment.py index 5bdd75cc3dd..563a8597a20 100644 --- a/addons/website_quote/models/payment.py +++ b/addons/website_quote/models/payment.py @@ -23,6 +23,8 @@ class PaymentTransaction(orm.Model): if hasattr(self, tx_find_method_name): tx = getattr(self, tx_find_method_name)(cr, uid, data, context=context) if tx and tx.state == 'done' and tx.acquirer_id.auto_confirm == 'at_pay_confirm' and tx.sale_order_id and tx.sale_order_id.state in ['draft', 'sent']: - self.pool['sale.order'].action_confirm(cr, SUPERUSER_ID, [tx.sale_order_id.id], context=context) + self.pool['sale.order'].action_confirm(cr, SUPERUSER_ID, [tx.sale_order_id.id], context=dict(context, send_email=True)) + elif tx and tx.state not in ['cancel'] and tx.sale_order_id and tx.sale_order_id.state in ['draft']: + self.pool['sale.order'].force_quotation_send(cr, SUPERUSER_ID, [tx.sale_order_id.id], context=context) return res diff --git a/addons/website_quote/views/website_quotation_backend.xml b/addons/website_quote/views/website_quotation_backend.xml index 18d6bb1bc92..8a039dca816 100644 --- a/addons/website_quote/views/website_quotation_backend.xml +++ b/addons/website_quote/views/website_quotation_backend.xml @@ -28,7 +28,7 @@