diff --git a/addons/account_anglo_saxon/invoice.py b/addons/account_anglo_saxon/invoice.py index fdff2f944fc0a8372dae4d300a18799fde7cb4b1..006df557e180fe891b0bd9a03eff2b3d81726f3e 100644 --- a/addons/account_anglo_saxon/invoice.py +++ b/addons/account_anglo_saxon/invoice.py @@ -47,19 +47,11 @@ class account_invoice_line(osv.osv): if inv.type in ('out_invoice','out_refund'): for i_line in inv.invoice_line: if i_line.product_id and i_line.product_id.valuation == 'real_time': - if inv.type == 'out_invoice': - # debit account dacc will be the output account - # first check the product, if empty check the category - dacc = i_line.product_id.property_stock_account_output and i_line.product_id.property_stock_account_output.id - if not dacc: - dacc = i_line.product_id.categ_id.property_stock_account_output_categ and i_line.product_id.categ_id.property_stock_account_output_categ.id - else: - # = out_refund - # debit account dacc will be the input account - # first check the product, if empty check the category - dacc = i_line.product_id.property_stock_account_input and i_line.product_id.property_stock_account_input.id - if not dacc: - dacc = i_line.product_id.categ_id.property_stock_account_input_categ and i_line.product_id.categ_id.property_stock_account_input_categ.id + # debit account dacc will be the output account + # first check the product, if empty check the category + dacc = i_line.product_id.property_stock_account_output and i_line.product_id.property_stock_account_output.id + if not dacc: + dacc = i_line.product_id.categ_id.property_stock_account_output_categ and i_line.product_id.categ_id.property_stock_account_output_categ.id # in both cases the credit account cacc will be the expense account # first check the product, if empty check the category cacc = i_line.product_id.property_account_expense and i_line.product_id.property_account_expense.id @@ -102,19 +94,12 @@ class account_invoice_line(osv.osv): # if not found on the product get the price difference account at the category acc = i_line.product_id.categ_id.property_account_creditor_price_difference_categ and i_line.product_id.categ_id.property_account_creditor_price_difference_categ.id a = None - if inv.type == 'in_invoice': - # oa will be the stock input account - # first check the product, if empty check the category - oa = i_line.product_id.property_stock_account_input and i_line.product_id.property_stock_account_input.id - if not oa: - oa = i_line.product_id.categ_id.property_stock_account_input_categ and i_line.product_id.categ_id.property_stock_account_input_categ.id - else: - # = in_refund - # oa will be the stock output account - # first check the product, if empty check the category - oa = i_line.product_id.property_stock_account_output and i_line.product_id.property_stock_account_output.id - if not oa: - oa = i_line.product_id.categ_id.property_stock_account_output_categ and i_line.product_id.categ_id.property_stock_account_output_categ.id + + # oa will be the stock input account + # first check the product, if empty check the category + oa = i_line.product_id.property_stock_account_input and i_line.product_id.property_stock_account_input.id + if not oa: + oa = i_line.product_id.categ_id.property_stock_account_input_categ and i_line.product_id.categ_id.property_stock_account_input_categ.id if oa: # get the fiscal position fpos = i_line.invoice_id.fiscal_position or False diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 96be836bff130656b4ca7390716f79110834ce5b..cd0eadb3b2067dc270b7e911e9c8f1afae26c230 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -105,7 +105,10 @@ class hr_timesheet_sheet(osv.osv): for att_tuple in attendance_tuples: if att_tuple[0] in [0,1,4]: if att_tuple[0] in [0,1]: - name = att_tuple[2]['name'] + if att_tuple[2] and att_tuple[2].has_key('name'): + name = att_tuple[2]['name'] + else: + name = self.pool['hr.attendance'].browse(cr, uid, att_tuple[1]).name else: name = self.pool['hr.attendance'].browse(cr, uid, att_tuple[1]).name date_attendances.append((1, name, att_tuple)) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index b3fb0dab18f11ffc7f977ad52bc167dbe156309d..9ede09cb011a305d637a582592be7b25008cead8 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -970,8 +970,8 @@ openerp.mail = function (session) { on_expand: function (event) { event.stopPropagation(); - this.$('.oe_msg_body_short:first').toggle(); - this.$('.oe_msg_body_long:first').toggle(); + this.$('.oe_msg_body:first > .oe_msg_body_short:first').toggle(); + this.$('.oe_msg_body:first > .oe_msg_body_long:first').toggle(); return false; }, diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index df897e51f06df0d3b8483e35cc8850f22d8fbf7a..ec77cd37510d2963b43c19aa90040fb0c82a6772 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -287,8 +287,10 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ self.nb_records += records.length; self.dataset.ids.push.apply(self.dataset.ids, dataset.ids); groups_array[index] = new instance.web_kanban.KanbanGroup(self, records, group, dataset); - if (!remaining--) { + if (self.dataset.index >= records.length){ self.dataset.index = self.dataset.size() ? 0 : null; + } + if (!remaining--) { return self.do_add_groups(groups_array); } });