[MERGE] forward port of branch 7.0 up to a86dfb8
This commit is contained in:
commit
02bf0fd9c8
|
@ -174,6 +174,8 @@ class account_invoice(osv.osv):
|
|||
lines = []
|
||||
if invoice.move_id:
|
||||
for m in invoice.move_id.line_id:
|
||||
if m.account_id != invoice.account_id:
|
||||
continue
|
||||
temp_lines = []
|
||||
if m.reconcile_id:
|
||||
temp_lines = map(lambda x: x.id, m.reconcile_id.line_id)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<separator/>
|
||||
<filter icon="terp-dolar" string="Invoice" domain="['|', ('type','=','out_invoice'),('type','=','in_invoice')]" help="Customer And Supplier Invoices"/>
|
||||
<filter icon="terp-dolar_ok!" string="Refund" domain="['|', ('type','=','out_refund'),('type','=','in_refund')]" help="Customer And Supplier Refunds"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
<field name="user_id" />
|
||||
<field name="categ_id" filter_domain="[('categ_id', 'child_of', self)]"/>
|
||||
<group expand="1" string="Group By...">
|
||||
|
|
|
@ -132,7 +132,7 @@ class account_fiscalyear_close(osv.osv_memory):
|
|||
FROM account_account a
|
||||
LEFT JOIN account_account_type t ON (a.user_type = t.id)
|
||||
WHERE a.active
|
||||
AND a.type != 'view'
|
||||
AND a.type not in ('view', 'consolidation')
|
||||
AND a.company_id = %s
|
||||
AND t.close_method = %s''', (company_id, 'unreconciled', ))
|
||||
account_ids = map(lambda x: x[0], cr.fetchall())
|
||||
|
@ -182,7 +182,7 @@ class account_fiscalyear_close(osv.osv_memory):
|
|||
FROM account_account a
|
||||
LEFT JOIN account_account_type t ON (a.user_type = t.id)
|
||||
WHERE a.active
|
||||
AND a.type != 'view'
|
||||
AND a.type not in ('view', 'consolidation')
|
||||
AND a.company_id = %s
|
||||
AND t.close_method = %s''', (company_id, 'detail', ))
|
||||
account_ids = map(lambda x: x[0], cr.fetchall())
|
||||
|
@ -211,7 +211,7 @@ class account_fiscalyear_close(osv.osv_memory):
|
|||
FROM account_account a
|
||||
LEFT JOIN account_account_type t ON (a.user_type = t.id)
|
||||
WHERE a.active
|
||||
AND a.type != 'view'
|
||||
AND a.type not in ('view', 'consolidation')
|
||||
AND a.company_id = %s
|
||||
AND t.close_method = %s''', (company_id, 'balance', ))
|
||||
account_ids = map(lambda x: x[0], cr.fetchall())
|
||||
|
|
|
@ -1041,7 +1041,8 @@ class account_voucher(osv.osv):
|
|||
'period_id': voucher.period_id.id,
|
||||
'partner_id': voucher.partner_id.id,
|
||||
'currency_id': company_currency <> current_currency and current_currency or False,
|
||||
'amount_currency': company_currency <> current_currency and sign * voucher.amount or 0.0,
|
||||
'amount_currency': (sign * abs(voucher.amount) # amount < 0 for refunds
|
||||
if company_currency != current_currency else 0.0),
|
||||
'date': voucher.date,
|
||||
'date_maturity': voucher.date_due
|
||||
}
|
||||
|
@ -1203,7 +1204,7 @@ class account_voucher(osv.osv):
|
|||
if line.amount == line.amount_unreconciled:
|
||||
if not line.move_line_id:
|
||||
raise osv.except_osv(_('Wrong voucher line'),_("The invoice you are willing to pay is not valid anymore."))
|
||||
sign = voucher.type in ('payment', 'purchase') and -1 or 1
|
||||
sign = line.type =='dr' and -1 or 1
|
||||
currency_rate_difference = sign * (line.move_line_id.amount_residual - amount)
|
||||
else:
|
||||
currency_rate_difference = 0.0
|
||||
|
@ -1261,8 +1262,7 @@ class account_voucher(osv.osv):
|
|||
# otherwise we use the rates of the system
|
||||
amount_currency = currency_obj.compute(cr, uid, company_currency, line.move_line_id.currency_id.id, move_line['debit']-move_line['credit'], context=ctx)
|
||||
if line.amount == line.amount_unreconciled:
|
||||
sign = voucher.type in ('payment', 'purchase') and -1 or 1
|
||||
foreign_currency_diff = sign * line.move_line_id.amount_residual_currency + amount_currency
|
||||
foreign_currency_diff = line.move_line_id.amount_residual_currency - abs(amount_currency)
|
||||
|
||||
move_line['amount_currency'] = amount_currency
|
||||
voucher_line = move_line_obj.create(cr, uid, move_line)
|
||||
|
|
|
@ -82,7 +82,7 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
|||
if line.journal_id.type in ('sale', 'sale_refund'):
|
||||
type = 'customer'
|
||||
ttype = 'receipt'
|
||||
elif line.journal_id.type in ('purchase', 'purhcase_refund'):
|
||||
elif line.journal_id.type in ('purchase', 'purchase_refund'):
|
||||
type = 'supplier'
|
||||
ttype = 'payment'
|
||||
sign = -1
|
||||
|
|
|
@ -640,7 +640,7 @@
|
|||
<field name="style_overwrite" eval="2"/>
|
||||
</record>
|
||||
<record id="account_financial_report_bnficepertedelexcerciceavantimpts1" model="account.financial.report">
|
||||
<field name="name">Bénéfice (Perte) de l'excercice avant impôts</field>
|
||||
<field name="name">Bénéfice (Perte) de l'exercice avant impôts</field>
|
||||
<field eval="8" name="sequence"/>
|
||||
<field name="parent_id" ref="account_financial_report_belgiumpl0"/>
|
||||
<field name="display_detail">no_detail</field>
|
||||
|
@ -674,7 +674,7 @@
|
|||
<field name="style_overwrite" eval="2"/>
|
||||
</record>
|
||||
<record id="account_financial_report_bnficepertedelexcercice1" model="account.financial.report">
|
||||
<field name="name">Bénéfice (Perte) de l'excercice</field>
|
||||
<field name="name">Bénéfice (Perte) de l'exercice</field>
|
||||
<field eval="12" name="sequence"/>
|
||||
<field name="parent_id" ref="account_financial_report_belgiumpl0"/>
|
||||
<field name="display_detail">no_detail</field>
|
||||
|
|
|
@ -50,10 +50,11 @@
|
|||
<t t-if="!widget.options.view_mailbox">
|
||||
<div class="field_text oe_compact oe_compact_record">
|
||||
<a class="oe_compose_post" t-if="widget.options.compose_placeholder"><t t-raw="widget.options.compose_placeholder"/></a>
|
||||
<a class="oe_compose_post" t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox">Send a message</a>
|
||||
<a class="oe_compose_post" t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox"
|
||||
title="Send a message to all followers of the document">Send a message</a>
|
||||
<t t-if="widget.options.display_log_button">
|
||||
<span class="oe_grey oe_sep_word">or</span>
|
||||
<a class="oe_compose_log">Log an internal note</a>
|
||||
<a class="oe_compose_log" title="Log a note for this document. No notification will be sent">Log an internal note</a>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
|
|
|
@ -301,6 +301,9 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
self.do_clear_groups();
|
||||
self.dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit }).done(function(records) {
|
||||
var kgroup = new instance.web_kanban.KanbanGroup(self, records, null, self.dataset);
|
||||
if (!_.isEmpty(self.dataset.ids) && (self.dataset.index === null || self.dataset.index >= self.dataset.ids.length)) {
|
||||
self.dataset.index = 0;
|
||||
}
|
||||
self.do_add_groups([kgroup]).done(function() {
|
||||
if (_.isEmpty(records)) {
|
||||
self.no_result();
|
||||
|
|
|
@ -267,7 +267,9 @@ class rml_parse(object):
|
|||
elif (hasattr(obj, '_field') and\
|
||||
isinstance(obj._field, (float_field, function_field)) and\
|
||||
obj._field.digits):
|
||||
d = obj._field.digits[1] or DEFAULT_DIGITS
|
||||
d = obj._field.digits[1]
|
||||
if not d and d is not 0:
|
||||
d = DEFAULT_DIGITS
|
||||
return d
|
||||
|
||||
def formatLang(self, value, digits=None, date=False, date_time=False, grouping=True, monetary=False, dp=False, currency_obj=False):
|
||||
|
|
Loading…
Reference in New Issue