Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/8.0-refactor-account_banking_pay…
Browse files Browse the repository at this point in the history
…ment-sbi' into 8.0-add-account-cash-discount-base-ape
  • Loading branch information
adrienpeiffer committed Dec 2, 2014
2 parents 3b14869 + 3f37b9d commit 6a48457
Show file tree
Hide file tree
Showing 242 changed files with 5,447 additions and 7,244 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ install:
- git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
- git clone -b 8.0-refactor-account_banking_payment-sbi https://github.com/acsone/banking.git ${HOME}/banking
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- sudo pip install unidecode
- travis_install_nightly
- sudo pip install unidecode BeautifulSoup

script:
- travis_run_tests
Expand Down
48 changes: 0 additions & 48 deletions __unported__/account_banking/account_banking.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,22 +621,6 @@ def _get_invoice_id(self, cr, uid, ids, name, args, context=None):


class invoice(orm.Model):
'''
Create other reference types as well.
Descendant classes can extend this function to add more reference
types, ie.
def _get_reference_type(self, cr, uid, context=None):
return super(my_class, self)._get_reference_type(cr, uid,
context=context) + [('my_ref', _('My reference')]
Don't forget to redefine the column "reference_type" as below or
your method will never be triggered.
TODO: move 'structured' part to account_banking_payment module
where it belongs
'''
_inherit = 'account.invoice'

def test_undo_paid(self, cr, uid, ids, context=None):
Expand All @@ -649,35 +633,3 @@ def test_undo_paid(self, cr, uid, ids, context=None):
return False
return True

def _get_reference_type(self, cr, uid, context=None):
'''
Return the list of reference types
'''
return [('none', _('Free Reference')),
('structured', _('Structured Reference')),
]

_columns = {
'reference_type': fields.selection(_get_reference_type,
'Reference Type', required=True
)
}


class account_move_line(orm.Model):
_inherit = "account.move.line"

def get_balance(self, cr, uid, ids, context=None):
"""
Return the balance of any set of move lines.
Not to be confused with the 'balance' field on this model, which
returns the account balance that the move line applies to.
"""
total = 0.0
if not ids:
return total
for line in self.read(
cr, uid, ids, ['debit', 'credit'], context=context):
total += (line['debit'] or 0.0) - (line['credit'] or 0.0)
return total
11 changes: 1 addition & 10 deletions __unported__/account_banking/res_partner_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def online_account_info(

def search(self, cr, uid, args, *rest, **kwargs):
"""
When a complete IBAN is searched, also search for its BBAN
if we have the domestic column. Disregard spaces
when comparing IBANs.
Disregard spaces when comparing IBANs.
"""

def is_term(arg):
Expand All @@ -61,13 +59,6 @@ def extended_filter_term(term):
""", (term[2].replace(' ', ''),))
ids = [row[0] for row in cr.fetchall()]
result = [('id', 'in', ids)]

if 'acc_number_domestic' in self._columns:
bban = iban.localized_BBAN
# Prevent empty search filters
if bban:
extra_terms.append(
('acc_number_domestic', term[1], bban))
for extra_term in extra_terms:
result = ['|'] + result + [extra_term]
return result
Expand Down
3 changes: 0 additions & 3 deletions __unported__/account_banking_iban_lookup/__init__.py

This file was deleted.

2 changes: 0 additions & 2 deletions __unported__/account_banking_iban_lookup/model/__init__.py

This file was deleted.

63 changes: 0 additions & 63 deletions __unported__/account_banking_iban_lookup/model/res_bank.py

This file was deleted.

Loading

0 comments on commit 6a48457

Please sign in to comment.