Skip to content

Commit 8441b79

Browse files
committed
[REF] Travis
1 parent a2cdee3 commit 8441b79

File tree

7 files changed

+22
-46
lines changed

7 files changed

+22
-46
lines changed

Diff for: account_bank_receipt_cancel_reason/__openerp__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
'depends': ['account_bank_receipt'],
1515
'demo': [],
1616
'data': [
17+
'wizard/cancel_reason_view.xml',
1718
'view/account_bank_receipt_view.xml',
18-
'wizard/cancel_reason_view.xml'
1919
],
2020
'auto_install': False,
2121
'installable': True,

Diff for: base_multi_lang_report/models/report.py

+13-7
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,19 @@ def render(self, template, values=None):
2020
ctx = self._context.copy()
2121
report_action = self.get_action(self, template, values)
2222
report_action = self.env['ir.actions.report.xml'].search(
23-
[('report_name', '=', template)], limit=1)
23+
[('report_name', '=', template)], limit=1)
2424
if report_action:
2525
ctx.update(report_action=report_action)
26-
return super(Report, self.with_context(ctx)).render(template, values=values)
26+
return super(Report, self.with_context(ctx)).render(template,
27+
values=values)
2728

28-
def translate_doc(self, cr, uid, doc_id, model, lang_field, template, values, context=None):
29+
def translate_doc(self, cr, uid, doc_id, model,
30+
lang_field, template, values, context=None):
2931
"""Helper used when a report should be translated into a specific lang.
3032
3133
<t t-foreach="doc_ids" t-as="doc_id">
32-
<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', account.report_invoice_document')"/>
34+
<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang',
35+
account.report_invoice_document')"/>
3336
</t>
3437
3538
:param doc_id: id of the record to translate
@@ -48,12 +51,15 @@ def translate_doc(self, cr, uid, doc_id, model, lang_field, template, values, co
4851

4952
doc = self.pool[model].browse(cr, uid, doc_id, context=ctx)
5053
qcontext = values.copy()
51-
# Do not force-translate if we chose to display the report in a specific lang
54+
# Do not force-translate if we chose to display
55+
# the report in a specific lang
5256
if ctx.get('translatable') is True:
5357
qcontext['o'] = doc
5458
else:
5559
# Reach the lang we want to translate the doc into
5660
if not report_action:
5761
ctx['lang'] = eval('doc.%s' % lang_field, {'doc': doc})
58-
qcontext['o'] = self.pool[model].browse(cr, uid, doc_id, context=ctx)
59-
return self.pool['ir.ui.view'].render(cr, uid, template, qcontext, context=ctx)
62+
qcontext['o'] = \
63+
self.pool[model].browse(cr, uid, doc_id, context=ctx)
64+
return self.pool['ir.ui.view'].render(cr, uid, template,
65+
qcontext, context=ctx)

Diff for: l10n_th_fields/__openerp__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
'website': 'http://www.ecosoft.co.th',
1414
'images': [],
1515
'depends': ['account_voucher',
16-
'account_bank_receipt',],
16+
'account_bank_receipt',
17+
],
1718
'demo': [],
1819
'data': [
1920
'views/voucher_payment_receipt_view.xml',

Diff for: l10n_th_fields/models/account_bank.py

+1-29
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,11 @@
11
# -*- coding: utf-8 -*-
2-
3-
from openerp import models, fields, api
2+
from openerp import models, fields
43

54

65
class Bank(models.Model):
76
_inherit = "res.partner.bank"
87

9-
# journal_id = fields.Many2one(
10-
# string='Default Account Journal',
11-
# )
12-
# journal_ids = fields.One2many(
13-
# 'account.journal',
14-
# 'bank_id',
15-
# string='Account Journals',
16-
# )
178
bank_branch = fields.Char(
189
string='Bank Branch',
1910
size=64,
2011
)
21-
22-
# @api.multi
23-
# def write(self, vals):
24-
# res = super(Bank, self).write(vals)
25-
# if vals.get('journal_ids', False) or vals.get('journal_id', False):
26-
# for rec in self:
27-
# if not rec.journal_id and not rec.journal_ids:
28-
# continue
29-
# elif not rec.journal_id and rec.journal_ids:
30-
# rec.journal_id = rec.journal_ids[0]
31-
# elif rec.journal_id not in rec.journal_ids:
32-
# rec.journal_ids += rec.journal_id
33-
# return res
34-
#
35-
# @api.model
36-
# def create(self, vals):
37-
# res = super(Bank, self).create(vals)
38-
# res.write(vals)
39-
# return res

Diff for: l10n_th_fields/models/account_voucher.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
32
from openerp import models, fields, api
4-
import time
53

64

75
class AccountVoucher(models.Model):

Diff for: l10n_th_tax_report/wizard/tax_report_wizard.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def _onchange_calendar_from_to_period_id(self):
5959
self.calendar_from_period_id = False
6060
self.calendar_to_period_id = False
6161
return {'warning': {
62-
'title': 'Incorrect Periods',
63-
'message': 'From period is later than to period!',
64-
}}
62+
'title': 'Incorrect Periods',
63+
'message': 'From period is later than to period!',
64+
}}
6565

6666
@api.multi
6767
def run_report(self):
@@ -73,8 +73,6 @@ def run_report(self):
7373
if self.period_type == 'specific':
7474
period_ids = [self.calendar_period_id.period_id.id]
7575
elif self.period_type == 'range':
76-
print self.calendar_from_period_id.period_id.id
77-
print self.calendar_to_period_id.period_id.id
7876
domain = [('id', '>=', self.calendar_from_period_id.period_id.id),
7977
('id', '<=', self.calendar_to_period_id.period_id.id)]
8078
period_ids = self.env['account.period'].search(domain).ids

Diff for: multi_lang_search/models/object.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def _search(self, args, offset=0, limit=None, order=None,
118118
if not isinstance(new_result, list):
119119
if not isinstance(new_result, long):
120120
new_result = [new_result]
121-
if isinstance(result, list) and isinstance(new_result, list):
121+
if isinstance(result, list) and \
122+
isinstance(new_result, list):
122123
result_add = [x for x in new_result if x not in result]
123124
if result_add:
124125
result.extend(result_add)

0 commit comments

Comments
 (0)