Skip to content

Commit

Permalink
Merge remote-tracking branch 'odoo/master' into master-inline-searchv…
Browse files Browse the repository at this point in the history
…iew-ged
  • Loading branch information
ged-odoo committed Jun 10, 2014
2 parents 52a8c4c + aa0e831 commit 8202561
Show file tree
Hide file tree
Showing 200 changed files with 15,330 additions and 47,547 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ _build/

# dotfiles
.*
!.gitignore
# compiled python files
*.py[co]
# setup.py egg_info
Expand All @@ -12,7 +13,8 @@ _build/
# hg stuff
*.orig
status

# odoo filestore
openerp/filestore
# generated for windows installer?
install/win32/*.bat
install/win32/meta.py
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Odoo is a suite of web based open source business apps. More info at http://www
The easiest way to play with it is the <a href="https://www.odoo.com/page/start">Odoo free trial</a>, email registration is NOT required, use the "skip this step" link on the registration page to skip it.


Getting started with Odoo developement
Getting started with Odoo development
--------------------------------------

If you are a developer type the following command at your terminal [1]:
Expand Down
3 changes: 3 additions & 0 deletions addons/account/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
'wizard/account_period_close_view.xml',
'wizard/account_reconcile_view.xml',
'wizard/account_unreconcile_view.xml',
'wizard/account_statement_from_invoice_view.xml',
'account_view.xml',
'account_report.xml',
'account_financial_report_data.xml',
Expand Down Expand Up @@ -144,13 +145,15 @@
'qweb' : [
"static/src/xml/account_move_reconciliation.xml",
"static/src/xml/account_move_line_quickadd.xml",
"static/src/xml/account_bank_statement_reconciliation.xml",
],
'demo': [
'demo/account_demo.xml',
'project/project_demo.xml',
'project/analytic_account_demo.xml',
'demo/account_minimal.xml',
'demo/account_invoice_demo.xml',
'demo/account_bank_statement.xml',
'account_unit_test.xml',
],
'test': [
Expand Down
5 changes: 5 additions & 0 deletions addons/account/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -2075,6 +2075,11 @@ def _unit_compute(self, cr, uid, taxes, price_unit, product=None, partner=None,
cur_price_unit+=amount2
return res

def compute_for_bank_reconciliation(self, cr, uid, tax_id, amount, context=None):
""" Called by RPC by the bank statement reconciliation widget """
tax = self.browse(cr, uid, tax_id, context=context)
return self.compute_all(cr, uid, [tax], amount, 1) # TOCHECK may use force_exclude parameter

def compute_all(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, force_excluded=False):
"""
:param force_excluded: boolean used to say that we don't want to consider the value of field price_include of
Expand Down
559 changes: 366 additions & 193 deletions addons/account/account_bank_statement.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion addons/account/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def _get_invoice_from_reconcile(self, cr, uid, ids, context=None):
_name = "account.invoice"
_inherit = ['mail.thread']
_description = 'Invoice'
_order = "id desc"
_order = "number desc, id desc"
_track = {
'type': {
},
Expand Down
12 changes: 7 additions & 5 deletions addons/account/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def _get_reconcile(self, cr, uid, ids,name, unknow_none, context=None):
elif line.reconcile_partial_id:
res[line.id] = str(line.reconcile_partial_id.name)
return res

def _get_move_from_reconcile(self, cr, uid, ids, context=None):
move = {}
for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids, context=context):
Expand Down Expand Up @@ -491,7 +491,7 @@ def _get_move_from_reconcile(self, cr, uid, ids, context=None):
type='many2one', relation='account.invoice', fnct_search=_invoice_search),
'account_tax_id':fields.many2one('account.tax', 'Tax'),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company',
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company',
string='Company', store=True, readonly=True)
}

Expand Down Expand Up @@ -765,7 +765,7 @@ def list_partners_to_reconcile(self, cr, uid, context=None):
WHERE debit > 0 AND credit > 0 AND (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date)
ORDER BY last_reconciliation_date""")
ids = [x[0] for x in cr.fetchall()]
if not ids:
if not ids:
return []

# To apply the ir_rules
Expand Down Expand Up @@ -793,9 +793,11 @@ def reconcile_partial(self, cr, uid, ids, type='auto', context=None, writeoff_ac
else:
currency_id = line.company_id.currency_id
if line.reconcile_id:
raise osv.except_osv(_('Warning'), _("Journal Item '%s' (id: %s), Move '%s' is already reconciled!") % (line.name, line.id, line.move_id.name))
raise osv.except_osv(_('Warning'), _("Journal Item '%s' (id: %s), Move '%s' is already reconciled!") % (line.name, line.id, line.move_id.name))
if line.reconcile_partial_id:
for line2 in line.reconcile_partial_id.line_partial_ids:
if line2.state != 'valid':
raise osv.except_osv(_('Warning'), _("Journal Item '%s' (id: %s) cannot be used in a reconciliation as it is not balanced!") % (line2.name, line2.id))
if not line2.reconcile_id:
if line2.id not in merges:
merges.append(line2.id)
Expand Down Expand Up @@ -1119,7 +1121,7 @@ def _update_journal_check(self, cr, uid, journal_id, period_id, context=None):
period = period_obj.browse(cr, uid, period_id, context=context)
for (state,) in result:
if state == 'done':
raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
if not result:
jour_period_obj.create(cr, uid, {
'name': (journal.code or journal.name)+':'+(period.name or ''),
Expand Down
4 changes: 2 additions & 2 deletions addons/account/account_unit_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<field name="currency_id" ref="base.EUR"/>
<field name="company_id" ref="base.main_company"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="journal_id" ref="account.sales_journal"/>
<field name="journal_id" ref="account.expenses_journal"/>
<field name="state">draft</field>
<field name="type">in_invoice</field>
<field name="account_id" ref="account.a_recv"/>
<field name="account_id" ref="account.a_pay"/>
<field name="name">Test invoice 1</field>
</record>
<record id="test_tax_line" model="account.invoice.tax">
Expand Down
Loading

0 comments on commit 8202561

Please sign in to comment.