summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-12-14 13:46:11 +0100
committerChristophe Simonis <chs@odoo.com>2016-12-14 13:46:11 +0100
commit995a58cc4ba7c48ce37ee5a8b4bf716bf98d88da (patch)
tree10917e24147c7ba1dd8aa3b72befba4f7637693c
parentf1973fa0a78fd7e2ed0cee1e7e5f16a5a8f57517 (diff)
parenta9a7fe15b34f06d97ea92a1a8e9287ea71bbe16c (diff)
[MERGE] forward port branch 9.0 up to a9a7fe15b34
-rw-r--r--addons/account/models/account_move.py2
-rw-r--r--addons/account_test/report/account_test_report.py1
-rw-r--r--addons/hr_expense/models/hr_expense.py1
-rw-r--r--addons/membership/membership.py2
-rw-r--r--addons/product/product.py2
-rw-r--r--addons/website_links/static/src/js/website_links_charts.js4
-rw-r--r--doc/cla/corporate/x8bit.md15
7 files changed, 25 insertions, 2 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index b01dbd66a03..6471d809b15 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -1119,6 +1119,7 @@ class AccountMoveLine(models.Model):
# Create tax lines
for tax_vals in res['taxes']:
if tax_vals['amount']:
+ tax = self.env['account.tax'].browse([tax_vals['id']])
account_id = (amount > 0 and tax_vals['account_id'] or tax_vals['refund_account_id'])
if not account_id: account_id = vals['account_id']
temp = {
@@ -1130,6 +1131,7 @@ class AccountMoveLine(models.Model):
'statement_id': vals.get('statement_id'),
'debit': tax_vals['amount'] > 0 and tax_vals['amount'] or 0.0,
'credit': tax_vals['amount'] < 0 and -tax_vals['amount'] or 0.0,
+ 'analytic_account_id': vals.get('analytic_account_id') if tax.analytic else False,
}
bank = self.env["account.bank.statement"].browse(vals.get('statement_id'))
if bank.currency_id != bank.company_id.currency_id:
diff --git a/addons/account_test/report/account_test_report.py b/addons/account_test/report/account_test_report.py
index 16a06622c09..039d2cd418f 100644
--- a/addons/account_test/report/account_test_report.py
+++ b/addons/account_test/report/account_test_report.py
@@ -38,6 +38,7 @@ class ReportAssertAccount(models.AbstractModel):
'reconciled_inv': reconciled_inv, # specific function used in different tests
'result': None, # used to store the result of the test
'column_order': None, # used to choose the display order of columns (in case you are returning a list of dict)
+ '_': _, #used for translation
}
eval(code_exec, localdict, mode="exec", nocopy=True)
result = localdict['result']
diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py
index a897e026881..ae3c9ae60be 100644
--- a/addons/hr_expense/models/hr_expense.py
+++ b/addons/hr_expense/models/hr_expense.py
@@ -164,6 +164,7 @@ class HrExpense(models.Model):
'amount_currency': line['price'] > 0 and abs(line.get('amount_currency')) or -abs(line.get('amount_currency')),
'currency_id': line.get('currency_id'),
'tax_line_id': line.get('tax_line_id'),
+ 'tax_ids': line.get('tax_ids'),
'quantity': line.get('quantity',1.00),
'product_id': line.get('product_id'),
'product_uom_id': line.get('uom_id'),
diff --git a/addons/membership/membership.py b/addons/membership/membership.py
index 2698fcfb826..646c36cd1a0 100644
--- a/addons/membership/membership.py
+++ b/addons/membership/membership.py
@@ -407,7 +407,7 @@ class Invoice(osv.osv):
for invoice in self.browse(cr, uid, ids, context=context):
mlines = member_line_obj.search(cr, uid,
[('account_invoice_line', 'in',
- [l.id for l in invoice.invoice_line])])
+ [l.id for l in invoice.invoice_line_ids])])
member_line_obj.write(cr, uid, mlines, {'date_cancel': False}, context=context)
return super(Invoice, self).action_cancel_draft(cr, uid, ids, context=context)
diff --git a/addons/product/product.py b/addons/product/product.py
index 14bf0231c0a..8118b4918ab 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -783,7 +783,7 @@ class product_product(osv.osv):
_description = "Product"
_inherits = {'product.template': 'product_tmpl_id'}
_inherit = ['mail.thread']
- _order = 'default_code,name_template'
+ _order = 'default_code,name_template,id'
def _product_price(self, cr, uid, ids, name, arg, context=None):
plobj = self.pool.get('product.pricelist')
diff --git a/addons/website_links/static/src/js/website_links_charts.js b/addons/website_links/static/src/js/website_links_charts.js
index 8c9848406eb..bd8d2e89064 100644
--- a/addons/website_links/static/src/js/website_links_charts.js
+++ b/addons/website_links/static/src/js/website_links_charts.js
@@ -194,6 +194,10 @@ if(!$('.o_website_links_chart').length) {
charts.last_month_pie = new PieChart('#last_month_countries_charts', last_month_clicks_by_country);
charts.last_week_pie = new PieChart('#last_week_countries_charts', last_week_clicks_by_country);
+ var row_width = $('#all_time_countries_charts').parent().width();
+ var charts_svg = $('#all_time_countries_charts,last_month_countries_charts,last_week_countries_charts').find('svg');
+ charts_svg.css('height', Math.max(clicks_by_country.length * (row_width > 750 ? 1 : 2), 20) + 'em');
+
_.invoke(charts, 'start');
nv.utils.windowResize(function () {
diff --git a/doc/cla/corporate/x8bit.md b/doc/cla/corporate/x8bit.md
new file mode 100644
index 00000000000..acf69f5ffdd
--- /dev/null
+++ b/doc/cla/corporate/x8bit.md
@@ -0,0 +1,15 @@
+México, 2016-07-19
+
+X8BIT agrees to the terms of the Odoo Corporate Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Juan Carlos del Valle juan@x8bit.com https://github.com/imekinox
+
+List of contributors:
+
+Juan Carlos del Valle juan@x8bit.com https://github.com/imekinox \ No newline at end of file