-
+
@@ -287,4 +287,4 @@
-
\ No newline at end of file
+
diff --git a/addons/stock_account/models/account_invoice.py b/addons/stock_account/models/account_invoice.py
index 892fd8ed2e1..aacdd6c7177 100644
--- a/addons/stock_account/models/account_invoice.py
+++ b/addons/stock_account/models/account_invoice.py
@@ -38,13 +38,21 @@ class AccountInvoice(models.Model):
cacc = accounts['expense'].id
if dacc and cacc:
price_unit = i_line._get_anglo_saxon_price_unit()
+ if inv.currency_id.id != company_currency:
+ currency_id = inv.currency_id.id
+ amount_currency = i_line._get_price(company_currency, price_unit)
+ else:
+ currency_id = False
+ amount_currency = False
return [
{
'type': 'src',
'name': i_line.name[:64],
'price_unit': price_unit,
'quantity': i_line.quantity,
- 'price': i_line._get_price(company_currency, price_unit),
+ 'price': price_unit * i_line.quantity,
+ 'currency_id': currency_id,
+ 'amount_currency': amount_currency,
'account_id':dacc,
'product_id':i_line.product_id.id,
'uom_id':i_line.uom_id.id,
@@ -57,7 +65,9 @@ class AccountInvoice(models.Model):
'name': i_line.name[:64],
'price_unit': price_unit,
'quantity': i_line.quantity,
- 'price': -1 * i_line._get_price(company_currency, price_unit),
+ 'price': -1 * price_unit * i_line.quantity,
+ 'currency_id': currency_id,
+ 'amount_currency': -1 * amount_currency,
'account_id':cacc,
'product_id':i_line.product_id.id,
'uom_id':i_line.uom_id.id,
diff --git a/addons/web_editor/static/src/js/widgets.js b/addons/web_editor/static/src/js/widgets.js
index d3ad1e6fbc8..0b634b45b36 100644
--- a/addons/web_editor/static/src/js/widgets.js
+++ b/addons/web_editor/static/src/js/widgets.js
@@ -295,7 +295,9 @@ var ImageDialog = Widget.extend({
self.display_attachments();
});
this.fetch_existing().then(function () {
- self.set_image(_.find(self.records, function (record) { return record.url === o.url;}) || o);
+ if (o.url) {
+ self.set_image(_.find(self.records, function (record) { return record.url === o.url;}) || o);
+ }
});
return res;
},
diff --git a/addons/website/models/ir_http.py b/addons/website/models/ir_http.py
index ccee9a43721..f5054202f61 100644
--- a/addons/website/models/ir_http.py
+++ b/addons/website/models/ir_http.py
@@ -371,7 +371,8 @@ class PageConverter(werkzeug.routing.PathConverter):
query = query and query.startswith('website.') and query[8:] or query
if query:
domain += [('key', 'like', query)]
- domain += ['|', ('website_id', '=', request.website.id), ('website_id', '=', False)]
+ website_id = request.context.get('website_id') or request.registry['website'].search(cr, uid, [], limit=1)[0]
+ domain += ['|', ('website_id', '=', website_id), ('website_id', '=', False)]
views = View.search_read(domain, fields=['key', 'priority', 'write_date'], order='name')
for view in views:
diff --git a/addons/website/models/website.py b/addons/website/models/website.py
index 8739ba2fa07..457ee04b978 100644
--- a/addons/website/models/website.py
+++ b/addons/website/models/website.py
@@ -526,6 +526,7 @@ class Website(models.Model):
of the same.
:rtype: list({name: str, url: str})
"""
+ request.context = dict(request.context, **context)
router = request.httprequest.app.get_db_router(request.db)
# Force enumeration to be performed as public user
url_set = set()
diff --git a/addons/website_blog/views/website_blog_views.xml b/addons/website_blog/views/website_blog_views.xml
index 63a683dd130..f37017f0e5f 100644
--- a/addons/website_blog/views/website_blog_views.xml
+++ b/addons/website_blog/views/website_blog_views.xml
@@ -26,6 +26,7 @@
+
diff --git a/addons/website_sale/models/sale_order.py b/addons/website_sale/models/sale_order.py
index ed65a8380e7..af2ba2f924e 100644
--- a/addons/website_sale/models/sale_order.py
+++ b/addons/website_sale/models/sale_order.py
@@ -343,7 +343,7 @@ class Website(models.Model):
else:
salesperson_id = request.website.salesperson_id.id
addr = partner.address_get(['delivery', 'invoice'])
- sale_order = self.env['sale.order'].sudo().create({
+ so_data = {
'partner_id': partner.id,
'pricelist_id': pricelist_id,
'payment_term_id': self.sale_get_payment_term(partner),
@@ -351,7 +351,12 @@ class Website(models.Model):
'partner_invoice_id': addr['invoice'],
'partner_shipping_id': addr['delivery'],
'user_id': salesperson_id or self.salesperson_id.id,
- })
+ }
+ company = self.company_id or self.env['product.pricelist'].browse(pricelist_id).sudo().company_id
+ if company:
+ so_data['company_id'] = company.id
+
+ sale_order = self.env['sale.order'].sudo().create(so_data)
# set fiscal position
if request.website.partner_id.id != partner.id:
diff --git a/addons/website_sale/static/src/js/website_sale.js b/addons/website_sale/static/src/js/website_sale.js
index c187b5d287d..1205951b039 100644
--- a/addons/website_sale/static/src/js/website_sale.js
+++ b/addons/website_sale/static/src/js/website_sale.js
@@ -262,9 +262,12 @@ odoo.define('website_sale.website_sale', function (require) {
}
$(oe_website_sale).on('change', 'input.js_product_change', function () {
+ var self = this;
var $parent = $(this).closest('.js_product');
- $parent.find(".oe_default_price:first .oe_currency_value").html( price_to_str(+$(this).data('lst_price')) );
- $parent.find(".oe_price:first .oe_currency_value").html(price_to_str(+$(this).data('price')) );
+ $.when(base.ready()).then(function() {
+ $parent.find(".oe_default_price:first .oe_currency_value").html( price_to_str(+$(self).data('lst_price')) );
+ $parent.find(".oe_price:first .oe_currency_value").html(price_to_str(+$(self).data('price')) );
+ });
update_product_image(this, +$(this).val());
});
@@ -286,8 +289,10 @@ odoo.define('website_sale.website_sale', function (require) {
var product_id = false;
for (var k in variant_ids) {
if (_.isEmpty(_.difference(variant_ids[k][1], values))) {
- $price.html(price_to_str(variant_ids[k][2]));
- $default_price.html(price_to_str(variant_ids[k][3]));
+ $.when(base.ready()).then(function() {
+ $price.html(price_to_str(variant_ids[k][2]));
+ $default_price.html(price_to_str(variant_ids[k][3]));
+ });
if (variant_ids[k][3]-variant_ids[k][2]>0.01) {
$default_price.closest('.oe_website_sale').addClass("discount");
$optional_price.closest('.oe_optional').show().css('text-decoration', 'line-through');
diff --git a/addons/website_sale_options/static/src/js/website_sale.js b/addons/website_sale_options/static/src/js/website_sale.js
index 797879d399c..49fa7f68858 100644
--- a/addons/website_sale_options/static/src/js/website_sale.js
+++ b/addons/website_sale_options/static/src/js/website_sale.js
@@ -41,7 +41,7 @@ $('.oe_website_sale #add_to_cart, .oe_website_sale #products_grid .a-submit')
data: {lang: base.get_context().lang},
success: function (quantity) {
if (!$a.hasClass('js_goto_shop')) {
- window.location.href = window.location.href.replace(/shop([\/?].*)?$/, "shop/cart");
+ window.location.pathname = window.location.pathname.replace(/shop([\/?].*)?$/, "shop/cart");
}
var $q = $(".my_cart_quantity");
$q.parent().parent().removeClass("hidden", !quantity);
diff --git a/doc/cla/corporate/camptocamp.md b/doc/cla/corporate/camptocamp.md
index 04e9fff4084..5d75bb46fa9 100644
--- a/doc/cla/corporate/camptocamp.md
+++ b/doc/cla/corporate/camptocamp.md
@@ -29,3 +29,5 @@ Ferdinand Gassauer ferdinand.gassauer@camptocamp.com https://github.com/ferdiga
Jean-Baptiste Aubort jean-baptiste.aubort@camptocamp.com
Cyril Gaudin cyril.gaudin@camptocamp.com https://github.com/cyrilgdn
Denis Leemann denis.leemann@camptocamp.com https://github.com/leemannd
+Akim Juillerat akim.juillerat@camptocamp.com https://github.com/grindtildeath
+Damien Crier damien.crier@camptocamp.com https://github.com/damdam-s
diff --git a/doc/cla/corporate/microcom.md b/doc/cla/corporate/microcom.md
index 819259990dd..ae922d84e05 100644
--- a/doc/cla/corporate/microcom.md
+++ b/doc/cla/corporate/microcom.md
@@ -16,5 +16,6 @@ List of contributors:
- Stéphane Le Cornec stephane.lecornec@gmail.com https://github.com/coleste
- Eric Lemire elemire@users.noreply.github.com https://github.com/elemire
- Martin Malorni mmalorni@gmail.com https://github.com/mmalorni
-- Gregory Savoie gs.microcom@gmail.com https://github.com/gregsavoie
+- Samuel Chamberland sc.microcom@gmail.com https://github.com/sc-microcom
- Noreddine Ben Jillali nbj.microcom@gmail.com https://github.com/nbj-microcom
+- Rim Ben Dhaou rbd.microcom@gmail.com https://github.com/rbd-microcom
diff --git a/doc/cla/individual/ceaucari.md b/doc/cla/individual/ceaucari.md
new file mode 100644
index 00000000000..949d627b86c
--- /dev/null
+++ b/doc/cla/individual/ceaucari.md
@@ -0,0 +1,11 @@
+United States, 2016-03-28
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+César Castillo ceaucari@gmail.com https://github.com/ceaucari
diff --git a/doc/cla/individual/damendieta.md b/doc/cla/individual/damendieta.md
new file mode 100644
index 00000000000..b95a7052c0b
--- /dev/null
+++ b/doc/cla/individual/damendieta.md
@@ -0,0 +1,11 @@
+Ecuador, 2016-10-02
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Daniel A. Mendieta P. damendieta@gmail.com https://github.com/damendieta
diff --git a/doc/cla/individual/jaronemo.md b/doc/cla/individual/jaronemo.md
new file mode 100644
index 00000000000..3baf3ef5ca5
--- /dev/null
+++ b/doc/cla/individual/jaronemo.md
@@ -0,0 +1,11 @@
+Taiwan, 2016-08-09
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+JasonWu Tingyuan Wu jaronemo@msn.com https://github.com/jaronemo
diff --git a/doc/cla/individual/javierjcf.md b/doc/cla/individual/javierjcf.md
new file mode 100644
index 00000000000..9b1a479941b
--- /dev/null
+++ b/doc/cla/individual/javierjcf.md
@@ -0,0 +1,11 @@
+Spain, 2016-04-15
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Javier Colmenero Fernández javierjcf@gmail.com https://github.com/javierjcf
diff --git a/doc/cla/individual/jclopezar.md b/doc/cla/individual/jclopezar.md
new file mode 100644
index 00000000000..577d7061759
--- /dev/null
+++ b/doc/cla/individual/jclopezar.md
@@ -0,0 +1,11 @@
+Ecuador, 2016-12-13
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Juan Cristobal Lopez Arrieta juancristobal@gmail.com https://github.com/jclopezar
diff --git a/doc/cla/individual/noureddineme.md b/doc/cla/individual/noureddineme.md
new file mode 100644
index 00000000000..3e90fcf4e2c
--- /dev/null
+++ b/doc/cla/individual/noureddineme.md
@@ -0,0 +1,11 @@
+Algeria, 2016-08-11
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Noureddine LOUAHEDJ n.louahedj@gmail.com https://github.com/noureddineme
diff --git a/doc/cla/individual/rigo1985.md b/doc/cla/individual/rigo1985.md
new file mode 100644
index 00000000000..f58ef8491de
--- /dev/null
+++ b/doc/cla/individual/rigo1985.md
@@ -0,0 +1,11 @@
+Cuba, 2016-12-01
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Rigoberto Martínez rigo1985@gmail.com https://github.com/rigo1985
diff --git a/doc/cla/individual/uynil.md b/doc/cla/individual/uynil.md
new file mode 100644
index 00000000000..0e7ac38ef9e
--- /dev/null
+++ b/doc/cla/individual/uynil.md
@@ -0,0 +1,11 @@
+China, 20160118
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+LIN Yu yu_lin@me.com https://github.com/uynil