[MERGE] forward port branch 9.0 up to a9a7fe15b3

This commit is contained in:
Christophe Simonis
2016-12-14 13:46:11 +01:00
7 changed files with 25 additions and 2 deletions
+2
View File
@@ -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:
@@ -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']
+1
View File
@@ -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'),
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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')
@@ -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 () {
+15
View File
@@ -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