merge upstream
This commit is contained in:
commit
9eb3356b16
|
@ -3,6 +3,7 @@ _build/
|
|||
|
||||
# dotfiles
|
||||
.*
|
||||
!.gitignore
|
||||
# compiled python files
|
||||
*.py[co]
|
||||
# setup.py egg_info
|
||||
|
@ -12,7 +13,8 @@ _build/
|
|||
# hg stuff
|
||||
*.orig
|
||||
status
|
||||
|
||||
# odoo filestore
|
||||
openerp/filestore
|
||||
# generated for windows installer?
|
||||
install/win32/*.bat
|
||||
install/win32/meta.py
|
||||
|
@ -25,4 +27,4 @@ install/win32/meta.py
|
|||
/lib/
|
||||
/man/
|
||||
/share/
|
||||
/src/
|
||||
/src/
|
|
@ -0,0 +1,10 @@
|
|||
Contributing to Odoo
|
||||
====================
|
||||
|
||||
[Full contribution guidelines](https://github.com/odoo/odoo/wiki/Contributing)
|
||||
|
||||
TL;DR
|
||||
|
||||
* Use the [template structure](https://raw.githubusercontent.com/odoo/odoo/master/doc/_templates/issue_template.md)
|
||||
* Pull requests made against the [correct version](https://github.com/odoo/odoo/wiki/Contributing#against-which-version-should-i-submit-a-patch)
|
||||
* Read the restrictions for [changes in stable](https://github.com/odoo/odoo/wiki/Contributing#what-does-stable-mean)
|
93
README.md
93
README.md
|
@ -1,73 +1,54 @@
|
|||
About Odoo
|
||||
==========
|
||||
[![Build Status](http://runbot.odoo.com/runbot/badge/default/1/master.svg)](http://runbot.odoo.com/runbot)
|
||||
|
||||
Odoo is a suite of open source Business apps. More info at http://www.odoo.com
|
||||
Odoo
|
||||
----
|
||||
|
||||
Installation
|
||||
============
|
||||
Odoo is a suite of web based open source business apps. More info at http://www.odoo.com
|
||||
|
||||
[Setup/migration guide for employees](https://github.com/odoo/odoo/blob/master/doc/git.rst)
|
||||
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.
|
||||
|
||||
|
||||
Migration from bazaar
|
||||
=====================
|
||||
Getting started with Odoo development
|
||||
--------------------------------------
|
||||
|
||||
If you have existing bazaar branches and want to move them to a git repository,
|
||||
there are several options:
|
||||
If you are a developer type the following command at your terminal [1]:
|
||||
|
||||
* download http://nightly.openerp.com/move-branch.zip and run it with
|
||||
`python move-branch.zip -h` (for the help). It should be able to convert
|
||||
simple-enough branches for you (even if they have merge commits &al)
|
||||
* Extract the branch contents as patches and use `git apply` or `git am` to
|
||||
rebuild a branch from them
|
||||
* Replay the branch by hand
|
||||
wget -O- https://raw.githubusercontent.com/odoo/odoo/master/odoo.py | python
|
||||
|
||||
Then follow <a href="https://doc.openerp.com/trunk/server/howto/howto_website/">the developer tutorial</a>
|
||||
|
||||
[1] You may want to check the content of the <a href="https://raw.githubusercontent.com/odoo/odoo/master/odoo.py">odoo.py file</a> before executing it.
|
||||
|
||||
|
||||
System Requirements
|
||||
-------------------
|
||||
Packages, tarballs and installers
|
||||
---------------------------------
|
||||
|
||||
The dependencies are listed in setup.py
|
||||
* Debian packages
|
||||
|
||||
Add this apt repository to your /etc/apt/sources.list file
|
||||
|
||||
deb http://nightly.openerp.com/8.0/deb/ ./
|
||||
|
||||
Then type:
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install odoo
|
||||
|
||||
* <a href="http://nightly.openerp.com/">Source tarballs</a>
|
||||
|
||||
* <a href="http://nightly.openerp.com/">Windows installer</a>
|
||||
|
||||
* <a href="http://nightly.openerp.com/">RPM package</a>
|
||||
|
||||
|
||||
Debian/Ubuntu
|
||||
-------------
|
||||
For Odoo employees
|
||||
------------------
|
||||
|
||||
Add the apt repository
|
||||
To add the odoo-dev remote use this command:
|
||||
|
||||
deb http://nightly.openerp.com/7.0/deb/ ./
|
||||
$ ./odoo.py setup_git_dev
|
||||
|
||||
in your source.list and type:
|
||||
To fetch odoo merge pull requests refs use this command:
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install openerp
|
||||
|
||||
Or download the deb file and type:
|
||||
|
||||
$ sudo dpkg -i <openerp-deb-filename>
|
||||
$ sudo apt-get install -f
|
||||
|
||||
RedHat, Fedora, CentOS
|
||||
----------------------
|
||||
|
||||
Install the required dependencies:
|
||||
|
||||
$ yum install python
|
||||
$ easy_install pip
|
||||
$ pip install .....
|
||||
|
||||
Install the openerp rpm
|
||||
|
||||
$ rpm -i openerp-VERSION.rpm
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
Check the notes in setup.py
|
||||
|
||||
|
||||
Setting up your database
|
||||
------------------------
|
||||
|
||||
Point your browser to http://localhost:8069/ and click "Manage Databases", the
|
||||
default master password is "admin".
|
||||
$ ./odoo.py setup_git_review
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
.*
|
||||
**/node_modules
|
|
@ -65,6 +65,7 @@ for a particular financial year and for preparation of vouchers there is a modul
|
|||
'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',
|
||||
|
@ -144,6 +145,7 @@ for a particular financial year and for preparation of vouchers there is a modul
|
|||
'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',
|
||||
|
@ -151,6 +153,7 @@ for a particular financial year and for preparation of vouchers there is a modul
|
|||
'project/analytic_account_demo.xml',
|
||||
'demo/account_minimal.xml',
|
||||
'demo/account_invoice_demo.xml',
|
||||
'demo/account_bank_statement.xml',
|
||||
'account_unit_test.xml',
|
||||
],
|
||||
'test': [
|
||||
|
|
|
@ -580,7 +580,14 @@ class account_account(osv.osv):
|
|||
pass
|
||||
if name:
|
||||
if operator not in expression.NEGATIVE_TERM_OPERATORS:
|
||||
ids = self.search(cr, user, ['|', ('code', '=like', name+"%"), '|', ('shortcut', '=', name), ('name', operator, name)]+args, limit=limit)
|
||||
plus_percent = lambda n: n+'%'
|
||||
code_op, code_conv = {
|
||||
'ilike': ('=ilike', plus_percent),
|
||||
'like': ('=like', plus_percent),
|
||||
}.get(operator, (operator, lambda n: n))
|
||||
|
||||
ids = self.search(cr, user, ['|', ('code', code_op, code_conv(name)), '|', ('shortcut', '=', name), ('name', operator, name)]+args, limit=limit)
|
||||
|
||||
if not ids and len(name.split()) >= 2:
|
||||
#Separating code and name of account for searching
|
||||
operand1,operand2 = name.split(' ',1) #name can contain spaces e.g. OpenERP S.A.
|
||||
|
@ -2075,6 +2082,11 @@ class account_tax(osv.osv):
|
|||
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
|
||||
|
@ -2913,7 +2925,7 @@ class account_fiscal_position_template(osv.osv):
|
|||
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
|
||||
'account_ids': fields.one2many('account.fiscal.position.account.template', 'position_id', 'Account Mapping'),
|
||||
'tax_ids': fields.one2many('account.fiscal.position.tax.template', 'position_id', 'Tax Mapping'),
|
||||
'note': fields.text('Notes', translate=True),
|
||||
'note': fields.text('Notes'),
|
||||
}
|
||||
|
||||
def generate_fiscal_position(self, cr, uid, chart_temp_id, tax_template_ref, acc_template_ref, company_id, context=None):
|
||||
|
|
|
@ -19,14 +19,16 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools.translate import _
|
||||
import openerp.addons.decimal_precision as dp
|
||||
from openerp.report import report_sxw
|
||||
|
||||
class account_bank_statement(osv.osv):
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
if vals.get('name', '/') == '/':
|
||||
journal_id = vals.get('journal_id', self._default_journal_id(cr, uid, context=context))
|
||||
vals['name'] = self._compute_default_statement_name(cr, uid, journal_id, context=context)
|
||||
if 'line_ids' in vals:
|
||||
for idx, line in enumerate(vals['line_ids']):
|
||||
line[2]['sequence'] = idx + 1
|
||||
|
@ -66,6 +68,15 @@ class account_bank_statement(osv.osv):
|
|||
return periods[0]
|
||||
return False
|
||||
|
||||
def _compute_default_statement_name(self, cr, uid, journal_id, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
obj_seq = self.pool.get('ir.sequence')
|
||||
period = self.pool.get('account.period').browse(cr, uid, self._get_period(cr, uid, context=context), context=context)
|
||||
context['fiscalyear_id'] = period.fiscalyear_id.id
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, journal_id, None)
|
||||
return obj_seq.next_by_id(cr, uid, journal.sequence_id.id, context=context)
|
||||
|
||||
def _currency(self, cursor, user, ids, name, args, context=None):
|
||||
res = {}
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
|
@ -92,12 +103,18 @@ class account_bank_statement(osv.osv):
|
|||
result[line.statement_id.id] = True
|
||||
return result.keys()
|
||||
|
||||
def _all_lines_reconciled(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
for statement in self.browse(cr, uid, ids, context=context):
|
||||
res[statement.id] = all([line.journal_entry_id.id for line in statement.line_ids])
|
||||
return res
|
||||
|
||||
_order = "date desc, id desc"
|
||||
_name = "account.bank.statement"
|
||||
_description = "Bank Statement"
|
||||
_inherit = ['mail.thread']
|
||||
_columns = {
|
||||
'name': fields.char('Reference', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), # readonly for account_cash_statement
|
||||
'name': fields.char('Reference', size=64, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), # readonly for account_cash_statement
|
||||
'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}, select=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True,
|
||||
readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
@ -129,10 +146,11 @@ class account_bank_statement(osv.osv):
|
|||
type='many2one', relation='res.currency'),
|
||||
'account_id': fields.related('journal_id', 'default_debit_account_id', type='many2one', relation='account.account', string='Account used in this journal', readonly=True, help='used in statement reconciliation domain, but shouldn\'t be used elswhere.'),
|
||||
'cash_control': fields.related('journal_id', 'cash_control' , type='boolean', relation='account.journal',string='Cash control'),
|
||||
'all_lines_reconciled': fields.function(_all_lines_reconciled, string='All lines reconciled', type='boolean'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'name': "/",
|
||||
'name': '/',
|
||||
'date': fields.date.context_today,
|
||||
'state': 'draft',
|
||||
'journal_id': _default_journal_id,
|
||||
|
@ -193,44 +211,10 @@ class account_bank_statement(osv.osv):
|
|||
'ref': st_line.ref,
|
||||
}
|
||||
|
||||
def _prepare_bank_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id,
|
||||
context=None):
|
||||
"""Compute the args to build the dict of values to create the bank move line from a
|
||||
statement line by calling the _prepare_move_line_vals. This method may be
|
||||
overridden to implement custom move generation (making sure to call super() to
|
||||
establish a clean extension chain).
|
||||
|
||||
:param browse_record st_line: account.bank.statement.line record to
|
||||
create the move from.
|
||||
:param int/long move_id: ID of the account.move to link the move line
|
||||
:param float amount: amount of the move line
|
||||
:param int/long company_currency_id: ID of currency of the concerned company
|
||||
:return: dict of value to create() the bank account.move.line
|
||||
"""
|
||||
anl_id = st_line.analytic_account_id and st_line.analytic_account_id.id or False
|
||||
debit = ((amount<0) and -amount) or 0.0
|
||||
credit = ((amount>0) and amount) or 0.0
|
||||
cur_id = False
|
||||
amt_cur = False
|
||||
if st_line.statement_id.currency.id <> company_currency_id:
|
||||
cur_id = st_line.statement_id.currency.id
|
||||
if st_line.account_id and st_line.account_id.currency_id and st_line.account_id.currency_id.id <> company_currency_id:
|
||||
cur_id = st_line.account_id.currency_id.id
|
||||
if cur_id:
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
amt_cur = -res_currency_obj.compute(cr, uid, company_currency_id, cur_id, amount, context=context)
|
||||
|
||||
res = self._prepare_move_line_vals(cr, uid, st_line, move_id, debit, credit,
|
||||
amount_currency=amt_cur, currency_id=cur_id, analytic_id=anl_id, context=context)
|
||||
return res
|
||||
|
||||
def _get_counter_part_account(sefl, cr, uid, st_line, context=None):
|
||||
"""Retrieve the account to use in the counterpart move.
|
||||
This method may be overridden to implement custom move generation (making sure to
|
||||
call super() to establish a clean extension chain).
|
||||
|
||||
:param browse_record st_line: account.bank.statement.line record to
|
||||
create the move from.
|
||||
:param browse_record st_line: account.bank.statement.line record to create the move from.
|
||||
:return: int/long of the account.account to use as counterpart
|
||||
"""
|
||||
if st_line.amount >= 0:
|
||||
|
@ -239,50 +223,42 @@ class account_bank_statement(osv.osv):
|
|||
|
||||
def _get_counter_part_partner(sefl, cr, uid, st_line, context=None):
|
||||
"""Retrieve the partner to use in the counterpart move.
|
||||
This method may be overridden to implement custom move generation (making sure to
|
||||
call super() to establish a clean extension chain).
|
||||
|
||||
:param browse_record st_line: account.bank.statement.line record to
|
||||
create the move from.
|
||||
:param browse_record st_line: account.bank.statement.line record to create the move from.
|
||||
:return: int/long of the res.partner to use as counterpart
|
||||
"""
|
||||
return st_line.partner_id and st_line.partner_id.id or False
|
||||
|
||||
def _prepare_counterpart_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id,
|
||||
context=None):
|
||||
def _prepare_bank_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id, context=None):
|
||||
"""Compute the args to build the dict of values to create the counter part move line from a
|
||||
statement line by calling the _prepare_move_line_vals. This method may be
|
||||
overridden to implement custom move generation (making sure to call super() to
|
||||
establish a clean extension chain).
|
||||
statement line by calling the _prepare_move_line_vals.
|
||||
|
||||
:param browse_record st_line: account.bank.statement.line record to
|
||||
create the move from.
|
||||
:param browse_record st_line: account.bank.statement.line record to create the move from.
|
||||
:param int/long move_id: ID of the account.move to link the move line
|
||||
:param float amount: amount of the move line
|
||||
:param int/long account_id: ID of account to use as counter part
|
||||
:param int/long company_currency_id: ID of currency of the concerned company
|
||||
:return: dict of value to create() the bank account.move.line
|
||||
"""
|
||||
account_id = self._get_counter_part_account(cr, uid, st_line, context=context)
|
||||
partner_id = self._get_counter_part_partner(cr, uid, st_line, context=context)
|
||||
debit = ((amount > 0) and amount) or 0.0
|
||||
credit = ((amount < 0) and -amount) or 0.0
|
||||
credit = ((amount < 0) and -amount) or 0.0
|
||||
cur_id = False
|
||||
amt_cur = False
|
||||
if st_line.statement_id.currency.id <> company_currency_id:
|
||||
if st_line.statement_id.currency.id != company_currency_id:
|
||||
amt_cur = st_line.amount
|
||||
cur_id = st_line.statement_id.currency.id
|
||||
cur_id = st_line.currency_id or st_line.statement_id.currency.id
|
||||
if st_line.currency_id and st_line.amount_currency:
|
||||
amt_cur = st_line.amount_currency
|
||||
cur_id = st_line.currency_id.id
|
||||
return self._prepare_move_line_vals(cr, uid, st_line, move_id, debit, credit,
|
||||
amount_currency = amt_cur, currency_id = cur_id, account_id = account_id,
|
||||
partner_id = partner_id, context=context)
|
||||
amount_currency=amt_cur, currency_id=cur_id, account_id=account_id,
|
||||
partner_id=partner_id, context=context)
|
||||
|
||||
def _prepare_move_line_vals(self, cr, uid, st_line, move_id, debit, credit, currency_id = False,
|
||||
amount_currency= False, account_id = False, analytic_id = False,
|
||||
partner_id = False, context=None):
|
||||
def _prepare_move_line_vals(self, cr, uid, st_line, move_id, debit, credit, currency_id=False,
|
||||
amount_currency=False, account_id=False, partner_id=False, context=None):
|
||||
"""Prepare the dict of values to create the move line from a
|
||||
statement line. All non-mandatory args will replace the default computed one.
|
||||
This method may be overridden to implement custom move generation (making sure to
|
||||
call super() to establish a clean extension chain).
|
||||
statement line.
|
||||
|
||||
:param browse_record st_line: account.bank.statement.line record to
|
||||
create the move from.
|
||||
|
@ -293,7 +269,6 @@ class account_bank_statement(osv.osv):
|
|||
:param float amount_currency: amount of the debit/credit expressed in the currency_id
|
||||
:param int/long account_id: ID of the account to use in the move line if different
|
||||
from the statement line account ID
|
||||
:param int/long analytic_id: ID of analytic account to put on the move line
|
||||
:param int/long partner_id: ID of the partner to put on the move line
|
||||
:return: dict of value to create() the account.move.line
|
||||
"""
|
||||
|
@ -314,67 +289,8 @@ class account_bank_statement(osv.osv):
|
|||
'period_id': st_line.statement_id.period_id.id,
|
||||
'currency_id': amount_currency and cur_id,
|
||||
'amount_currency': amount_currency,
|
||||
'analytic_account_id': analytic_id,
|
||||
}
|
||||
|
||||
def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, st_line_number, context=None):
|
||||
"""Create the account move from the statement line.
|
||||
|
||||
:param int/long st_line_id: ID of the account.bank.statement.line to create the move from.
|
||||
:param int/long company_currency_id: ID of the res.currency of the company
|
||||
:param char st_line_number: will be used as the name of the generated account move
|
||||
:return: ID of the account.move created
|
||||
"""
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
account_move_obj = self.pool.get('account.move')
|
||||
account_move_line_obj = self.pool.get('account.move.line')
|
||||
account_bank_statement_line_obj = self.pool.get('account.bank.statement.line')
|
||||
st_line = account_bank_statement_line_obj.browse(cr, uid, st_line_id, context=context)
|
||||
st = st_line.statement_id
|
||||
|
||||
context.update({'date': st_line.date})
|
||||
|
||||
move_vals = self._prepare_move(cr, uid, st_line, st_line_number, context=context)
|
||||
move_id = account_move_obj.create(cr, uid, move_vals, context=context)
|
||||
account_bank_statement_line_obj.write(cr, uid, [st_line.id], {
|
||||
'move_ids': [(4, move_id, False)]
|
||||
})
|
||||
torec = []
|
||||
acc_cur = ((st_line.amount<=0) and st.journal_id.default_debit_account_id) or st_line.account_id
|
||||
|
||||
context.update({
|
||||
'res.currency.compute.account': acc_cur,
|
||||
})
|
||||
amount = res_currency_obj.compute(cr, uid, st.currency.id,
|
||||
company_currency_id, st_line.amount, context=context)
|
||||
|
||||
bank_move_vals = self._prepare_bank_move_line(cr, uid, st_line, move_id, amount,
|
||||
company_currency_id, context=context)
|
||||
move_line_id = account_move_line_obj.create(cr, uid, bank_move_vals, context=context)
|
||||
torec.append(move_line_id)
|
||||
|
||||
counterpart_move_vals = self._prepare_counterpart_move_line(cr, uid, st_line, move_id,
|
||||
amount, company_currency_id, context=context)
|
||||
account_move_line_obj.create(cr, uid, counterpart_move_vals, context=context)
|
||||
|
||||
for line in account_move_line_obj.browse(cr, uid, [x.id for x in
|
||||
account_move_obj.browse(cr, uid, move_id,
|
||||
context=context).line_id],
|
||||
context=context):
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error!'),
|
||||
_('Journal item "%s" is not valid.') % line.name)
|
||||
|
||||
# Bank statements will not consider boolean on journal entry_posted
|
||||
account_move_obj.post(cr, uid, [move_id], context=context)
|
||||
return move_id
|
||||
|
||||
def get_next_st_line_number(self, cr, uid, st_number, st_line, context=None):
|
||||
return st_number + '/' + str(st_line.sequence)
|
||||
|
||||
def balance_check(self, cr, uid, st_id, journal_type='bank', context=None):
|
||||
st = self.browse(cr, uid, st_id, context=context)
|
||||
if not ((abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001) or (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001)):
|
||||
|
@ -389,64 +305,53 @@ class account_bank_statement(osv.osv):
|
|||
return state in ('draft','open')
|
||||
|
||||
def button_confirm_bank(self, cr, uid, ids, context=None):
|
||||
obj_seq = self.pool.get('ir.sequence')
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
for st in self.browse(cr, uid, ids, context=context):
|
||||
j_type = st.journal_id.type
|
||||
company_currency_id = st.journal_id.company_id.currency_id.id
|
||||
if not self.check_status_condition(cr, uid, st.state, journal_type=j_type):
|
||||
continue
|
||||
|
||||
self.balance_check(cr, uid, st.id, journal_type=j_type, context=context)
|
||||
if (not st.journal_id.default_credit_account_id) \
|
||||
or (not st.journal_id.default_debit_account_id):
|
||||
raise osv.except_osv(_('Configuration Error!'),
|
||||
_('Please verify that an account is defined in the journal.'))
|
||||
|
||||
if not st.name == '/':
|
||||
st_number = st.name
|
||||
else:
|
||||
c = {'fiscalyear_id': st.period_id.fiscalyear_id.id}
|
||||
if st.journal_id.sequence_id:
|
||||
st_number = obj_seq.next_by_id(cr, uid, st.journal_id.sequence_id.id, context=c)
|
||||
else:
|
||||
st_number = obj_seq.next_by_code(cr, uid, 'account.bank.statement', context=c)
|
||||
|
||||
raise osv.except_osv(_('Configuration Error!'), _('Please verify that an account is defined in the journal.'))
|
||||
for line in st.move_line_ids:
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error!'),
|
||||
_('The account entries lines are not in valid state.'))
|
||||
raise osv.except_osv(_('Error!'), _('The account entries lines are not in valid state.'))
|
||||
move_ids = []
|
||||
for st_line in st.line_ids:
|
||||
if st_line.analytic_account_id:
|
||||
if not st.journal_id.analytic_journal_id:
|
||||
raise osv.except_osv(_('No Analytic Journal!'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,))
|
||||
if not st_line.amount:
|
||||
continue
|
||||
st_line_number = self.get_next_st_line_number(cr, uid, st_number, st_line, context)
|
||||
self.create_move_from_st_line(cr, uid, st_line.id, company_currency_id, st_line_number, context)
|
||||
|
||||
self.write(cr, uid, [st.id], {
|
||||
'name': st_number,
|
||||
'balance_end_real': st.balance_end
|
||||
}, context=context)
|
||||
self.message_post(cr, uid, [st.id], body=_('Statement %s confirmed, journal items were created.') % (st_number,), context=context)
|
||||
if not st_line.journal_entry_id.id:
|
||||
raise osv.except_osv(_('Error!'), _('All the account entries lines must be processed in order to close the statement.'))
|
||||
move_ids.append(st_line.journal_entry_id.id)
|
||||
self.pool.get('account.move').post(cr, uid, move_ids, context=context)
|
||||
self.message_post(cr, uid, [st.id], body=_('Statement %s confirmed, journal items were created.') % (st.name,), context=context)
|
||||
self.link_bank_to_partner(cr, uid, ids, context=context)
|
||||
return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
done = []
|
||||
account_move_obj = self.pool.get('account.move')
|
||||
reconcile_pool = self.pool.get('account.move.reconcile')
|
||||
move_line_pool = self.pool.get('account.move.line')
|
||||
move_ids = []
|
||||
for st in self.browse(cr, uid, ids, context=context):
|
||||
if st.state=='draft':
|
||||
continue
|
||||
move_ids = []
|
||||
for line in st.line_ids:
|
||||
move_ids += [x.id for x in line.move_ids]
|
||||
if line.journal_entry_id:
|
||||
move_ids.append(line.journal_entry_id.id)
|
||||
for aml in line.journal_entry_id.line_id:
|
||||
if aml.reconcile_id:
|
||||
move_lines = [l.id for l in aml.reconcile_id.line_id]
|
||||
move_lines.remove(aml.id)
|
||||
reconcile_pool.unlink(cr, uid, [aml.reconcile_id.id], context=context)
|
||||
if len(move_lines) >= 2:
|
||||
move_line_pool.reconcile_partial(cr, uid, move_lines, 'auto', context=context)
|
||||
if move_ids:
|
||||
account_move_obj.button_cancel(cr, uid, move_ids, context=context)
|
||||
account_move_obj.unlink(cr, uid, move_ids, context)
|
||||
done.append(st.id)
|
||||
return self.write(cr, uid, done, {'state':'draft'}, context=context)
|
||||
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
|
||||
|
||||
def _compute_balance_end_real(self, cr, uid, journal_id, context=None):
|
||||
res = False
|
||||
|
@ -492,93 +397,443 @@ class account_bank_statement(osv.osv):
|
|||
return super(account_bank_statement, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def button_journal_entries(self, cr, uid, ids, context=None):
|
||||
ctx = (context or {}).copy()
|
||||
ctx['journal_id'] = self.browse(cr, uid, ids[0], context=context).journal_id.id
|
||||
return {
|
||||
'name': _('Journal Items'),
|
||||
'view_type':'form',
|
||||
'view_mode':'tree',
|
||||
'res_model':'account.move.line',
|
||||
'view_id':False,
|
||||
'type':'ir.actions.act_window',
|
||||
'domain':[('statement_id','in',ids)],
|
||||
'context':ctx,
|
||||
}
|
||||
ctx = (context or {}).copy()
|
||||
ctx['journal_id'] = self.browse(cr, uid, ids[0], context=context).journal_id.id
|
||||
return {
|
||||
'name': _('Journal Items'),
|
||||
'view_type':'form',
|
||||
'view_mode':'tree',
|
||||
'res_model':'account.move.line',
|
||||
'view_id':False,
|
||||
'type':'ir.actions.act_window',
|
||||
'domain':[('statement_id','in',ids)],
|
||||
'context':ctx,
|
||||
}
|
||||
|
||||
def number_of_lines_reconciled(self, cr, uid, id, context=None):
|
||||
bsl_obj = self.pool.get('account.bank.statement.line')
|
||||
return bsl_obj.search_count(cr, uid, [('statement_id', '=', id), ('journal_entry_id', '!=', False)], context=context)
|
||||
|
||||
def get_format_currency_js_function(self, cr, uid, id, context=None):
|
||||
""" Returns a string that can be used to instanciate a javascript function.
|
||||
That function formats a number according to the statement line's currency or the statement currency"""
|
||||
company_currency = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id
|
||||
st = id and self.browse(cr, uid, id, context=context)
|
||||
if not st:
|
||||
return
|
||||
statement_currency = st.journal_id.currency or company_currency
|
||||
digits = 2 # TODO : from currency_obj
|
||||
function = ""
|
||||
done_currencies = []
|
||||
for st_line in st.line_ids:
|
||||
st_line_currency = st_line.currency_id or statement_currency
|
||||
if st_line_currency.id not in done_currencies:
|
||||
if st_line_currency.position == 'after':
|
||||
return_str = "return amount.toFixed(" + str(digits) + ") + ' " + st_line_currency.symbol + "';"
|
||||
else:
|
||||
return_str = "return '" + st_line_currency.symbol + " ' + amount.toFixed(" + str(digits) + ");"
|
||||
function += "if (currency_id === " + str(st_line_currency.id) + "){ " + return_str + " }"
|
||||
done_currencies.append(st_line_currency.id)
|
||||
return function
|
||||
|
||||
def link_bank_to_partner(self, cr, uid, ids, context=None):
|
||||
for statement in self.browse(cr, uid, ids, context=context):
|
||||
for st_line in statement.line_ids:
|
||||
if st_line.bank_account_id and st_line.partner_id and st_line.bank_account_id.partner_id.id != st_line.partner_id.id:
|
||||
self.pool.get('res.partner.bank').write(cr, uid, [st_line.bank_account_id.id], {'partner_id': st_line.partner_id.id}, context=context)
|
||||
|
||||
class account_bank_statement_line(osv.osv):
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id, context=None):
|
||||
obj_partner = self.pool.get('res.partner')
|
||||
if context is None:
|
||||
context = {}
|
||||
if not partner_id:
|
||||
return {}
|
||||
part = obj_partner.browse(cr, uid, partner_id, context=context)
|
||||
if not part.supplier and not part.customer:
|
||||
type = 'general'
|
||||
elif part.supplier and part.customer:
|
||||
type = 'general'
|
||||
else:
|
||||
if part.supplier == True:
|
||||
type = 'supplier'
|
||||
if part.customer == True:
|
||||
type = 'customer'
|
||||
res_type = self.onchange_type(cr, uid, ids, partner_id=partner_id, type=type, context=context)
|
||||
if res_type['value'] and res_type['value'].get('account_id', False):
|
||||
return {'value': {'type': type, 'account_id': res_type['value']['account_id']}}
|
||||
return {'value': {'type': type}}
|
||||
def get_data_for_reconciliations(self, cr, uid, ids, context=None):
|
||||
""" Used to instanciate a batch of reconciliations in a single request """
|
||||
# Build a list of reconciliations data
|
||||
ret = []
|
||||
mv_line_ids_selected = []
|
||||
for st_line_id in ids:
|
||||
reconciliation_data = {
|
||||
'st_line': self.get_statement_line_for_reconciliation(cr, uid, st_line_id, context),
|
||||
'reconciliation_proposition': self.get_reconciliation_proposition(cr, uid, st_line_id, mv_line_ids_selected, context)
|
||||
}
|
||||
for mv_line in reconciliation_data['reconciliation_proposition']:
|
||||
mv_line_ids_selected.append(mv_line['id'])
|
||||
ret.append(reconciliation_data)
|
||||
|
||||
def onchange_type(self, cr, uid, line_id, partner_id, type, context=None):
|
||||
res = {'value': {}}
|
||||
obj_partner = self.pool.get('res.partner')
|
||||
# Check if, now that 'candidate' move lines were selected, there are moves left for statement lines
|
||||
#for reconciliation_data in ret:
|
||||
# if not reconciliation_data['st_line']['has_no_partner']:
|
||||
# st_line = self.browse(cr, uid, reconciliation_data['st_line']['id'], context=context)
|
||||
# if not self.get_move_lines_counterparts(cr, uid, st_line, excluded_ids=mv_line_ids_selected, count=True, context=context):
|
||||
# reconciliation_data['st_line']['no_match'] = True
|
||||
return ret
|
||||
|
||||
def get_statement_line_for_reconciliation(self, cr, uid, id, context=None):
|
||||
""" Returns the data required by the bank statement reconciliation use case """
|
||||
line = self.browse(cr, uid, id, context=context)
|
||||
statement_currency = line.journal_id.currency or line.journal_id.company_id.currency_id
|
||||
amount = line.amount
|
||||
rml_parser = report_sxw.rml_parse(cr, uid, 'statement_line_widget', context=context)
|
||||
amount_str = line.amount > 0 and line.amount or -line.amount
|
||||
amount_str = rml_parser.formatLang(amount_str, currency_obj=statement_currency)
|
||||
amount_currency_str = ""
|
||||
if line.amount_currency and line.currency_id:
|
||||
amount_currency_str = amount_str
|
||||
amount_str = rml_parser.formatLang(line.amount_currency, currency_obj=line.currency_id)
|
||||
amount = line.amount_currency
|
||||
|
||||
data = {
|
||||
'id': line.id,
|
||||
'ref': line.ref,
|
||||
'note': line.note or "",
|
||||
'name': line.name,
|
||||
'date': line.date,
|
||||
'amount': amount,
|
||||
'amount_str': amount_str,
|
||||
'currency_id': line.currency_id.id or statement_currency.id,
|
||||
'no_match': self.get_move_lines_counterparts(cr, uid, line, count=True, context=context) == 0,
|
||||
'partner_id': line.partner_id.id,
|
||||
'statement_id': line.statement_id.id,
|
||||
'account_code': line.journal_id.default_debit_account_id.code,
|
||||
'account_name': line.journal_id.default_debit_account_id.name,
|
||||
'partner_name': line.partner_id.name,
|
||||
'amount_currency_str': amount_currency_str,
|
||||
'has_no_partner': not line.partner_id.id,
|
||||
}
|
||||
if line.partner_id.id:
|
||||
data['open_balance_account_id'] = line.partner_id.property_account_payable.id
|
||||
if amount > 0:
|
||||
data['open_balance_account_id'] = line.partner_id.property_account_receivable.id
|
||||
return data
|
||||
|
||||
def search_structured_com(self, cr, uid, st_line, context=None):
|
||||
if not st_line.ref:
|
||||
return
|
||||
domain = [('ref', '=', st_line.ref)]
|
||||
if st_line.partner_id:
|
||||
domain += [('partner_id', '=', st_line.partner_id.id)]
|
||||
ids = self.pool.get('account.move.line').search(cr, uid, domain, limit=1, context=context)
|
||||
return ids and ids[0] or False
|
||||
|
||||
def get_reconciliation_proposition(self, cr, uid, id, excluded_ids=[], context=None):
|
||||
""" Returns move lines that constitute the best guess to reconcile a statement line. """
|
||||
st_line = self.browse(cr, uid, id, context=context)
|
||||
company_currency = st_line.journal_id.company_id.currency_id.id
|
||||
statement_currency = st_line.journal_id.currency.id or company_currency
|
||||
# either use the unsigned debit/credit fields or the signed amount_currency field
|
||||
sign = 1
|
||||
if statement_currency == company_currency:
|
||||
amount_field = 'credit'
|
||||
if st_line.amount > 0:
|
||||
amount_field = 'debit'
|
||||
else:
|
||||
amount_field = 'amount_currency'
|
||||
if st_line.amount < 0:
|
||||
sign = -1
|
||||
|
||||
# look for structured communication
|
||||
exact_match_id = self.search_structured_com(cr, uid, st_line, context=context)
|
||||
if exact_match_id:
|
||||
return self.make_counter_part_lines(cr, uid, st_line, [exact_match_id], count=False, context=context)
|
||||
#we don't propose anything if there is no partner detected
|
||||
if not st_line.partner_id.id:
|
||||
return []
|
||||
# look for exact match
|
||||
exact_match_id = self.get_move_lines_counterparts(cr, uid, st_line, excluded_ids=excluded_ids, limit=1, additional_domain=[(amount_field, '=', (sign * st_line.amount))])
|
||||
if exact_match_id:
|
||||
return exact_match_id
|
||||
|
||||
# select oldest move lines
|
||||
if sign == -1:
|
||||
mv_lines = self.get_move_lines_counterparts(cr, uid, st_line, excluded_ids=excluded_ids, limit=50, additional_domain=[(amount_field, '<', 0)])
|
||||
else:
|
||||
mv_lines = self.get_move_lines_counterparts(cr, uid, st_line, excluded_ids=excluded_ids, limit=50, additional_domain=[(amount_field, '>', 0)])
|
||||
ret = []
|
||||
total = 0
|
||||
# get_move_lines_counterparts inverts debit and credit
|
||||
amount_field = 'debit' if amount_field == 'credit' else 'credit'
|
||||
for line in mv_lines:
|
||||
if total + line[amount_field] <= abs(st_line.amount):
|
||||
ret.append(line)
|
||||
total += line[amount_field]
|
||||
if total >= abs(st_line.amount):
|
||||
break
|
||||
return ret
|
||||
|
||||
def get_move_lines_counterparts_id(self, cr, uid, st_line_id, excluded_ids=[], filter_str="", offset=0, limit=None, count=False, additional_domain=[], context=None):
|
||||
st_line = self.browse(cr, uid, st_line_id, context=context)
|
||||
return self.get_move_lines_counterparts(cr, uid, st_line, excluded_ids, filter_str, offset, limit, count, additional_domain, context=context)
|
||||
|
||||
def get_move_lines_counterparts(self, cr, uid, st_line, excluded_ids=[], filter_str="", offset=0, limit=None, count=False, additional_domain=[], context=None):
|
||||
""" Find the move lines that could be used to reconcile a statement line and returns the counterpart that could be created to reconcile them
|
||||
If count is true, only returns the count.
|
||||
|
||||
:param st_line: the browse record of the statement line
|
||||
:param integers list excluded_ids: ids of move lines that should not be fetched
|
||||
:param string filter_str: string to filter lines
|
||||
:param integer offset: offset of the request
|
||||
:param integer limit: number of lines to fetch
|
||||
:param boolean count: just return the number of records
|
||||
:param tuples list domain: additional domain restrictions
|
||||
"""
|
||||
mv_line_pool = self.pool.get('account.move.line')
|
||||
|
||||
domain = additional_domain + [
|
||||
('reconcile_id', '=', False),
|
||||
('state', '=', 'valid'),
|
||||
]
|
||||
if st_line.partner_id.id:
|
||||
domain += [('partner_id', '=', st_line.partner_id.id),
|
||||
'|', ('account_id.type', '=', 'receivable'),
|
||||
('account_id.type', '=', 'payable')]
|
||||
else:
|
||||
domain += [('account_id.reconcile', '=', True)]
|
||||
#domain += [('account_id.reconcile', '=', True), ('account_id.type', '=', 'other')]
|
||||
if excluded_ids:
|
||||
domain.append(('id', 'not in', excluded_ids))
|
||||
if filter_str:
|
||||
if not st_line.partner_id:
|
||||
domain += [ '|', ('partner_id.name', 'ilike', filter_str)]
|
||||
domain += ['|', ('move_id.name', 'ilike', filter_str), ('move_id.ref', 'ilike', filter_str)]
|
||||
line_ids = mv_line_pool.search(cr, uid, domain, offset=offset, limit=limit, order="date_maturity asc, id asc", context=context)
|
||||
return self.make_counter_part_lines(cr, uid, st_line, line_ids, count=count, context=context)
|
||||
|
||||
def make_counter_part_lines(self, cr, uid, st_line, line_ids, count=False, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if not partner_id:
|
||||
return res
|
||||
account_id = False
|
||||
line = self.browse(cr, uid, line_id, context=context)
|
||||
if not line or (line and not line[0].account_id):
|
||||
part = obj_partner.browse(cr, uid, partner_id, context=context)
|
||||
if type == 'supplier':
|
||||
account_id = part.property_account_payable.id
|
||||
else:
|
||||
account_id = part.property_account_receivable.id
|
||||
res['value']['account_id'] = account_id
|
||||
return res
|
||||
mv_line_pool = self.pool.get('account.move.line')
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
company_currency = st_line.journal_id.company_id.currency_id
|
||||
statement_currency = st_line.journal_id.currency or company_currency
|
||||
rml_parser = report_sxw.rml_parse(cr, uid, 'statement_line_counterpart_widget', context=context)
|
||||
#partially reconciled lines can be displayed only once
|
||||
reconcile_partial_ids = []
|
||||
if count:
|
||||
nb_lines = 0
|
||||
for line in mv_line_pool.browse(cr, uid, line_ids, context=context):
|
||||
if line.reconcile_partial_id and line.reconcile_partial_id.id in reconcile_partial_ids:
|
||||
continue
|
||||
nb_lines += 1
|
||||
if line.reconcile_partial_id:
|
||||
reconcile_partial_ids.append(line.reconcile_partial_id.id)
|
||||
return nb_lines
|
||||
else:
|
||||
ret = []
|
||||
for line in mv_line_pool.browse(cr, uid, line_ids, context=context):
|
||||
if line.reconcile_partial_id and line.reconcile_partial_id.id in reconcile_partial_ids:
|
||||
continue
|
||||
amount_currency_str = ""
|
||||
if line.currency_id and line.amount_currency:
|
||||
amount_currency_str = rml_parser.formatLang(line.amount_currency, currency_obj=line.currency_id)
|
||||
ret_line = {
|
||||
'id': line.id,
|
||||
'name': line.move_id.name,
|
||||
'ref': line.move_id.ref,
|
||||
'account_code': line.account_id.code,
|
||||
'account_name': line.account_id.name,
|
||||
'account_type': line.account_id.type,
|
||||
'date_maturity': line.date_maturity,
|
||||
'date': line.date,
|
||||
'period_name': line.period_id.name,
|
||||
'journal_name': line.journal_id.name,
|
||||
'amount_currency_str': amount_currency_str,
|
||||
'partner_id': line.partner_id.id,
|
||||
'partner_name': line.partner_id.name,
|
||||
'has_no_partner': not bool(st_line.partner_id.id),
|
||||
}
|
||||
st_line_currency = st_line.currency_id or statement_currency
|
||||
if st_line.currency_id and line.currency_id and line.currency_id.id == st_line.currency_id.id:
|
||||
if line.amount_residual_currency < 0:
|
||||
ret_line['debit'] = 0
|
||||
ret_line['credit'] = -line.amount_residual_currency
|
||||
else:
|
||||
ret_line['debit'] = line.amount_residual_currency if line.credit != 0 else 0
|
||||
ret_line['credit'] = line.amount_residual_currency if line.debit != 0 else 0
|
||||
ret_line['amount_currency_str'] = rml_parser.formatLang(line.amount_residual, currency_obj=company_currency)
|
||||
else:
|
||||
if line.amount_residual < 0:
|
||||
ret_line['debit'] = 0
|
||||
ret_line['credit'] = -line.amount_residual
|
||||
else:
|
||||
ret_line['debit'] = line.amount_residual if line.credit != 0 else 0
|
||||
ret_line['credit'] = line.amount_residual if line.debit != 0 else 0
|
||||
ctx = context.copy()
|
||||
ctx.update({'date': st_line.date})
|
||||
ret_line['debit'] = currency_obj.compute(cr, uid, st_line_currency.id, company_currency.id, ret_line['debit'], context=ctx)
|
||||
ret_line['credit'] = currency_obj.compute(cr, uid, st_line_currency.id, company_currency.id, ret_line['credit'], context=ctx)
|
||||
ret_line['debit_str'] = rml_parser.formatLang(ret_line['debit'], currency_obj=st_line_currency)
|
||||
ret_line['credit_str'] = rml_parser.formatLang(ret_line['credit'], currency_obj=st_line_currency)
|
||||
ret.append(ret_line)
|
||||
if line.reconcile_partial_id:
|
||||
reconcile_partial_ids.append(line.reconcile_partial_id.id)
|
||||
return ret
|
||||
|
||||
def get_currency_rate_line(self, cr, uid, st_line, currency_diff, move_id, context=None):
|
||||
if currency_diff < 0:
|
||||
account_id = st_line.company_id.expense_currency_exchange_account_id.id
|
||||
if not account_id:
|
||||
raise osv.except_osv(_('Insufficient Configuration!'), _("You should configure the 'Loss Exchange Rate Account' in the accounting settings, to manage automatically the booking of accounting entries related to differences between exchange rates."))
|
||||
else:
|
||||
account_id = st_line.company_id.income_currency_exchange_account_id.id
|
||||
if not account_id:
|
||||
raise osv.except_osv(_('Insufficient Configuration!'), _("You should configure the 'Gain Exchange Rate Account' in the accounting settings, to manage automatically the booking of accounting entries related to differences between exchange rates."))
|
||||
return {
|
||||
'move_id': move_id,
|
||||
'name': _('change') + ': ' + (st_line.name or '/'),
|
||||
'period_id': st_line.statement_id.period_id.id,
|
||||
'journal_id': st_line.journal_id.id,
|
||||
'partner_id': st_line.partner_id.id,
|
||||
'company_id': st_line.company_id.id,
|
||||
'statement_id': st_line.statement_id.id,
|
||||
'debit': currency_diff < 0 and -currency_diff or 0,
|
||||
'credit': currency_diff > 0 and currency_diff or 0,
|
||||
'date': st_line.date,
|
||||
'account_id': account_id
|
||||
}
|
||||
|
||||
def process_reconciliation(self, cr, uid, id, mv_line_dicts, context=None):
|
||||
""" Creates a move line for each item of mv_line_dicts and for the statement line. Reconcile a new move line with its counterpart_move_line_id if specified. Finally, mark the statement line as reconciled by putting the newly created move id in the column journal_entry_id.
|
||||
|
||||
:param int id: id of the bank statement line
|
||||
:param list of dicts mv_line_dicts: move lines to create. If counterpart_move_line_id is specified, reconcile with it
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
st_line = self.browse(cr, uid, id, context=context)
|
||||
company_currency = st_line.journal_id.company_id.currency_id
|
||||
statement_currency = st_line.journal_id.currency or company_currency
|
||||
bs_obj = self.pool.get('account.bank.statement')
|
||||
am_obj = self.pool.get('account.move')
|
||||
aml_obj = self.pool.get('account.move.line')
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
|
||||
# Checks
|
||||
if st_line.journal_entry_id.id:
|
||||
raise osv.except_osv(_('Error!'), _('The bank statement line was already reconciled.'))
|
||||
for mv_line_dict in mv_line_dicts:
|
||||
for field in ['debit', 'credit', 'amount_currency']:
|
||||
if field not in mv_line_dict:
|
||||
mv_line_dict[field] = 0.0
|
||||
if mv_line_dict.get('counterpart_move_line_id'):
|
||||
mv_line = aml_obj.browse(cr, uid, mv_line_dict.get('counterpart_move_line_id'), context=context)
|
||||
if mv_line.reconcile_id:
|
||||
raise osv.except_osv(_('Error!'), _('A selected move line was already reconciled.'))
|
||||
|
||||
# Create the move
|
||||
move_name = st_line.statement_id.name + "/" + str(st_line.sequence)
|
||||
move_vals = bs_obj._prepare_move(cr, uid, st_line, move_name, context=context)
|
||||
move_id = am_obj.create(cr, uid, move_vals, context=context)
|
||||
|
||||
# Create the move line for the statement line
|
||||
amount = currency_obj.compute(cr, uid, st_line.statement_id.currency.id, company_currency.id, st_line.amount, context=context)
|
||||
bank_st_move_vals = bs_obj._prepare_bank_move_line(cr, uid, st_line, move_id, amount, company_currency.id, context=context)
|
||||
aml_obj.create(cr, uid, bank_st_move_vals, context=context)
|
||||
# Complete the dicts
|
||||
st_line_currency = st_line.currency_id or statement_currency
|
||||
st_line_currency_rate = st_line.currency_id and statement_currency.id == company_currency.id and (st_line.amount_currency / st_line.amount) or False
|
||||
to_create = []
|
||||
for mv_line_dict in mv_line_dicts:
|
||||
mv_line_dict['ref'] = move_name
|
||||
mv_line_dict['move_id'] = move_id
|
||||
mv_line_dict['period_id'] = st_line.statement_id.period_id.id
|
||||
mv_line_dict['journal_id'] = st_line.journal_id.id
|
||||
mv_line_dict['company_id'] = st_line.company_id.id
|
||||
mv_line_dict['statement_id'] = st_line.statement_id.id
|
||||
if mv_line_dict.get('counterpart_move_line_id'):
|
||||
mv_line = aml_obj.browse(cr, uid, mv_line_dict['counterpart_move_line_id'], context=context)
|
||||
mv_line_dict['account_id'] = mv_line.account_id.id
|
||||
if st_line_currency.id != company_currency.id:
|
||||
mv_line_dict['amount_currency'] = mv_line_dict['debit'] - mv_line_dict['credit']
|
||||
mv_line_dict['currency_id'] = st_line_currency.id
|
||||
if st_line.currency_id and statement_currency.id == company_currency.id and st_line_currency_rate:
|
||||
debit_at_current_rate = self.pool.get('res.currency').round(cr, uid, company_currency, mv_line_dict['debit'] / st_line_currency_rate)
|
||||
credit_at_current_rate = self.pool.get('res.currency').round(cr, uid, company_currency, mv_line_dict['credit'] / st_line_currency_rate)
|
||||
else:
|
||||
debit_at_current_rate = currency_obj.compute(cr, uid, st_line_currency.id, company_currency.id, mv_line_dict['debit'], context=context)
|
||||
credit_at_current_rate = currency_obj.compute(cr, uid, st_line_currency.id, company_currency.id, mv_line_dict['credit'], context=context)
|
||||
if mv_line_dict.get('counterpart_move_line_id'):
|
||||
#post an account line that use the same currency rate than the counterpart (to balance the account) and post the difference in another line
|
||||
ctx = context.copy()
|
||||
ctx['date'] = mv_line.date
|
||||
debit_at_old_rate = currency_obj.compute(cr, uid, st_line_currency.id, company_currency.id, mv_line_dict['debit'], context=ctx)
|
||||
credit_at_old_rate = currency_obj.compute(cr, uid, st_line_currency.id, company_currency.id, mv_line_dict['credit'], context=ctx)
|
||||
mv_line_dict['credit'] = credit_at_old_rate
|
||||
mv_line_dict['debit'] = debit_at_old_rate
|
||||
if debit_at_old_rate - debit_at_current_rate:
|
||||
currency_diff = debit_at_current_rate - debit_at_old_rate
|
||||
to_create.append(self.get_currency_rate_line(cr, uid, st_line, currency_diff, move_id, context=context))
|
||||
if credit_at_old_rate - credit_at_current_rate:
|
||||
currency_diff = credit_at_current_rate - credit_at_old_rate
|
||||
to_create.append(self.get_currency_rate_line(cr, uid, st_line, currency_diff, move_id, context=context))
|
||||
else:
|
||||
mv_line_dict['debit'] = debit_at_current_rate
|
||||
mv_line_dict['credit'] = credit_at_current_rate
|
||||
to_create.append(mv_line_dict)
|
||||
# Create move lines
|
||||
move_line_pairs_to_reconcile = []
|
||||
for mv_line_dict in to_create:
|
||||
counterpart_move_line_id = None # NB : this attribute is irrelevant for aml_obj.create() and needs to be removed from the dict
|
||||
if mv_line_dict.get('counterpart_move_line_id'):
|
||||
counterpart_move_line_id = mv_line_dict['counterpart_move_line_id']
|
||||
del mv_line_dict['counterpart_move_line_id']
|
||||
new_aml_id = aml_obj.create(cr, uid, mv_line_dict, context=context)
|
||||
if counterpart_move_line_id != None:
|
||||
move_line_pairs_to_reconcile.append([new_aml_id, counterpart_move_line_id])
|
||||
|
||||
# Reconcile
|
||||
for pair in move_line_pairs_to_reconcile:
|
||||
# TODO : too slow
|
||||
aml_obj.reconcile_partial(cr, uid, pair, context=context)
|
||||
|
||||
# Mark the statement line as reconciled
|
||||
self.write(cr, uid, id, {'journal_entry_id': move_id}, context=context)
|
||||
|
||||
# FIXME : if it wasn't for the multicompany security settings in account_security.xml, the method would just
|
||||
# return [('journal_entry_id', '=', False)]
|
||||
# Unfortunately, that spawns a "no access rights" error ; it shouldn't.
|
||||
def _needaction_domain_get(self, cr, uid, context=None):
|
||||
user = self.pool.get("res.users").browse(cr, uid, uid)
|
||||
return ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('journal_entry_id', '=', False)]
|
||||
|
||||
_order = "statement_id desc, sequence"
|
||||
_name = "account.bank.statement.line"
|
||||
_description = "Bank Statement Line"
|
||||
_inherit = ['ir.needaction_mixin']
|
||||
_columns = {
|
||||
'name': fields.char('Description', required=True),
|
||||
'date': fields.date('Date', required=True),
|
||||
'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
|
||||
'type': fields.selection([
|
||||
('supplier','Supplier'),
|
||||
('customer','Customer'),
|
||||
('general','General')
|
||||
], 'Type', required=True),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner'),
|
||||
'account_id': fields.many2one('account.account','Account',
|
||||
required=True),
|
||||
'statement_id': fields.many2one('account.bank.statement', 'Statement',
|
||||
select=True, required=True, ondelete='cascade'),
|
||||
'bank_account_id': fields.many2one('res.partner.bank','Bank Account'),
|
||||
'statement_id': fields.many2one('account.bank.statement', 'Statement', select=True, required=True, ondelete='cascade'),
|
||||
'journal_id': fields.related('statement_id', 'journal_id', type='many2one', relation='account.journal', string='Journal', store=True, readonly=True),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
'move_ids': fields.many2many('account.move',
|
||||
'account_bank_statement_line_move_rel', 'statement_line_id','move_id',
|
||||
'Moves'),
|
||||
'ref': fields.char('Reference', size=32),
|
||||
'ref': fields.char('Structured Communication'),
|
||||
'note': fields.text('Notes'),
|
||||
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of bank statement lines."),
|
||||
'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
|
||||
'journal_entry_id': fields.many2one('account.move', 'Journal Entry'),
|
||||
'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')),
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
|
||||
'date': lambda self,cr,uid,context={}: context.get('date', fields.date.context_today(self,cr,uid,context=context)),
|
||||
'type': 'general',
|
||||
}
|
||||
|
||||
class account_statement_operation_template(osv.osv):
|
||||
_name = "account.statement.operation.template"
|
||||
_description = "Preset for the lines that can be created in a bank statement reconciliation"
|
||||
_columns = {
|
||||
'name': fields.char('Button Label', required=True),
|
||||
'account_id': fields.many2one('account.account', 'Account', ondelete='cascade', domain=[('type','!=','view')]),
|
||||
'label': fields.char('Label'),
|
||||
'amount_type': fields.selection([('fixed', 'Fixed'),('percentage_of_total','Percentage of total amount'),('percentage_of_balance', 'Percentage of open balance')],
|
||||
'Amount type', required=True),
|
||||
'amount': fields.float('Amount', digits_compute=dp.get_precision('Account'), help="Leave to 0 to ignore."),
|
||||
'tax_id': fields.many2one('account.tax', 'Tax', ondelete='cascade'),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', ondelete='cascade'),
|
||||
}
|
||||
_defaults = {
|
||||
'amount_type': 'fixed',
|
||||
'amount': 0.0
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="model">account.installer</field>
|
||||
<field name="inherit_id" ref="base.res_config_installer"/>
|
||||
<field name="arch" type="xml">
|
||||
<form position="attributes" version="7.0">
|
||||
<form position="attributes">
|
||||
<attribute name="string">Accounting Application Configuration</attribute>
|
||||
</form>
|
||||
<footer position="replace">
|
||||
|
|
|
@ -216,7 +216,7 @@ class account_invoice(osv.osv):
|
|||
_name = "account.invoice"
|
||||
_inherit = ['mail.thread']
|
||||
_description = 'Invoice'
|
||||
_order = "id desc"
|
||||
_order = "number desc, id desc"
|
||||
_track = {
|
||||
'type': {
|
||||
},
|
||||
|
@ -295,7 +295,8 @@ class account_invoice(osv.osv):
|
|||
},
|
||||
multi='all'),
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}, track_visibility='always'),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]},
|
||||
domain="[('type', 'in', {'out_invoice': ['sale'], 'out_refund': ['sale_refund'], 'in_refund': ['purchase_refund'], 'in_invoice': ['purchase']}.get(type, [])), ('company_id', '=', company_id)]"),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'check_total': fields.float('Verification Total', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean',
|
||||
|
@ -1546,7 +1547,7 @@ class account_invoice_line(osv.osv):
|
|||
context = dict(context)
|
||||
context.update({'company_id': company_id})
|
||||
warning = {}
|
||||
res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context)
|
||||
res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context, company_id=company_id)
|
||||
if not uom:
|
||||
res['value']['price_unit'] = 0.0
|
||||
if product and uom:
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<field name="name">account.invoice.line.form</field>
|
||||
<field name="model">account.invoice.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Invoice Line" version="7.0">
|
||||
<form string="Invoice Line">
|
||||
<group>
|
||||
<group>
|
||||
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
|
||||
|
@ -60,7 +60,7 @@
|
|||
</group>
|
||||
<group>
|
||||
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)" groups="account.group_account_user"/>
|
||||
<field name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" widget="many2many_tags"/>
|
||||
<field name="invoice_line_tax_id" context="{'type':parent.get('type')}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" widget="many2many_tags"/>
|
||||
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
||||
</group>
|
||||
|
@ -90,7 +90,7 @@
|
|||
<field name="name">account.invoice.tax.form</field>
|
||||
<field name="model">account.invoice.tax</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Manual Invoice Taxes" version="7.0">
|
||||
<form string="Manual Invoice Taxes">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
|
@ -142,7 +142,7 @@
|
|||
<field name="model">account.invoice</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Supplier Invoice" version="7.0">
|
||||
<form string="Supplier Invoice">
|
||||
<header>
|
||||
<button name="invoice_open" states="draft,proforma2" string="Validate" class="oe_highlight" groups="account.group_account_invoice"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' states='open,paid' groups="account.group_account_invoice"/>
|
||||
|
@ -291,7 +291,7 @@
|
|||
<field name="name">account.invoice.form</field>
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Invoice" version="7.0">
|
||||
<form string="Invoice">
|
||||
<header>
|
||||
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
|
||||
<button name="invoice_print" string="Print" type="object" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
|
||||
|
@ -462,7 +462,7 @@
|
|||
<field name="period_id" string="Period"/>
|
||||
<separator/>
|
||||
<filter domain="[('user_id','=',uid)]" help="My Invoices"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_by_partner_id" string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter name="commercial_partner_id" string="Commercial Partner" domain="[]" context="{'group_by':'commercial_partner_id'}"/>
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
|
|
|
@ -127,8 +127,8 @@ class account_move_line(osv.osv):
|
|||
|
||||
if move_line.reconcile_id:
|
||||
continue
|
||||
if not move_line.account_id.type in ('payable', 'receivable'):
|
||||
#this function does not suport to be used on move lines not related to payable or receivable accounts
|
||||
if not move_line.account_id.reconcile:
|
||||
#this function does not suport to be used on move lines not related to a reconcilable account
|
||||
continue
|
||||
|
||||
if move_line.currency_id:
|
||||
|
@ -430,7 +430,7 @@ class account_move_line(osv.osv):
|
|||
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):
|
||||
|
@ -491,7 +491,7 @@ class account_move_line(osv.osv):
|
|||
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)
|
||||
}
|
||||
|
||||
|
@ -579,6 +579,9 @@ class account_move_line(osv.osv):
|
|||
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'account_move_line_journal_id_period_id_index\'')
|
||||
if not cr.fetchone():
|
||||
cr.execute('CREATE INDEX account_move_line_journal_id_period_id_index ON account_move_line (journal_id, period_id)')
|
||||
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = %s', ('account_move_line_date_id_index',))
|
||||
if not cr.fetchone():
|
||||
cr.execute('CREATE INDEX account_move_line_date_id_index ON account_move_line (date DESC, id desc)')
|
||||
return res
|
||||
|
||||
def _check_no_view(self, cr, uid, ids, context=None):
|
||||
|
@ -738,6 +741,8 @@ class account_move_line(osv.osv):
|
|||
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('fiscalyear'):
|
||||
args.append(('period_id.fiscalyear_id', '=', context.get('fiscalyear', False)))
|
||||
if context and context.get('next_partner_only', False):
|
||||
if not context.get('partner_id', False):
|
||||
partner = self.list_partners_to_reconcile(cr, uid, context=context)
|
||||
|
@ -765,7 +770,7 @@ class account_move_line(osv.osv):
|
|||
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
|
||||
|
@ -793,9 +798,11 @@ class account_move_line(osv.osv):
|
|||
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)
|
||||
|
@ -818,7 +825,7 @@ class account_move_line(osv.osv):
|
|||
'line_partial_ids': map(lambda x: (4,x,False), merges+unmerge)
|
||||
}, context=context)
|
||||
move_rec_obj.reconcile_partial_check(cr, uid, [r_id] + merges_rec, context=context)
|
||||
return True
|
||||
return r_id
|
||||
|
||||
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context=None):
|
||||
account_obj = self.pool.get('account.account')
|
||||
|
@ -1119,7 +1126,7 @@ class account_move_line(osv.osv):
|
|||
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 ''),
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<field name="name">account.fiscalyear.form</field>
|
||||
<field name="model">account.fiscalyear</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Fiscal year" version="7.0">
|
||||
<form string="Fiscal year">
|
||||
<header>
|
||||
<button name="create_period" states="draft" string="Create Monthly Periods" type="object" class="oe_highlight"/>
|
||||
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" class="oe_highlight"/>
|
||||
|
@ -26,7 +26,7 @@
|
|||
</group>
|
||||
</group>
|
||||
<field colspan="4" name="period_ids" nolabel="1" widget="one2many_list">
|
||||
<form string="Period" version="7.0">
|
||||
<form string="Period">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
|
@ -61,7 +61,7 @@
|
|||
<filter string="Open" domain="[('state','=','draft')]" icon="terp-camera_test"/>
|
||||
<filter string="Closed" domain="[('state','=','done')]" icon="terp-dialog-close"/>
|
||||
<field name="state"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</search>
|
||||
|
@ -94,7 +94,7 @@
|
|||
<field name="name">account.period.form</field>
|
||||
<field name="model">account.period</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Period" version="7.0">
|
||||
<form string="Account Period">
|
||||
<header>
|
||||
<button string="Close Period" name="%(account.action_account_period_close)d" type="action" class="oe_highlight" states="draft"/>
|
||||
<button name="action_draft" states="done" string="Re-Open Period" type="object" groups="account.group_account_manager"/>
|
||||
|
@ -168,7 +168,7 @@
|
|||
<field name="name">account.account.form</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account" version="7.0">
|
||||
<form string="Account">
|
||||
<label for="code" class="oe_edit_only" string="Account Code and Name"/>
|
||||
<h1>
|
||||
<field name="code" class="oe_inline" placeholder="Account code" style="width: 6em"/> -
|
||||
|
@ -232,7 +232,7 @@
|
|||
<filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
|
||||
<filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
|
||||
<field name="user_type"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Account Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'user_type'}"/>
|
||||
<filter string="Internal Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'type'}"/>
|
||||
|
@ -351,7 +351,7 @@
|
|||
<act_window
|
||||
id="action_account_items"
|
||||
name="Journal Items"
|
||||
context="{'search_default_account_id': [active_id]}"
|
||||
context="{'search_default_account_id': [active_id], 'fiscalyear': context.get('fiscalyear')}"
|
||||
res_model="account.move.line"
|
||||
src_model="account.account"
|
||||
key2="tree_but_open"/>
|
||||
|
@ -381,7 +381,7 @@
|
|||
<filter domain="['|', ('type', '=', 'cash'), ('type', '=', 'bank')]" string="Liquidity" icon="terp-dolar"/>
|
||||
<filter domain="['|', ('type', '=', 'general'), ('type', '=', 'situation')]" string="Others" icon="terp-stock"/>
|
||||
<field name="user_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
|
||||
<filter string="Type" context="{'group_by':'type'}" icon="terp-stock_symbol-selection"/>
|
||||
<filter string="Company" context="{'group_by':'company_id'}" icon="terp-go-home" groups="base.group_multi_company"/>
|
||||
|
@ -393,7 +393,7 @@
|
|||
<field name="name">account.journal.form</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Journal" version="7.0">
|
||||
<form string="Account Journal">
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
|
@ -489,6 +489,13 @@
|
|||
src_model="account.journal"/>
|
||||
|
||||
<!-- Bank statement -->
|
||||
|
||||
<record id="action_bank_reconcile_bank_statements" model="ir.actions.client">
|
||||
<field name="name">Reconciliation on Bank Statements</field>
|
||||
<field name="tag">bank_statement_reconciliation_view</field>
|
||||
<field name="context">{'statement_id': active_id}</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_bank_statement_filter" model="ir.ui.view">
|
||||
<field name="name">account.cash.statement.select</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
|
@ -500,7 +507,7 @@
|
|||
<filter string="Open" name="state_open" domain="[('state','=','open')]" icon="terp-check"/>
|
||||
<filter string="Confirmed" name="state_confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
|
||||
<field name="journal_id" domain="[('type', '=', 'cash')]" />
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
|
||||
<filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
|
||||
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
|
||||
|
@ -525,6 +532,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_search" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.search</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
|
@ -536,7 +544,7 @@
|
|||
<filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
|
||||
<field name="period_id"/>
|
||||
<field name="journal_id" domain="[('type', '=', 'bank')]" />
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
|
||||
<filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
|
||||
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
|
||||
|
@ -544,21 +552,29 @@
|
|||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_form" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.form</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bank Statement" version="7.0">
|
||||
<form string="Bank Statement">
|
||||
<header>
|
||||
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" class="oe_highlight"/>
|
||||
<button name="button_dummy" states="draft" string="Compute" type="object" class="oe_highlight"/>
|
||||
<field name="all_lines_reconciled" invisible="1" />
|
||||
<span attrs="{'invisible':['|',('all_lines_reconciled','=',True),('line_ids','=',[])]}">
|
||||
<button name="%(action_bank_reconcile_bank_statements)d" states="draft" string="Reconcile" type="action" class="oe_highlight"/>
|
||||
</span>
|
||||
<span attrs="{'invisible':[('all_lines_reconciled','=',False)]}">
|
||||
<button name="button_confirm_bank" states="draft" string="Close" type="object" class="oe_highlight"/>
|
||||
</span>
|
||||
<button name="button_cancel" states="confirm" string="Cancel Statement" type="object"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_right oe_button_box" name="import_buttons">
|
||||
<!-- Put here related buttons -->
|
||||
<button class="oe_inline oe_stat_button" name="%(action_view_account_statement_from_invoice_lines)d"
|
||||
string="Import Invoice" type="action"
|
||||
attrs="{'invisible':[('state','=','confirm')]}" widget="statinfo" icon="fa-pencil-square-o"/>
|
||||
</div>
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
|
@ -581,41 +597,30 @@
|
|||
<notebook>
|
||||
<page string="Transactions" name="statement_line_ids">
|
||||
<field name="line_ids" context="{'date':date}">
|
||||
<tree editable="bottom" string="Statement lines">
|
||||
<tree editable="bottom" string="Statement lines" colors="grey:journal_entry_id!=False">
|
||||
<field name="sequence" readonly="1" invisible="1"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[
|
||||
<field name="journal_entry_id" invisible="1"/>
|
||||
<field name="date" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
|
||||
<field name="name" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
|
||||
<field name="ref" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
|
||||
<field name="partner_id" domain="[
|
||||
'&',
|
||||
'|',('parent_id','=',False),('is_company','=',True),
|
||||
'|',('customer','=',True),('supplier','=',True)]" context="{'default_supplier': 1}"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/>
|
||||
<field name="amount"/>
|
||||
'|',('customer','=',True),('supplier','=',True)]"
|
||||
context="{'default_supplier': 1}"
|
||||
attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
|
||||
<field name="amount" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
|
||||
<field name="amount_currency" groups="base.group_multi_currency" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
|
||||
<field name="bank_account_id" groups="base.group_no_one"/>
|
||||
</tree>
|
||||
<form string="Statement lines" version="7.0">
|
||||
<group col="4">
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field name="account_id" domain="[('journal_id', '=', parent.journal_id), ('type', '<>', 'view'), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/>
|
||||
<field name="amount"/>
|
||||
<field name="sequence" readonly="0"/>
|
||||
</group>
|
||||
<separator string="Notes"/>
|
||||
<field name="note"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
<group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
|
||||
<div class="oe_subtotal_footer_separator oe_inline">
|
||||
<label for="balance_end" />
|
||||
<button name="button_dummy" states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
|
||||
</div>
|
||||
<field name="balance_end" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
||||
</group>
|
||||
|
@ -682,6 +687,85 @@
|
|||
<field name="domain">[('state','=','draft')]</field>
|
||||
<field name="filter" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record id="action_bank_reconcile" model="ir.actions.client">
|
||||
<field name="name">Reconciliation on Bank Statements</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="tag">bank_statement_reconciliation_view</field>
|
||||
</record>
|
||||
|
||||
<!-- because of the needaction badge, groups needs to be specified -->
|
||||
<menuitem id="menu_bank_reconcile_bank_statements" name="Reconciliation on Bank Statements" parent="account.periodical_processing_reconciliation" groups="group_account_user" action="action_bank_reconcile" sequence="20"/>
|
||||
|
||||
<record id="view_account_statement_operation_template_form" model="ir.ui.view">
|
||||
<field name="name">account.statement.operation.template.form</field>
|
||||
<field name="model">account.statement.operation.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Statement Operation Templates">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="account_id"/>
|
||||
<field name="amount_type"/>
|
||||
<field name="tax_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="label"/>
|
||||
<label for="amount"/>
|
||||
<div>
|
||||
<field name="amount" class="oe_inline" />
|
||||
<label string="%" class="oe_inline" attrs="{'invisible':[('amount_type','not in',('percentage_of_total', 'percentage_of_balance'))]}" />
|
||||
</div>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_account_statement_operation_template_tree" model="ir.ui.view">
|
||||
<field name="name">account.statement.operation.template.tree</field>
|
||||
<field name="model">account.statement.operation.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Bank Reconciliation Move Presets">
|
||||
<field name="name"/>
|
||||
<field name="account_id"/>
|
||||
<field name="amount_type"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_account_statement_operation_template_search" model="ir.ui.view">
|
||||
<field name="name">account.statement.operation.template.search</field>
|
||||
<field name="model">account.statement.operation.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Bank Reconciliation Move preset">
|
||||
<filter string="With tax" domain="[('tax_id','!=',False)]"/>
|
||||
<field name="amount_type"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_account_statement_operation_template" model="ir.actions.act_window">
|
||||
<field name="name">Statement Operation Templates</field>
|
||||
<field name="res_model">account.statement.operation.template</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_account_statement_operation_template_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to create a statement operation template.
|
||||
</p><p>
|
||||
Those can be used to quickly create a move line when reconciling
|
||||
your bank statements.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem action="action_account_statement_operation_template" id="menu_action_account_statement_operation_template" parent="menu_configuration_misc" name="Statement Operation Templates" sequence="22"/>
|
||||
|
||||
<!-- Account Types -->
|
||||
<record id="view_account_type_search" model="ir.ui.view">
|
||||
|
@ -707,7 +791,7 @@
|
|||
<field name="name">account.account.type.form</field>
|
||||
<field name="model">account.account.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Type" version="7.0">
|
||||
<form string="Account Type">
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
|
@ -766,7 +850,7 @@
|
|||
<field name="name">account.move.reconcile.form</field>
|
||||
<field name="model">account.move.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal Entry Reconcile" version="7.0">
|
||||
<form string="Journal Entry Reconcile">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="create_date"/>
|
||||
|
@ -811,7 +895,7 @@
|
|||
<field name="name">account.tax.code.form</field>
|
||||
<field name="model">account.tax.code</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Tax Code" version="7.0">
|
||||
<form string="Account Tax Code">
|
||||
<group>
|
||||
<group col="4" colspan="2">
|
||||
<field name="name"/>
|
||||
|
@ -895,7 +979,7 @@
|
|||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<filter string="Sale" domain="[('type_tax_use','=','sale')]" />
|
||||
<filter string="Purchase" domain="[('type_tax_use','=','purchase')]" />
|
||||
<group string="Group By...">
|
||||
<group string="Group By">
|
||||
<filter string="Company" domain="[]" context="{'group_by':'company_id'}"/>
|
||||
<filter string="Tax Application" domain="[]" context="{'group_by':'type_tax_use'}"/>
|
||||
</group>
|
||||
|
@ -906,7 +990,7 @@
|
|||
<field name="name">account.tax.form</field>
|
||||
<field name="model">account.tax</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Tax" version="7.0">
|
||||
<form string="Account Tax">
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
|
@ -1003,7 +1087,7 @@
|
|||
<field name="model">account.move.line</field>
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal Item" version="7.0">
|
||||
<form string="Journal Item">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
|
@ -1072,7 +1156,7 @@
|
|||
<field name="model">account.move.line</field>
|
||||
<field eval="9" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal Item" version="7.0">
|
||||
<form string="Journal Item">
|
||||
<notebook colspan="4">
|
||||
<page string="Information">
|
||||
<group col="4">
|
||||
|
@ -1119,7 +1203,7 @@
|
|||
<field name="model">account.move.line</field>
|
||||
<field eval="1" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" create="true" on_write="on_create_write" version="7.0" editable="top">
|
||||
<tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" create="true" on_write="on_create_write" editable="top">
|
||||
<field name="journal_id" options='{"no_open":True}' invisible="context.get('journal_id',False)"/>
|
||||
<field name="period_id" options='{"no_open":True}' invisible="context.get('period_id',False)"/>
|
||||
<field name="date"/>
|
||||
|
@ -1174,7 +1258,7 @@
|
|||
<field name="partner_id"/>
|
||||
<field name="journal_id" context="{'journal_id':self}" widget="selection"/> <!-- it's important to keep widget='selection' in this filter viewbecause without that the value passed in the context is not the ID but the textual value (name) of the selected journal -->
|
||||
<field name="period_id" context="{'period_id':self}" widget="selection"/> <!-- it's important to keep the widget='selection' in this field, for the same reason as explained above -->
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
|
||||
|
@ -1220,7 +1304,7 @@
|
|||
<field eval="24" name="priority"/>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false" version="7.0">
|
||||
<tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false">
|
||||
<field name="date"/>
|
||||
<field name="move_id"/>
|
||||
<field name="ref"/>
|
||||
|
@ -1276,7 +1360,7 @@
|
|||
<field name="name">account.move.form</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Entry" version="7.0">
|
||||
<form string="Account Entry">
|
||||
<header>
|
||||
<button name="button_validate" states="draft" string="Post" type="object" class="oe_highlight" groups="account.group_account_invoice"/>
|
||||
<button name="button_cancel" states="posted" string="Cancel Entry" type="object" groups="account.group_account_invoice"/>
|
||||
|
@ -1304,7 +1388,7 @@
|
|||
<page string="Journal Items">
|
||||
<field name="line_id" widget="one2many_list"
|
||||
context="{'line_id': line_id , 'journal_id': journal_id }">
|
||||
<form string="Journal Item" version="7.0">
|
||||
<form string="Journal Item">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
|
@ -1407,7 +1491,7 @@
|
|||
<field name="partner_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
|
@ -1510,7 +1594,7 @@
|
|||
<field name="name">account.model.line.form</field>
|
||||
<field name="model">account.model.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal Entry Model Line" version="7.0">
|
||||
<form string="Journal Entry Model Line">
|
||||
<group col="4">
|
||||
<field colspan="4" name="name"/>
|
||||
<field name="sequence"/>
|
||||
|
@ -1529,7 +1613,7 @@
|
|||
<field name="name">account.model.form</field>
|
||||
<field name="model">account.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal Entry Model" version="7.0">
|
||||
<form string="Journal Entry Model">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="journal_id" on_change="onchange_journal_id(journal_id)"/>
|
||||
|
@ -1564,7 +1648,7 @@
|
|||
<filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
@ -1599,14 +1683,14 @@
|
|||
<field name="name">account.payment.term.line.form</field>
|
||||
<field name="model">account.payment.term.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Payment Term" version="7.0">
|
||||
<form string="Payment Term">
|
||||
<group>
|
||||
<group string="Amount Computation">
|
||||
<field name="value"/>
|
||||
<label for="value_amount" string="Amount To Pay" attrs="{'invisible':[('value','=','balance')]}"/>
|
||||
<div attrs="{'invisible':[('value','=','balance')]}">
|
||||
<field name="value_amount" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="value"/>
|
||||
<label for="value_amount" string="Amount To Pay" attrs="{'invisible':[('value','=','balance')]}"/>
|
||||
<div attrs="{'invisible':[('value','=','balance')]}">
|
||||
<field name="value_amount" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Due Date Computation">
|
||||
<field name="days"/>
|
||||
|
@ -1630,7 +1714,7 @@
|
|||
<field name="name">account.payment.term.form</field>
|
||||
<field name="model">account.payment.term</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Payment Term" version="7.0">
|
||||
<form string="Payment Term">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="active"/>
|
||||
|
@ -1657,7 +1741,7 @@
|
|||
<field name="name">account.subscription.line.form</field>
|
||||
<field name="model">account.subscription.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Subscription lines" version="7.0">
|
||||
<form string="Subscription lines">
|
||||
<group>
|
||||
<field name="date"/>
|
||||
<field name="move_id"/>
|
||||
|
@ -1698,7 +1782,7 @@
|
|||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Subscription"/>
|
||||
<filter icon="terp-camera_test" string="Running" domain="[('state','=','running')]" help="Running Subscription"/>
|
||||
<field name="model_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
|
@ -1709,7 +1793,7 @@
|
|||
<field name="name">account.subscription.form</field>
|
||||
<field name="model">account.subscription</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Recurring" version="7.0">
|
||||
<form string="Recurring">
|
||||
<header>
|
||||
<button name="state_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" />
|
||||
<button name="compute" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific" class="oe_highlight"/>
|
||||
|
@ -1780,7 +1864,7 @@
|
|||
<field name="model">account.subscription.line</field>
|
||||
<field eval="20" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Subscription lines" version="7.0">
|
||||
<form string="Subscription lines">
|
||||
<group col="4">
|
||||
<field name="subscription_id"/>
|
||||
<field name="date"/>
|
||||
|
@ -1811,7 +1895,7 @@
|
|||
<field name="name">account.account.template.form</field>
|
||||
<field name="model">account.account.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Template" version="7.0">
|
||||
<form string="Account Template">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
|
@ -1855,7 +1939,7 @@
|
|||
<field name="parent_id"/>
|
||||
<field name="user_type"/>
|
||||
<field name="type"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Internal Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
|
||||
</group>
|
||||
|
@ -1875,7 +1959,7 @@
|
|||
<field name="name">Create Account</field>
|
||||
<field name="model">account.addtmpl.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Account" version="7.0">
|
||||
<form string="Create Account">
|
||||
<header>
|
||||
<button icon="gtk-ok" name="action_create" string="Add" type="object" class="oe_highlight" />
|
||||
</header>
|
||||
|
@ -1899,7 +1983,7 @@
|
|||
<field name="name">account.chart.template.form</field>
|
||||
<field name="model">account.chart.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Chart of Accounts Template" version="7.0">
|
||||
<form string="Chart of Accounts Template">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="account_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
|
||||
|
@ -1934,7 +2018,7 @@
|
|||
<field name="name" string="Account Template"/>
|
||||
<field name="account_root_id"/>
|
||||
<field name="bank_account_view_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
|
||||
<filter string="Bank Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
|
||||
<filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
|
||||
|
@ -1974,7 +2058,7 @@
|
|||
<field name="name">account.tax.template.form</field>
|
||||
<field name="model">account.tax.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Tax Template" version="7.0">
|
||||
<form string="Account Tax Template">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="description"/>
|
||||
|
@ -2077,7 +2161,7 @@
|
|||
<search string="Search tax template">
|
||||
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Tax Template"/>
|
||||
<field name="parent_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
@ -2087,7 +2171,7 @@
|
|||
<field name="name">account.tax.code.template.form</field>
|
||||
<field name="model">account.tax.code.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Tax Code Template" version="7.0">
|
||||
<form string="Account Tax Code Template">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
|
@ -2115,7 +2199,7 @@
|
|||
<field name="model">wizard.multi.charts.accounts</field>
|
||||
<field name="inherit_id" ref="base.res_config_view_base"/>
|
||||
<field name="arch" type="xml">
|
||||
<form position="attributes" version="7.0">
|
||||
<form position="attributes">
|
||||
<attribute name="string">Accounting Application Configuration</attribute>
|
||||
</form>
|
||||
<group string="res_config_contents" position="replace">
|
||||
|
@ -2183,7 +2267,7 @@
|
|||
<field name="name">account.fiscal.position.template.form</field>
|
||||
<field name="model">account.fiscal.position.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Fiscal Position Template" version="7.0">
|
||||
<form string="Fiscal Position Template">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="chart_template_id"/>
|
||||
|
@ -2193,7 +2277,7 @@
|
|||
<field name="tax_src_id" domain="[('parent_id','=',False)]"/>
|
||||
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
|
||||
</tree>
|
||||
<form string="Taxes Mapping" version="7.0">
|
||||
<form string="Taxes Mapping">
|
||||
<field name="tax_src_id" domain="[('parent_id','=',False)]"/>
|
||||
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
|
||||
</form>
|
||||
|
@ -2203,7 +2287,7 @@
|
|||
<field name="account_src_id"/>
|
||||
<field name="account_dest_id"/>
|
||||
</tree>
|
||||
<form string="Accounts Mapping" version="7.0">
|
||||
<form string="Accounts Mapping">
|
||||
<field name="account_src_id"/>
|
||||
<field name="account_dest_id"/>
|
||||
</form>
|
||||
|
@ -2256,9 +2340,15 @@
|
|||
<field name="model">account.bank.statement</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Statement" version="7.0">
|
||||
<form string="Statement">
|
||||
<header>
|
||||
<button name="button_confirm_cash" states="open" string="Close CashBox" type="object" class="oe_highlight"/>
|
||||
<field name="all_lines_reconciled" invisible="1" />
|
||||
<span attrs="{'invisible':['|',('all_lines_reconciled','=',True),('line_ids','=',[])]}">
|
||||
<button name="%(action_bank_reconcile_bank_statements)d" states="open" string="Reconcile" type="action" class="oe_highlight"/>
|
||||
</span>
|
||||
<span attrs="{'invisible':[('all_lines_reconciled','=',False)]}">
|
||||
<button name="button_confirm_cash" states="open" string="Close CashBox" type="object" class="oe_highlight"/>
|
||||
</span>
|
||||
<button name="button_open" states="draft" string="Open CashBox" type="object" class="oe_highlight"/>
|
||||
<button name="button_cancel" states="confirm,open" string="Cancel CashBox" type="object"/>
|
||||
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
|
||||
|
@ -2288,21 +2378,15 @@
|
|||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]" name="account_id"/>
|
||||
<field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]" groups="analytic.group_analytic_accounting" />
|
||||
<field name="partner_id"/>
|
||||
<field name="amount"/>
|
||||
</tree>
|
||||
<form string="Statement lines" version="7.0">
|
||||
<form string="Statement lines">
|
||||
<group col="4">
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field domain="[('journal_id', '=', parent.journal_id), ('type', '<>', 'view'), ('company_id', '=', parent.company_id)]" name="account_id"/>
|
||||
<field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]" groups="analytic.group_analytic_accounting" />
|
||||
<field name="partner_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
|
@ -2442,7 +2526,7 @@
|
|||
<field name="name">account.financial.report.form</field>
|
||||
<field name="model">account.financial.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Report" version="7.0">
|
||||
<form string="Account Report">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="parent_id"/>
|
||||
|
@ -2484,7 +2568,7 @@
|
|||
<field name="name" string="Account Report"/>
|
||||
<field name="type"/>
|
||||
<field name="account_report_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Parent Report" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- A bank statement -->
|
||||
<record id="demo_bank_statement_1" model="account.bank.statement">
|
||||
<field name="journal_id" ref="account.bank_journal"/>
|
||||
<field name="period_id" ref="account.period_5"/>
|
||||
<field name="date" eval="time.strftime('%Y')+'-01-01'"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="name">BNK/2014/001</field>
|
||||
<field name="balance_end" eval="2040.0"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="balance_start" eval="0.0"/>
|
||||
<field name="balance_end_real" eval="3707.58"/>
|
||||
</record>
|
||||
<record id="demo_bank_statement_line_1" model="account.bank.statement.line">
|
||||
<field name="ref"></field>
|
||||
<field name="statement_id" ref="demo_bank_statement_1"/>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="name">First 2000 € of SAJ/2014/001</field>
|
||||
<field name="journal_id" ref="account.bank_journal"/>
|
||||
<field name="amount" eval="2000.0"/>
|
||||
<field name="date" eval="time.strftime('%Y')+'-01-01'"/>
|
||||
<field name="partner_id" ref="base.res_partner_9"/>
|
||||
</record>
|
||||
<record id="demo_bank_statement_line_2" model="account.bank.statement.line">
|
||||
<field name="ref">SAJ2014002</field>
|
||||
<field name="statement_id" ref="demo_bank_statement_1"/>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="name">SAJ/2014/002</field>
|
||||
<field name="journal_id" ref="account.bank_journal"/>
|
||||
<field name="amount" eval="650.0"/>
|
||||
<field name="date" eval="time.strftime('%Y')+'-01-01'"/>
|
||||
<field name="partner_id" ref="base.res_partner_9"/>
|
||||
</record>
|
||||
<record id="demo_bank_statement_line_3" model="account.bank.statement.line">
|
||||
<field name="ref"></field>
|
||||
<field name="statement_id" ref="demo_bank_statement_1"/>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="name">Bank fees</field>
|
||||
<field name="journal_id" ref="account.bank_journal"/>
|
||||
<field name="amount" eval="32.58"/>
|
||||
<field name="date" eval="time.strftime('%Y')+'-01-01'"/>
|
||||
</record>
|
||||
<record id="demo_bank_statement_line_4" model="account.bank.statement.line">
|
||||
<field name="ref"></field>
|
||||
<field name="statement_id" ref="demo_bank_statement_1"/>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="name">SAJ/2014/003 and SAJ/2014/004</field>
|
||||
<field name="journal_id" ref="account.bank_journal"/>
|
||||
<field name="amount" eval="1025.0"/>
|
||||
<field name="date" eval="time.strftime('%Y')+'-01-01'"/>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
</record>
|
||||
|
||||
<!-- Statement operation templates -->
|
||||
<record id="statement_operation_template_1" model="account.statement.operation.template">
|
||||
<field name="name">Discount For Early Payment</field>
|
||||
<field name="account_id" ref="a_expense"></field>
|
||||
<field name="label">Discount</field>
|
||||
<field name="amount_type">percentage_of_total</field>
|
||||
<field name="amount">-7</field>
|
||||
</record>
|
||||
<record id="statement_operation_template_2" model="account.statement.operation.template">
|
||||
<field name="name">Bank Fees</field>
|
||||
<field name="account_id" ref="a_expense"></field>
|
||||
<field name="label">Bank Fees</field>
|
||||
<field name="amount_type">fixed</field>
|
||||
<field name="amount"></field>
|
||||
</record>
|
||||
<record id="statement_operation_template_3" model="account.statement.operation.template">
|
||||
<field name="name">Profit / Loss</field>
|
||||
<field name="account_id" ref="a_sale"></field>
|
||||
<field name="label">Profit / Loss</field>
|
||||
<field name="amount_type">fixed</field>
|
||||
<field name="amount"></field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -44,5 +44,135 @@
|
|||
<field name="partner_id" ref="base.res_partner_17"/>
|
||||
<field name="name">Zed+ Antivirus</field>
|
||||
</record>
|
||||
|
||||
<!-- Some customer invoices used to show the reconciliation process on the bank statement -->
|
||||
<record id="invoice_1" model="account.invoice">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="journal_id" ref="account.sales_journal"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="type">out_invoice</field>
|
||||
<field name="account_id" ref="a_recv"/>
|
||||
<field name="partner_id" ref="base.res_partner_9"/>
|
||||
</record>
|
||||
<record id="invoice_1_line_1" model="account.invoice.line">
|
||||
<field name="name">Otpez Laptop without OS</field>
|
||||
<field name="invoice_id" ref="invoice_1"/>
|
||||
<field name="price_unit">642</field>
|
||||
<field name="quantity">5</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<record id="invoice_1_line_2" model="account.invoice.line">
|
||||
<field name="name">Linutop</field>
|
||||
<field name="invoice_id" ref="invoice_1"/>
|
||||
<field name="price_unit">280</field>
|
||||
<field name="quantity">5</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<workflow action="invoice_open" model="account.invoice" ref="invoice_1"/>
|
||||
|
||||
<record id="invoice_2" model="account.invoice">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="journal_id" ref="account.sales_journal"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="type">out_invoice</field>
|
||||
<field name="account_id" ref="a_recv"/>
|
||||
<field name="partner_id" ref="base.res_partner_9"/>
|
||||
<field eval="time.strftime('%Y-%m') + '-01'" name="date_invoice"/>
|
||||
</record>
|
||||
<record id="invoice_2_line_1" model="account.invoice.line">
|
||||
<field name="name">8-port Switch</field>
|
||||
<field name="invoice_id" ref="invoice_2"/>
|
||||
<field name="price_unit">50</field>
|
||||
<field name="quantity">3</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<record id="invoice_2_line_2" model="account.invoice.line">
|
||||
<field name="name">30m RJ45 wire</field>
|
||||
<field name="invoice_id" ref="invoice_2"/>
|
||||
<field name="price_unit">25</field>
|
||||
<field name="quantity">20</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<workflow action="invoice_open" model="account.invoice" ref="invoice_2"/>
|
||||
|
||||
<record id="invoice_3" model="account.invoice">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="journal_id" ref="account.sales_journal"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="type">out_invoice</field>
|
||||
<field name="account_id" ref="a_recv"/>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field eval="time.strftime('%Y-%m') + '-08'" name="date_invoice"/>
|
||||
</record>
|
||||
<record id="invoice_3_line_1" model="account.invoice.line">
|
||||
<field name="name">TypeMatrix Dvorak Keyboard</field>
|
||||
<field name="invoice_id" ref="invoice_3"/>
|
||||
<field name="price_unit">90</field>
|
||||
<field name="quantity">5</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<record id="invoice_3_line_2" model="account.invoice.line">
|
||||
<field name="name">Ergonomic Mouse</field>
|
||||
<field name="invoice_id" ref="invoice_3"/>
|
||||
<field name="price_unit">15</field>
|
||||
<field name="quantity">5</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<workflow action="invoice_open" model="account.invoice" ref="invoice_3"/>
|
||||
|
||||
<record id="invoice_4" model="account.invoice">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="journal_id" ref="account.sales_journal"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="type">out_invoice</field>
|
||||
<field name="account_id" ref="a_recv"/>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field eval="time.strftime('%Y-%m') + '-15'" name="date_invoice"/>
|
||||
</record>
|
||||
<record id="invoice_4_line_1" model="account.invoice.line">
|
||||
<field name="name">Desktop Computer Table</field>
|
||||
<field name="invoice_id" ref="invoice_4"/>
|
||||
<field name="price_unit">80</field>
|
||||
<field name="quantity">5</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<record id="invoice_4_line_2" model="account.invoice.line">
|
||||
<field name="name">Desktop Lamp</field>
|
||||
<field name="invoice_id" ref="invoice_4"/>
|
||||
<field name="price_unit">20</field>
|
||||
<field name="quantity">5</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<workflow action="invoice_open" model="account.invoice" ref="invoice_4"/>
|
||||
|
||||
<record id="invoice_5" model="account.invoice">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="journal_id" ref="account.sales_journal"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="type">out_invoice</field>
|
||||
<field name="account_id" ref="a_recv"/>
|
||||
<field name="partner_id" ref="base.res_partner_9"/>
|
||||
<field eval="time.strftime('%Y-%m') + '-08'" name="date_invoice"/>
|
||||
</record>
|
||||
<record id="invoice_5_line_1" model="account.invoice.line">
|
||||
<field name="name">TypeMatrix Dvorak Keyboard</field>
|
||||
<field name="invoice_id" ref="invoice_5"/>
|
||||
<field name="price_unit">90</field>
|
||||
<field name="quantity">5</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<record id="invoice_5_line_2" model="account.invoice.line">
|
||||
<field name="name">Ergonomic Mouse</field>
|
||||
<field name="invoice_id" ref="invoice_5"/>
|
||||
<field name="price_unit">15</field>
|
||||
<field name="quantity">5</field>
|
||||
<field name="account_id" ref="a_sale"/>
|
||||
</record>
|
||||
<workflow action="invoice_open" model="account.invoice" ref="invoice_5"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -33,7 +33,7 @@ class account_fiscal_position(osv.osv):
|
|||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
'account_ids': fields.one2many('account.fiscal.position.account', 'position_id', 'Account Mapping'),
|
||||
'tax_ids': fields.one2many('account.fiscal.position.tax', 'position_id', 'Tax Mapping'),
|
||||
'note': fields.text('Notes', translate=True),
|
||||
'note': fields.text('Notes'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.fiscal.position.form</field>
|
||||
<field name="model">account.fiscal.position</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Fiscal Position" version="7.0">
|
||||
<form string="Fiscal Position">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="active"/>
|
||||
|
@ -105,7 +105,7 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="sales_purchases" position="after" version="7.0">
|
||||
<page name="sales_purchases" position="after">
|
||||
<page string="Accounting" col="4" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}" groups="account.group_account_invoice">
|
||||
<group>
|
||||
<group>
|
||||
|
|
|
@ -1,57 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="product_normal_form_view" model="ir.ui.view">
|
||||
<field name="name">product.normal.form.inherit</field>
|
||||
<field name="model">product.product</field>
|
||||
<record id="product_template_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.form.inherit</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="priority">5</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Sales" position="after">
|
||||
<page string="Accounting" groups="account.group_account_invoice">
|
||||
<group>
|
||||
<label for="categ_id" string="Internal Category"/>
|
||||
<div><field name="categ_id" colspan="3" nolabel="1"/></div>
|
||||
</group>
|
||||
<group name="properties">
|
||||
<group>
|
||||
<field name="property_account_income" domain="[('type','=','other')]" groups="account.group_account_user"
|
||||
attrs="{'readonly': [('is_only_child', '=', False)]}"/>
|
||||
attrs="{'readonly': [('is_product_variant', '=', True)]}"/>
|
||||
<field name="taxes_id" colspan="2" widget="many2many_tags"
|
||||
attrs="{'readonly':[ '|', ('sale_ok','=',0), ('is_only_child', '=', False)]}"/>
|
||||
attrs="{'readonly':[ '|', ('sale_ok','=',0), ('is_product_variant', '=', True)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="property_account_expense" domain="[('type','=','other')]" groups="account.group_account_user"
|
||||
attrs="{'readonly': [('is_only_child', '=', False)]}"/>
|
||||
attrs="{'readonly': [('is_product_variant', '=', True)]}"/>
|
||||
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags"
|
||||
attrs="{'readonly': [('is_only_child', '=', False)]}"/>
|
||||
attrs="{'readonly': [('is_product_variant', '=', True)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.product.form.inherit</field>
|
||||
<record id="product_template_search_view" model="ir.ui.view">
|
||||
<field name="name">product.template.search</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="product.product_template_search_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Accounting">
|
||||
<group name="properties">
|
||||
<group>
|
||||
<field name="property_account_income" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="taxes_id" colspan="2" widget="many2many_tags"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
<field name="product_variant_ids" position="after">
|
||||
<field name="categ_id"/>
|
||||
</field>
|
||||
<xpath expr="//group[@string='Group by...']" position="inside">
|
||||
<filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="view_category_property_form" model="ir.ui.view">
|
||||
<field name="name">product.category.property.form.inherit</field>
|
||||
<field name="model">product.category</field>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<field name="user_id"/>
|
||||
<filter string="Open" domain="[('state','=','open')]" help="Current Accounts"/>
|
||||
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Type" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Template" domain="[]" context="{'group_by':'template_id'}"/>
|
||||
|
@ -127,7 +127,7 @@
|
|||
<field name="model">account.analytic.line</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Entry" version="7.0">
|
||||
<form string="Analytic Entry">
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
|
@ -198,7 +198,7 @@
|
|||
<filter string="My Entries" domain="[('user_id','=',uid)]"/>
|
||||
<field name="account_id"/>
|
||||
<field name="user_id"/>
|
||||
<group string="Group By..." expand="0">
|
||||
<group string="Group By" expand="0">
|
||||
<filter string="Analytic Account" context="{'group_by':'account_id'}"/>
|
||||
<filter string="Fin. Account" context="{'group_by':'general_account_id'}"/>
|
||||
<filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
|
||||
|
@ -243,7 +243,7 @@
|
|||
<field name="name">account.analytic.line.extended_form</field>
|
||||
<field name="model">account.analytic.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Project line" version="7.0">
|
||||
<form string="Project line">
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
|
@ -306,7 +306,7 @@
|
|||
<search string="Analytic Journals">
|
||||
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/>
|
||||
<field name="type"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
@ -317,7 +317,7 @@
|
|||
<field name="name">account.analytic.journal.form</field>
|
||||
<field name="model">account.analytic.journal</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Journal" version="7.0">
|
||||
<form string="Analytic Journal">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Account Analytic Balance</field>
|
||||
<field name="model">account.analytic.balance</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Period" version="7.0">
|
||||
<form string="Select Period">
|
||||
<header>
|
||||
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
|
||||
or
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Chart of Analytic Accounts</field>
|
||||
<field name="model">account.analytic.chart</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Account Charts" version="7.0">
|
||||
<form string="Analytic Account Charts">
|
||||
<group string="Select the Period for Analysis" col="4">
|
||||
<field name="from_date"/>
|
||||
<field name="to_date"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Account Analytic Cost Ledger Journal</field>
|
||||
<field name="model">account.analytic.cost.ledger.journal.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select period" version="7.0">
|
||||
<form string="Select period">
|
||||
<header>
|
||||
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
|
||||
or
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Account Analytic Check</field>
|
||||
<field name="model">account.analytic.cost.ledger</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Period" version="7.0">
|
||||
<form string="Select Period">
|
||||
<header>
|
||||
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
|
||||
or
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Account Analytic Inverted Balance</field>
|
||||
<field name="model">account.analytic.inverted.balance</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Period" version="7.0">
|
||||
<form string="Select Period">
|
||||
<header>
|
||||
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
|
||||
or
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Account Analytic Journal</field>
|
||||
<field name="model">account.analytic.journal.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Period" version="7.0">
|
||||
<form string="Select Period">
|
||||
<group col="4">
|
||||
<field name="date1"/>
|
||||
<field name="date2"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">project.account.analytic.line.form</field>
|
||||
<field name="model">project.account.analytic.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="View Account Analytic Lines" version="7.0">
|
||||
<form string="View Account Analytic Lines">
|
||||
<header>
|
||||
<button string="Open Entries" name="action_open_window" type="object" class="oe_highlight"/>
|
||||
or
|
||||
|
|
|
@ -161,7 +161,7 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
|||
dates_query += ' < %s)'
|
||||
args_list += (form[str(i)]['stop'],)
|
||||
args_list += (self.date_from,)
|
||||
self.cr.execute('''SELECT l.partner_id, SUM(l.debit-l.credit)
|
||||
self.cr.execute('''SELECT l.partner_id, SUM(l.debit-l.credit), l.reconcile_partial_id
|
||||
FROM account_move_line AS l, account_account, account_move am
|
||||
WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)
|
||||
AND (am.state IN %s)
|
||||
|
@ -173,12 +173,24 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
|||
AND account_account.active
|
||||
AND ''' + dates_query + '''
|
||||
AND (l.date <= %s)
|
||||
GROUP BY l.partner_id''', args_list)
|
||||
t = self.cr.fetchall()
|
||||
d = {}
|
||||
for i in t:
|
||||
d[i[0]] = i[1]
|
||||
history.append(d)
|
||||
GROUP BY l.partner_id, l.reconcile_partial_id''', args_list)
|
||||
partners_partial = self.cr.fetchall()
|
||||
partners_amount = dict((i[0],0) for i in partners_partial)
|
||||
for partner_info in partners_partial:
|
||||
if partner_info[2]:
|
||||
# in case of partial reconciliation, we want to keep the left amount in the oldest period
|
||||
self.cr.execute('''SELECT MIN(COALESCE(date_maturity,date)) FROM account_move_line WHERE reconcile_partial_id = %s''', (partner_info[2],))
|
||||
date = self.cr.fetchall()
|
||||
if date and args_list[-3] <= date[0][0] <= args_list[-2]:
|
||||
# partial reconcilation
|
||||
self.cr.execute('''SELECT SUM(l.debit-l.credit)
|
||||
FROM account_move_line AS l
|
||||
WHERE l.reconcile_partial_id = %s''', (partner_info[2],))
|
||||
unreconciled_amount = self.cr.fetchall()
|
||||
partners_amount[partner_info[0]] += unreconciled_amount[0][0]
|
||||
else:
|
||||
partners_amount[partner_info[0]] += partner_info[1]
|
||||
history.append(partners_amount)
|
||||
|
||||
for partner in partners:
|
||||
values = {}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<field name="account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="product_id" />
|
||||
<field name="user_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<field name="partner_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By...">
|
||||
<group expand="1" string="Group By">
|
||||
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':['product_id','product_uom_id'], 'quantity_visible':1}"/>
|
||||
<filter string="Currency" name="group_currency" icon="terp-dolar" context="{'group_by':'currency_id', 'currency_id_visible':1, 'amount_currency_visible':1}"/>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<field name="partner_id"/>
|
||||
<field name="user_id" />
|
||||
<field name="categ_id" filter_domain="[('categ_id', 'child_of', self)]"/>
|
||||
<group expand="1" string="Group By...">
|
||||
<group expand="1" string="Group By">
|
||||
<filter string="Partner" name="partner_id" context="{'group_by':'partner_id','residual_visible':True}"/>
|
||||
<filter string="Commercial Partner" name="commercial_partner_id" context="{'group_by':'commercial_partner_id','residual_visible':True}"/>
|
||||
<filter string="Commercial Partner's Country" name="country_id" context="{'group_by':'country_id'}"/>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<field name="name">report.account.receivable.form</field>
|
||||
<field name="model">report.account.receivable</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Accounts by Type" version="7.0">
|
||||
<form string="Accounts by Type">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<field name="name">account settings</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Configure Accounting" version="7.0" class="oe_form_configuration">
|
||||
<form string="Configure Accounting" class="oe_form_configuration">
|
||||
<header>
|
||||
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
|
||||
or
|
||||
|
|
|
@ -1,100 +1,101 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_product_product_account_user,product.product.account.user,product.model_product_product,group_account_user,1,0,0,0
|
||||
access_account_payment_term,account.payment.term,model_account_payment_term,account.group_account_user,1,0,0,0
|
||||
access_account_payment_term_line,account.payment.term.line,model_account_payment_term_line,account.group_account_user,1,0,0,0
|
||||
access_account_account_type,account.account.type,model_account_account_type,account.group_account_user,1,0,0,0
|
||||
access_account_tax_internal_user,account.tax internal user,model_account_tax,base.group_user,1,0,0,0
|
||||
access_account_account,account.account,model_account_account,account.group_account_user,1,0,0,0
|
||||
access_account_account_user,account.account user,model_account_account,base.group_user,1,0,0,0
|
||||
access_account_account_partner_manager,account.account partner manager,model_account_account,base.group_partner_manager,1,0,0,0
|
||||
access_account_journal_period_manager,account.journal.period manager,model_account_journal_period,account.group_account_manager,1,0,0,0
|
||||
access_account_tax_code,account.tax.code,model_account_tax_code,account.group_account_invoice,1,0,0,0
|
||||
access_account_tax,account.tax,model_account_tax,account.group_account_invoice,1,0,0,0
|
||||
access_account_model,account.model,model_account_model,account.group_account_user,1,1,1,1
|
||||
access_account_model_line,account.model.line,model_account_model_line,account.group_account_user,1,1,1,1
|
||||
access_account_subscription,account.subscription,model_account_subscription,account.group_account_user,1,1,1,1
|
||||
access_account_subscription_line,account.subscription.line,model_account_subscription_line,account.group_account_user,1,1,1,1
|
||||
access_account_subscription_manager,account.subscription manager,model_account_subscription,account.group_account_manager,1,0,0,0
|
||||
access_account_subscription_line_manager,account.subscription.line manager,model_account_subscription_line,account.group_account_manager,1,0,0,0
|
||||
access_account_account_template,account.account.template,model_account_account_template,account.group_account_manager,1,1,1,1
|
||||
access_account_tax_code_template,account.tax.code.template,model_account_tax_code_template,account.group_account_manager,1,1,1,1
|
||||
access_account_chart_template,account.chart.template,model_account_chart_template,account.group_account_manager,1,1,1,1
|
||||
access_account_tax_template,account.tax.template,model_account_tax_template,account.group_account_manager,1,1,1,1
|
||||
access_account_bank_statement,account.bank.statement,model_account_bank_statement,account.group_account_user,1,1,1,1
|
||||
access_account_bank_statement_line,account.bank.statement.line,model_account_bank_statement_line,account.group_account_user,1,1,1,1
|
||||
access_account_analytic_line_manager,account.analytic.line manager,model_account_analytic_line,account.group_account_manager,1,0,0,0
|
||||
access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,base.group_user,1,0,0,0
|
||||
access_account_analytic_journal,account.analytic.journal,model_account_analytic_journal,account.group_account_user,1,0,0,0
|
||||
access_account_analytic_journal_user,account.analytic.journal,model_account_analytic_journal,base.group_user,1,1,1,0
|
||||
access_account_invoice_uinvoice,account.invoice,model_account_invoice,account.group_account_invoice,1,1,1,1
|
||||
access_account_invoice_line_uinvoice,account.invoice.line,model_account_invoice_line,account.group_account_invoice,1,1,1,1
|
||||
access_account_invoice_tax_uinvoice,account.invoice.tax,model_account_invoice_tax,account.group_account_invoice,1,1,1,1
|
||||
access_account_move_uinvoice,account.move,model_account_move,account.group_account_invoice,1,1,1,1
|
||||
access_account_move_line_uinvoice,account.move.line invoice,model_account_move_line,account.group_account_invoice,1,1,1,1
|
||||
access_account_move_reconcile_uinvoice,account.move.reconcile,model_account_move_reconcile,account.group_account_invoice,1,1,1,1
|
||||
access_account_journal_period_uinvoice,account.journal.period,model_account_journal_period,account.group_account_invoice,1,1,1,1
|
||||
access_account_payment_term_manager,account.payment.term,model_account_payment_term,account.group_account_manager,1,1,1,1
|
||||
access_account_payment_term_line_manager,account.payment.term.line,model_account_payment_term_line,account.group_account_manager,1,1,1,1
|
||||
access_account_tax_manager,account.tax,model_account_tax,account.group_account_manager,1,1,1,1
|
||||
access_account_journal_manager,account.journal,model_account_journal,account.group_account_manager,1,1,1,1
|
||||
access_account_journal_invoice,account.journal invoice,model_account_journal,account.group_account_invoice,1,0,0,0
|
||||
access_account_period_manager,account.period,model_account_period,account.group_account_manager,1,1,1,1
|
||||
access_account_period_invoice,account.period invoice,model_account_period,account.group_account_invoice,1,0,0,0
|
||||
access_account_invoice_group_invoice,account.invoice group invoice,model_account_invoice,account.group_account_invoice,1,1,1,1
|
||||
access_account_analytic_journal_manager,account.analytic.journal,model_account_analytic_journal,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscalyear,account.fiscalyear,model_account_fiscalyear,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscalyear_invoice,account.fiscalyear.invoice,model_account_fiscalyear,account.group_account_invoice,1,0,0,0
|
||||
access_account_fiscalyear_partner_manager,account.fiscalyear.partnermanager,model_account_fiscalyear,base.group_partner_manager,1,0,0,0
|
||||
access_account_fiscalyear_employee,account.fiscalyear employee,model_account_fiscalyear,base.group_user,1,0,0,0
|
||||
access_res_currency_account_manager,res.currency account manager,base.model_res_currency,group_account_manager,1,1,1,1
|
||||
access_res_currency_rate_account_manager,res.currency.rate account manager,base.model_res_currency_rate,group_account_manager,1,1,1,1
|
||||
access_res_currency_rate_type_account_manager,res.currency.rate.type account manager,base.model_res_currency_rate_type,group_account_manager,1,1,1,1
|
||||
access_account_invoice_user,account.invoice user,model_account_invoice,base.group_user,1,0,0,0
|
||||
access_account_invoice_user,account.invoice.line user,model_account_invoice_line,base.group_user,1,0,0,0
|
||||
access_account_payment_term_partner_manager,account.payment.term partner manager,model_account_payment_term,base.group_user,1,0,0,0
|
||||
access_account_payment_term_line_partner_manager,account.payment.term.line partner manager,model_account_payment_term_line,base.group_user,1,0,0,0
|
||||
access_account_account_sale_manager,account.account sale manager,model_account_account,base.group_sale_manager,1,0,0,0
|
||||
access_account_fiscal_position_product_manager,account.fiscal.position account.manager,model_account_fiscal_position,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position_tax_product_manager,account.fiscal.position.tax account.manager,model_account_fiscal_position_tax,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position_account_product_manager,account.fiscal.position account.manager,model_account_fiscal_position_account,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position,account.fiscal.position all,model_account_fiscal_position,base.group_user,1,0,0,0
|
||||
access_account_fiscal_position_tax,account.fiscal.position.tax all,model_account_fiscal_position_tax,base.group_user,1,0,0,0
|
||||
access_account_fiscal_position_account,account.fiscal.position all,model_account_fiscal_position_account,base.group_user,1,0,0,0
|
||||
access_account_fiscal_position_template,account.fiscal.position.template,model_account_fiscal_position_template,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position_tax_template,account.fiscal.position.tax.template,model_account_fiscal_position_tax_template,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position_account_template,account.fiscal.position.account.template,model_account_fiscal_position_account_template,account.group_account_manager,1,1,1,1
|
||||
access_account_sequence_fiscal_year_user,account.sequence.fiscalyear user,model_account_sequence_fiscalyear,base.group_user,1,0,0,0
|
||||
access_temp_range,temp.range,model_temp_range,account.group_account_manager,1,0,0,0
|
||||
access_report_aged_receivable,report.aged.receivable,model_report_aged_receivable,account.group_account_manager,1,1,1,1
|
||||
access_report_invoice_created,report.invoice.created,model_report_invoice_created,account.group_account_manager,1,1,1,1
|
||||
access_report_account_type_sales,report.account_type.sales,model_report_account_type_sales,account.group_account_manager,1,1,1,1
|
||||
access_report_account_sales,report.account.sales,model_report_account_sales,account.group_account_manager,1,1,1,1
|
||||
access_account_invoice_report,account.invoice.report,model_account_invoice_report,account.group_account_manager,1,1,1,1
|
||||
access_res_partner_group_account_manager,res_partner group_account_manager,model_res_partner,account.group_account_manager,1,0,0,0
|
||||
access_account_invoice_accountant,account.invoice accountant,model_account_invoice,account.group_account_user,1,0,0,0
|
||||
access_account_tax_code_accountant,account.tax.code accountant,model_account_tax_code,account.group_account_user,1,1,1,1
|
||||
access_account_move_line_manager,account.move.line manager,model_account_move_line,account.group_account_manager,1,0,0,0
|
||||
access_account_move_manager,account.move manager,model_account_move,account.group_account_manager,1,0,0,0
|
||||
access_account_entries_report_manager,account.entries.report,model_account_entries_report,account.group_account_manager,1,1,1,1
|
||||
access_account_entries_report_invoice,account.entries.report,model_account_entries_report,account.group_account_invoice,1,0,0,0
|
||||
access_account_entries_report_employee,account.entries.report employee,model_account_entries_report,base.group_user,1,0,0,0
|
||||
access_analytic_entries_report_manager,analytic.entries.report,model_analytic_entries_report,account.group_account_manager,1,0,0,0
|
||||
access_account_cashbox_line,account.cashbox.line,model_account_cashbox_line,account.group_account_user,1,1,1,1
|
||||
access_account_journal_cashbox_line,account.journal.cashbox.line,model_account_journal_cashbox_line,account.group_account_user,1,1,1,0
|
||||
access_account_invoice_tax_accountant,account.invoice.tax accountant,model_account_invoice_tax,account.group_account_user,1,0,0,0
|
||||
access_account_move_reconcile_manager,account.move.reconcile manager,model_account_move_reconcile,account.group_account_manager,1,0,0,0
|
||||
access_account_analytic_line_invoice,account.analytic.line invoice,model_account_analytic_line,account.group_account_invoice,1,1,1,1
|
||||
access_account_invoice_line_accountant,account.invoice.line accountant,model_account_invoice_line,account.group_account_user,1,0,0,0
|
||||
access_account_account_invoice,account.account invoice,model_account_account,account.group_account_invoice,1,1,1,1
|
||||
access_account_analytic_accountant,account.analytic.account accountant,analytic.model_account_analytic_account,account.group_account_user,1,1,1,1
|
||||
access_account_account_type_invoice,account.account.type invoice,model_account_account_type,account.group_account_invoice,1,1,1,1
|
||||
access_report_account_receivable_invoice,report.account.receivable.invoice,model_report_account_receivable,account.group_account_invoice,1,1,1,1
|
||||
access_account_sequence_fiscal_year_invoice,account.sequence.fiscalyear invoice,model_account_sequence_fiscalyear,account.group_account_invoice,1,1,1,1
|
||||
access_account_tax_sale_manager,account.tax sale manager,model_account_tax,base.group_sale_salesman,1,0,0,0
|
||||
access_account_journal_sale_manager,account.journal sale manager,model_account_journal,base.group_sale_salesman,1,0,0,0
|
||||
access_account_invoice_tax_sale_manager,account.invoice.tax sale manager,model_account_invoice_tax,base.group_sale_salesman,1,0,0,0
|
||||
access_account_sequence_fiscal_year_sale_user,account.sequence.fiscalyear.sale.user,model_account_sequence_fiscalyear,base.group_sale_salesman,1,1,1,0
|
||||
access_account_sequence_fiscal_year_sale_manager,account.sequence.fiscalyear.sale.manager,model_account_sequence_fiscalyear,base.group_sale_manager,1,1,1,1
|
||||
access_account_treasury_report_manager,account.treasury.report.manager,model_account_treasury_report,account.group_account_manager,1,0,0,0
|
||||
access_account_financial_report,account.financial.report,model_account_financial_report,account.group_account_user,1,1,1,1
|
||||
access_account_financial_report_invoice,account.financial.report invoice,model_account_financial_report,account.group_account_invoice,1,0,0,0
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_product_product_account_user,product.product.account.user,product.model_product_product,group_account_user,1,0,0,0
|
||||
access_account_payment_term,account.payment.term,model_account_payment_term,account.group_account_user,1,0,0,0
|
||||
access_account_payment_term_line,account.payment.term.line,model_account_payment_term_line,account.group_account_user,1,0,0,0
|
||||
access_account_account_type,account.account.type,model_account_account_type,account.group_account_user,1,0,0,0
|
||||
access_account_tax_internal_user,account.tax internal user,model_account_tax,base.group_user,1,0,0,0
|
||||
access_account_account,account.account,model_account_account,account.group_account_user,1,0,0,0
|
||||
access_account_account_user,account.account user,model_account_account,base.group_user,1,0,0,0
|
||||
access_account_account_partner_manager,account.account partner manager,model_account_account,base.group_partner_manager,1,0,0,0
|
||||
access_account_journal_period_manager,account.journal.period manager,model_account_journal_period,account.group_account_manager,1,0,0,0
|
||||
access_account_tax_code,account.tax.code,model_account_tax_code,account.group_account_invoice,1,0,0,0
|
||||
access_account_tax,account.tax,model_account_tax,account.group_account_invoice,1,0,0,0
|
||||
access_account_model,account.model,model_account_model,account.group_account_user,1,1,1,1
|
||||
access_account_model_line,account.model.line,model_account_model_line,account.group_account_user,1,1,1,1
|
||||
access_account_subscription,account.subscription,model_account_subscription,account.group_account_user,1,1,1,1
|
||||
access_account_subscription_line,account.subscription.line,model_account_subscription_line,account.group_account_user,1,1,1,1
|
||||
access_account_subscription_manager,account.subscription manager,model_account_subscription,account.group_account_manager,1,0,0,0
|
||||
access_account_subscription_line_manager,account.subscription.line manager,model_account_subscription_line,account.group_account_manager,1,0,0,0
|
||||
access_account_account_template,account.account.template,model_account_account_template,account.group_account_manager,1,1,1,1
|
||||
access_account_tax_code_template,account.tax.code.template,model_account_tax_code_template,account.group_account_manager,1,1,1,1
|
||||
access_account_chart_template,account.chart.template,model_account_chart_template,account.group_account_manager,1,1,1,1
|
||||
access_account_tax_template,account.tax.template,model_account_tax_template,account.group_account_manager,1,1,1,1
|
||||
access_account_bank_statement,account.bank.statement,model_account_bank_statement,account.group_account_user,1,1,1,1
|
||||
access_account_bank_statement_line,account.bank.statement.line,model_account_bank_statement_line,account.group_account_user,1,1,1,1
|
||||
access_account_analytic_line_manager,account.analytic.line manager,model_account_analytic_line,account.group_account_manager,1,0,0,0
|
||||
access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,base.group_user,1,0,0,0
|
||||
access_account_analytic_journal,account.analytic.journal,model_account_analytic_journal,account.group_account_user,1,0,0,0
|
||||
access_account_analytic_journal_user,account.analytic.journal,model_account_analytic_journal,base.group_user,1,1,1,0
|
||||
access_account_invoice_uinvoice,account.invoice,model_account_invoice,account.group_account_invoice,1,1,1,1
|
||||
access_account_invoice_line_uinvoice,account.invoice.line,model_account_invoice_line,account.group_account_invoice,1,1,1,1
|
||||
access_account_invoice_tax_uinvoice,account.invoice.tax,model_account_invoice_tax,account.group_account_invoice,1,1,1,1
|
||||
access_account_move_uinvoice,account.move,model_account_move,account.group_account_invoice,1,1,1,1
|
||||
access_account_move_line_uinvoice,account.move.line invoice,model_account_move_line,account.group_account_invoice,1,1,1,1
|
||||
access_account_move_reconcile_uinvoice,account.move.reconcile,model_account_move_reconcile,account.group_account_invoice,1,1,1,1
|
||||
access_account_journal_period_uinvoice,account.journal.period,model_account_journal_period,account.group_account_invoice,1,1,1,1
|
||||
access_account_payment_term_manager,account.payment.term,model_account_payment_term,account.group_account_manager,1,1,1,1
|
||||
access_account_payment_term_line_manager,account.payment.term.line,model_account_payment_term_line,account.group_account_manager,1,1,1,1
|
||||
access_account_tax_manager,account.tax,model_account_tax,account.group_account_manager,1,1,1,1
|
||||
access_account_journal_manager,account.journal,model_account_journal,account.group_account_manager,1,1,1,1
|
||||
access_account_journal_invoice,account.journal invoice,model_account_journal,account.group_account_invoice,1,0,0,0
|
||||
access_account_period_manager,account.period,model_account_period,account.group_account_manager,1,1,1,1
|
||||
access_account_period_invoice,account.period invoice,model_account_period,account.group_account_invoice,1,0,0,0
|
||||
access_account_invoice_group_invoice,account.invoice group invoice,model_account_invoice,account.group_account_invoice,1,1,1,1
|
||||
access_account_analytic_journal_manager,account.analytic.journal,model_account_analytic_journal,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscalyear,account.fiscalyear,model_account_fiscalyear,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscalyear_invoice,account.fiscalyear.invoice,model_account_fiscalyear,account.group_account_invoice,1,0,0,0
|
||||
access_account_fiscalyear_partner_manager,account.fiscalyear.partnermanager,model_account_fiscalyear,base.group_partner_manager,1,0,0,0
|
||||
access_account_fiscalyear_employee,account.fiscalyear employee,model_account_fiscalyear,base.group_user,1,0,0,0
|
||||
access_res_currency_account_manager,res.currency account manager,base.model_res_currency,group_account_manager,1,1,1,1
|
||||
access_res_currency_rate_account_manager,res.currency.rate account manager,base.model_res_currency_rate,group_account_manager,1,1,1,1
|
||||
access_res_currency_rate_type_account_manager,res.currency.rate.type account manager,base.model_res_currency_rate_type,group_account_manager,1,1,1,1
|
||||
access_account_invoice_user,account.invoice user,model_account_invoice,base.group_user,1,0,0,0
|
||||
access_account_invoice_user,account.invoice.line user,model_account_invoice_line,base.group_user,1,0,0,0
|
||||
access_account_payment_term_partner_manager,account.payment.term partner manager,model_account_payment_term,base.group_user,1,0,0,0
|
||||
access_account_payment_term_line_partner_manager,account.payment.term.line partner manager,model_account_payment_term_line,base.group_user,1,0,0,0
|
||||
access_account_account_sale_manager,account.account sale manager,model_account_account,base.group_sale_manager,1,0,0,0
|
||||
access_account_fiscal_position_product_manager,account.fiscal.position account.manager,model_account_fiscal_position,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position_tax_product_manager,account.fiscal.position.tax account.manager,model_account_fiscal_position_tax,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position_account_product_manager,account.fiscal.position account.manager,model_account_fiscal_position_account,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position,account.fiscal.position all,model_account_fiscal_position,base.group_user,1,0,0,0
|
||||
access_account_fiscal_position_tax,account.fiscal.position.tax all,model_account_fiscal_position_tax,base.group_user,1,0,0,0
|
||||
access_account_fiscal_position_account,account.fiscal.position all,model_account_fiscal_position_account,base.group_user,1,0,0,0
|
||||
access_account_fiscal_position_template,account.fiscal.position.template,model_account_fiscal_position_template,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position_tax_template,account.fiscal.position.tax.template,model_account_fiscal_position_tax_template,account.group_account_manager,1,1,1,1
|
||||
access_account_fiscal_position_account_template,account.fiscal.position.account.template,model_account_fiscal_position_account_template,account.group_account_manager,1,1,1,1
|
||||
access_account_sequence_fiscal_year_user,account.sequence.fiscalyear user,model_account_sequence_fiscalyear,base.group_user,1,0,0,0
|
||||
access_temp_range,temp.range,model_temp_range,account.group_account_manager,1,0,0,0
|
||||
access_report_aged_receivable,report.aged.receivable,model_report_aged_receivable,account.group_account_manager,1,1,1,1
|
||||
access_report_invoice_created,report.invoice.created,model_report_invoice_created,account.group_account_manager,1,1,1,1
|
||||
access_report_account_type_sales,report.account_type.sales,model_report_account_type_sales,account.group_account_manager,1,1,1,1
|
||||
access_report_account_sales,report.account.sales,model_report_account_sales,account.group_account_manager,1,1,1,1
|
||||
access_account_invoice_report,account.invoice.report,model_account_invoice_report,account.group_account_manager,1,1,1,1
|
||||
access_res_partner_group_account_manager,res_partner group_account_manager,model_res_partner,account.group_account_manager,1,0,0,0
|
||||
access_account_invoice_accountant,account.invoice accountant,model_account_invoice,account.group_account_user,1,0,0,0
|
||||
access_account_tax_code_accountant,account.tax.code accountant,model_account_tax_code,account.group_account_user,1,1,1,1
|
||||
access_account_move_line_manager,account.move.line manager,model_account_move_line,account.group_account_manager,1,0,0,0
|
||||
access_account_move_manager,account.move manager,model_account_move,account.group_account_manager,1,0,0,0
|
||||
access_account_entries_report_manager,account.entries.report,model_account_entries_report,account.group_account_manager,1,1,1,1
|
||||
access_account_entries_report_invoice,account.entries.report,model_account_entries_report,account.group_account_invoice,1,0,0,0
|
||||
access_account_entries_report_employee,account.entries.report employee,model_account_entries_report,base.group_user,1,0,0,0
|
||||
access_analytic_entries_report_manager,analytic.entries.report,model_analytic_entries_report,account.group_account_manager,1,0,0,0
|
||||
access_account_cashbox_line,account.cashbox.line,model_account_cashbox_line,account.group_account_user,1,1,1,1
|
||||
access_account_journal_cashbox_line,account.journal.cashbox.line,model_account_journal_cashbox_line,account.group_account_user,1,1,1,0
|
||||
access_account_invoice_tax_accountant,account.invoice.tax accountant,model_account_invoice_tax,account.group_account_user,1,0,0,0
|
||||
access_account_move_reconcile_manager,account.move.reconcile manager,model_account_move_reconcile,account.group_account_manager,1,0,0,0
|
||||
access_account_analytic_line_invoice,account.analytic.line invoice,model_account_analytic_line,account.group_account_invoice,1,1,1,1
|
||||
access_account_invoice_line_accountant,account.invoice.line accountant,model_account_invoice_line,account.group_account_user,1,0,0,0
|
||||
access_account_account_invoice,account.account invoice,model_account_account,account.group_account_invoice,1,1,1,1
|
||||
access_account_analytic_accountant,account.analytic.account accountant,analytic.model_account_analytic_account,account.group_account_user,1,1,1,1
|
||||
access_account_account_type_invoice,account.account.type invoice,model_account_account_type,account.group_account_invoice,1,1,1,1
|
||||
access_report_account_receivable_invoice,report.account.receivable.invoice,model_report_account_receivable,account.group_account_invoice,1,1,1,1
|
||||
access_account_sequence_fiscal_year_invoice,account.sequence.fiscalyear invoice,model_account_sequence_fiscalyear,account.group_account_invoice,1,1,1,1
|
||||
access_account_tax_sale_manager,account.tax sale manager,model_account_tax,base.group_sale_salesman,1,0,0,0
|
||||
access_account_journal_sale_manager,account.journal sale manager,model_account_journal,base.group_sale_salesman,1,0,0,0
|
||||
access_account_invoice_tax_sale_manager,account.invoice.tax sale manager,model_account_invoice_tax,base.group_sale_salesman,1,0,0,0
|
||||
access_account_sequence_fiscal_year_sale_user,account.sequence.fiscalyear.sale.user,model_account_sequence_fiscalyear,base.group_sale_salesman,1,1,1,0
|
||||
access_account_sequence_fiscal_year_sale_manager,account.sequence.fiscalyear.sale.manager,model_account_sequence_fiscalyear,base.group_sale_manager,1,1,1,1
|
||||
access_account_treasury_report_manager,account.treasury.report.manager,model_account_treasury_report,account.group_account_manager,1,0,0,0
|
||||
access_account_financial_report,account.financial.report,model_account_financial_report,account.group_account_user,1,1,1,1
|
||||
access_account_financial_report_invoice,account.financial.report invoice,model_account_financial_report,account.group_account_invoice,1,0,0,0
|
||||
access_account_statement_operation_template,account.statement.operation.template,model_account_statement_operation_template,account.group_account_user,1,1,1,1
|
||||
|
|
|
|
@ -0,0 +1,258 @@
|
|||
.openerp .oe_bank_statement_reconciliation {
|
||||
font-size: 12px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
/* icons */ }
|
||||
.openerp .oe_bank_statement_reconciliation h1 {
|
||||
width: 48%;
|
||||
padding: 0 0 0 15px;
|
||||
margin: 0 0 35px 0;
|
||||
float: left;
|
||||
font-size: 2.3em; }
|
||||
.openerp .oe_bank_statement_reconciliation h2 {
|
||||
font-size: 1.8em; }
|
||||
.openerp .oe_bank_statement_reconciliation .progress {
|
||||
width: 49%;
|
||||
margin: 6px 15px 0 0;
|
||||
float: right;
|
||||
position: relative;
|
||||
display: inline-block; }
|
||||
.openerp .oe_bank_statement_reconciliation .progress .progress-text {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 2px;
|
||||
z-index: 10;
|
||||
text-shadow: -1px -1px 0 #f5f5f5, 1px -1px 0 #f5f5f5, -1px 1px 0 #f5f5f5, 1px 1px 0 #f5f5f5; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_form_sheet {
|
||||
position: relative;
|
||||
padding-bottom: 30px; }
|
||||
.openerp .oe_bank_statement_reconciliation .protip {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
bottom: 7px;
|
||||
right: 15px;
|
||||
text-align: right;
|
||||
color: #bbb; }
|
||||
.openerp .oe_bank_statement_reconciliation .done_message {
|
||||
width: 100%;
|
||||
padding: 0 20%;
|
||||
margin-top: 50px;
|
||||
margin-bottom: 50px; }
|
||||
.openerp .oe_bank_statement_reconciliation .done_message h2 {
|
||||
margin-bottom: 30px; }
|
||||
.openerp .oe_bank_statement_reconciliation .done_message h2 .congrats_icon {
|
||||
float: right;
|
||||
font-size: 2em;
|
||||
position: relative;
|
||||
top: -0.25em; }
|
||||
.openerp .oe_bank_statement_reconciliation .done_message .achievements {
|
||||
margin-top: 30px;
|
||||
text-align: center;
|
||||
position: relative; }
|
||||
.openerp .oe_bank_statement_reconciliation .done_message .achievements .achievement {
|
||||
font-size: 4em;
|
||||
margin: 0 0.3em;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2); }
|
||||
.openerp .oe_bank_statement_reconciliation .done_message .achievements .achievement i {
|
||||
font-size: 0.5em;
|
||||
color: white;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -0.55em;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center; }
|
||||
.openerp .oe_bank_statement_reconciliation .done_message .action_buttons {
|
||||
text-align: center; }
|
||||
.openerp .oe_bank_statement_reconciliation .glyphicon {
|
||||
font-size: 12px !important; }
|
||||
.openerp .oe_bank_statement_reconciliation .glyphicon.line_info_button {
|
||||
color: #ccc !important; }
|
||||
.openerp .oe_bank_statement_reconciliation .accounting_view .glyphicon-add-remove:before {
|
||||
content: "\2212"; }
|
||||
.openerp .oe_bank_statement_reconciliation .match .glyphicon-add-remove:before {
|
||||
content: "\2b"; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line {
|
||||
margin-bottom: 30px;
|
||||
/* gap between accounting_view and action view */
|
||||
/* popover */
|
||||
/* arrays of move lines */
|
||||
/* Partie infos */
|
||||
/* Match view */
|
||||
/* Action create */ }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line table {
|
||||
width: 100%; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .toggle_match, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .toggle_create {
|
||||
-webkit-transition-property: -webkit-transform;
|
||||
-moz-transition-property: -moz-transform;
|
||||
-ms-transition-property: -ms-transform;
|
||||
-o-transition-property: -o-transform;
|
||||
transition-property: transform;
|
||||
-webkit-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-ms-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .visible_toggle, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line[data-mode="match"] .toggle_match, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line[data-mode="create"] .toggle_create {
|
||||
visibility: visible !important;
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
-o-transform: rotate(90deg);
|
||||
transform: rotate(90deg); }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .change_partner_container {
|
||||
width: 200px;
|
||||
display: none;
|
||||
position: relative !important; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line[data-mode="inactive"] .initial_line > td {
|
||||
background-color: #f8f8f8 !important; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line.no_match:not(.no_partner) .initial_line {
|
||||
cursor: default !important; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line.no_match:not(.no_partner) .initial_line .line_info_button {
|
||||
cursor: pointer; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line.no_match:not(.no_partner) .toggle_match {
|
||||
visibility: hidden !important; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line > table > tbody > tr:nth-child(1) > td table {
|
||||
margin-bottom: 10px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line table.details td:first-child {
|
||||
padding-right: 10px;
|
||||
font-weight: bold; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table {
|
||||
width: 100%; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr {
|
||||
cursor: pointer; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.created_line, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr.created_line {
|
||||
cursor: default !important; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.created_line .line_remove_button, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr.created_line .line_remove_button {
|
||||
cursor: pointer; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td {
|
||||
padding: 1px 8px;
|
||||
vertical-align: middle; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(1), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(7), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(1), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(7) {
|
||||
width: 15px;
|
||||
padding: 0; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(1), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(1) {
|
||||
text-align: left; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(2), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(2) {
|
||||
width: 80px;
|
||||
padding-left: 3px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(3), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(3) {
|
||||
width: 100px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(5), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(5) {
|
||||
text-align: right;
|
||||
width: 15%; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(6), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(6) {
|
||||
width: 15%;
|
||||
text-align: right;
|
||||
padding-right: 3px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(7), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(7) {
|
||||
text-align: right; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.line_open_balance, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr.line_open_balance {
|
||||
color: #bbb; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr .glyphicon:not(.line_info_button), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr .glyphicon:not(.line_info_button) {
|
||||
visibility: hidden;
|
||||
color: #555; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr:hover .glyphicon, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.active .glyphicon, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr:hover .glyphicon, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr.active .glyphicon {
|
||||
visibility: visible; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr .do_partial_reconcile_button, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr .do_partial_reconcile_button {
|
||||
color: #f0ad4e;
|
||||
padding-right: 5px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr .undo_partial_reconcile_button, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr .undo_partial_reconcile_button {
|
||||
color: #555;
|
||||
padding-right: 5px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view .initial_line > td {
|
||||
border-top: 1px solid #bbbbbb;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 5px;
|
||||
background-color: #f0f0f0;
|
||||
-webkit-transition-property: background-color;
|
||||
-moz-transition-property: background-color;
|
||||
-ms-transition-property: background-color;
|
||||
transition-property: background-color; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view .initial_line > td:nth-child(1), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view .initial_line > td:nth-child(7) {
|
||||
border-top: none;
|
||||
background: white !important;
|
||||
padding-top: 6px;
|
||||
padding-bottom: 3px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption {
|
||||
text-align: left;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
height: 26px;
|
||||
margin: 0 15px 4px 15px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption .button_ok {
|
||||
float: right; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption .button_ok:disabled {
|
||||
opacity: 0.5; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption > span, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption > input {
|
||||
position: relative;
|
||||
top: 7px;
|
||||
/* meh */
|
||||
font-weight: bold;
|
||||
cursor: pointer; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(6) {
|
||||
border-left: 1px solid black; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls {
|
||||
padding: 0 0 5px 18px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .filter {
|
||||
width: 240px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_left, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_right {
|
||||
display: inline-block;
|
||||
cursor: pointer; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_left {
|
||||
margin-right: 10px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_left.disabled, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_right.disabled {
|
||||
color: #ddd;
|
||||
cursor: default; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .show_more {
|
||||
display: inline-block;
|
||||
margin-left: 18px;
|
||||
margin-top: 5px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create {
|
||||
margin: 0 15px;
|
||||
border: 1px solid #d5d5d5;
|
||||
border-radius: 5px;
|
||||
padding: 10px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .quick_add {
|
||||
margin-bottom: 10px;
|
||||
clear: both; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .quick_add:empty {
|
||||
display: none; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .quick_add:empty {
|
||||
display: none; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table {
|
||||
width: 49%;
|
||||
height: 26px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table:nth-child(2n+1) {
|
||||
float: left; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table:nth-child(2n) {
|
||||
float: right; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table th {
|
||||
font-weight: bold;
|
||||
line-height: 26px;
|
||||
padding-right: 8px;
|
||||
min-width: 100px;
|
||||
border-right: 1px solid #ddd;
|
||||
white-space: nowrap;
|
||||
width: 1%; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table td {
|
||||
width: 99%;
|
||||
padding-left: 8px; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table input, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table select {
|
||||
width: 100%; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table.add_line_container:nth-child(2n+1) {
|
||||
width: 98%;
|
||||
float: none;
|
||||
margin: auto; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table.add_line_container td {
|
||||
text-align: center; }
|
||||
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table.add_line_container .add_line {
|
||||
line-height: 26px; }
|
|
@ -0,0 +1,437 @@
|
|||
$actionColWidth: 15px;
|
||||
$mainTableBordersPadding: 3px;
|
||||
$lightBorder: 1px solid #bbb;
|
||||
$accountingBorder: 1px solid #000;
|
||||
$initialLineBackground: #f0f0f0;
|
||||
|
||||
|
||||
.openerp .oe_bank_statement_reconciliation {
|
||||
font-size: 12px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
|
||||
h1 {
|
||||
width: 48%;
|
||||
padding: 0 0 0 $actionColWidth;
|
||||
margin: 0 0 35px 0;
|
||||
float: left;
|
||||
font-size: 2.3em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
.progress {
|
||||
width: 49%;
|
||||
margin: 6px $actionColWidth 0 0;
|
||||
float: right;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
.progress-text {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 2px;
|
||||
z-index: 10;
|
||||
text-shadow:
|
||||
-1px -1px 0 #f5f5f5,
|
||||
1px -1px 0 #f5f5f5,
|
||||
-1px 1px 0 #f5f5f5,
|
||||
1px 1px 0 #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
.oe_form_sheet {
|
||||
position: relative;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.protip {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
bottom: 7px;
|
||||
right: 15px;
|
||||
text-align: right;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.done_message {
|
||||
width: 100%;
|
||||
padding: 0 20%;
|
||||
margin-top: 50px;
|
||||
margin-bottom: 50px;
|
||||
|
||||
h2 {
|
||||
margin-bottom: 30px;
|
||||
|
||||
.congrats_icon {
|
||||
float: right;
|
||||
font-size: 2em;
|
||||
position: relative;
|
||||
top: -0.25em;
|
||||
}
|
||||
}
|
||||
|
||||
.achievements {
|
||||
margin-top: 30px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
|
||||
.achievement {
|
||||
font-size: 4em;
|
||||
margin: 0 0.3em;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
|
||||
|
||||
i {
|
||||
font-size: 0.5em;
|
||||
color: white;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -0.55em;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
//text-shadow: 1px 1px 0 black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.action_buttons {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* icons */
|
||||
.glyphicon {
|
||||
font-size: 12px !important;
|
||||
|
||||
&.line_info_button {
|
||||
color: #ccc !important;
|
||||
}
|
||||
}
|
||||
.accounting_view .glyphicon-add-remove:before {
|
||||
content: "\2212";
|
||||
}
|
||||
.match .glyphicon-add-remove:before {
|
||||
content: "\2b";
|
||||
}
|
||||
|
||||
// bankStatementReconciliationLine widget
|
||||
.oe_bank_statement_reconciliation_line {
|
||||
margin-bottom: 30px;
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// modes : default
|
||||
.toggle_match, .toggle_create {
|
||||
-webkit-transition-property: -webkit-transform;
|
||||
-moz-transition-property: -moz-transform;
|
||||
-ms-transition-property: -ms-transform;
|
||||
-o-transition-property: -o-transform;
|
||||
transition-property: transform;
|
||||
-webkit-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-ms-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.visible_toggle {
|
||||
visibility: visible !important;
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
-o-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.change_partner_container {
|
||||
width: 200px;
|
||||
display: none;
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
// modes : specific
|
||||
&[data-mode="match"] {
|
||||
.toggle_match {
|
||||
@extend .visible_toggle;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-mode="create"] {
|
||||
.toggle_create {
|
||||
@extend .visible_toggle;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-mode="inactive"] {
|
||||
.initial_line > td {
|
||||
background-color: ($initialLineBackground + #080808) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.no_match:not(.no_partner) {
|
||||
.initial_line {
|
||||
cursor: default !important;
|
||||
|
||||
.line_info_button {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.toggle_match {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* gap between accounting_view and action view */
|
||||
> table > tbody > tr:nth-child(1) > td table {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* popover */
|
||||
table.details {
|
||||
td:first-child {
|
||||
padding-right: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
/* arrays of move lines */
|
||||
.accounting_view, .match table {
|
||||
width: 100%;
|
||||
|
||||
tr {
|
||||
cursor: pointer;
|
||||
|
||||
&.created_line {
|
||||
cursor: default !important;
|
||||
|
||||
.line_remove_button {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 1px 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
td:nth-child(1), td:nth-child(7) {
|
||||
width: $actionColWidth;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
td:nth-child(1) {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td:nth-child(2) {
|
||||
width: 80px;
|
||||
padding-left: $mainTableBordersPadding;
|
||||
}
|
||||
|
||||
td:nth-child(3) {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
td:nth-child(4) {
|
||||
|
||||
}
|
||||
|
||||
td:nth-child(5) {
|
||||
text-align: right;
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
td:nth-child(6) {
|
||||
width: 15%;
|
||||
text-align: right;
|
||||
padding-right: $mainTableBordersPadding;
|
||||
}
|
||||
|
||||
td:nth-child(7) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
tr.line_open_balance {
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
tr .glyphicon:not(.line_info_button) {
|
||||
visibility: hidden;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
tr:hover .glyphicon, tr.active .glyphicon {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
tr .do_partial_reconcile_button {
|
||||
color: #f0ad4e;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
tr .undo_partial_reconcile_button {
|
||||
color: #555;
|
||||
padding-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Partie infos */
|
||||
.accounting_view {
|
||||
|
||||
.initial_line > td {
|
||||
border-top: $lightBorder;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 5px;
|
||||
background-color: $initialLineBackground;
|
||||
-webkit-transition-property: background-color;
|
||||
-moz-transition-property: background-color;
|
||||
-ms-transition-property: background-color;
|
||||
transition-property: background-color;
|
||||
|
||||
&:nth-child(1), &:nth-child(7) {
|
||||
border-top: none;
|
||||
background: white !important;
|
||||
// Hack pour l'alignement au px près
|
||||
padding-top: 6px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
caption {
|
||||
text-align: left;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
height: 26px;
|
||||
margin: 0 $actionColWidth 4px $actionColWidth;
|
||||
|
||||
.button_ok {
|
||||
float: right;
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
> span, > input {
|
||||
position: relative; top: 7px; /* meh */
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
// accounting "T"
|
||||
td:nth-child(6) { border-left: $accountingBorder; }
|
||||
}
|
||||
|
||||
|
||||
/* Match view */
|
||||
.match {
|
||||
|
||||
.match_controls {
|
||||
padding: 0 0 5px ($actionColWidth+$mainTableBordersPadding);
|
||||
|
||||
.filter {
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.pager_control_left, .pager_control_right {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pager_control_left {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.pager_control_left.disabled, .pager_control_right.disabled {
|
||||
color: #ddd;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.show_more {
|
||||
display: inline-block;
|
||||
margin-left: ($actionColWidth+$mainTableBordersPadding);
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Action create */
|
||||
.create {
|
||||
margin: 0 $actionColWidth;
|
||||
border: 1px solid #d5d5d5;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
|
||||
.quick_add {
|
||||
margin-bottom: 10px;
|
||||
clear: both;
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.quick_add:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.oe_form > table {
|
||||
width: 49%;
|
||||
height: 26px;
|
||||
|
||||
&:nth-child(2n+1) { float: left; }
|
||||
&:nth-child(2n) { float: right; }
|
||||
|
||||
th {
|
||||
font-weight: bold;
|
||||
line-height: 26px;
|
||||
padding-right: 8px;
|
||||
min-width: 100px;
|
||||
border-right: 1px solid #ddd;
|
||||
white-space: nowrap;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
td {
|
||||
width: 99%;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
input, select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.add_line_container {
|
||||
&:nth-child(2n+1) {
|
||||
width: 98%;
|
||||
float: none;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.add_line {
|
||||
line-height: 26px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
openerp.account = function (instance) {
|
||||
openerp.account.quickadd(instance);
|
||||
var _t = instance.web._t,
|
||||
_lt = instance.web._lt;
|
||||
var QWeb = instance.web.qweb;
|
||||
|
||||
instance.web.account = instance.web.account || {};
|
||||
|
||||
instance.web.views.add('tree_account_reconciliation', 'instance.web.account.ReconciliationListView');
|
||||
instance.web.account.ReconciliationListView = instance.web.ListView.extend({
|
||||
init: function() {
|
||||
this._super.apply(this, arguments);
|
||||
var self = this;
|
||||
this.current_partner = null;
|
||||
this.on('record_selected', this, function() {
|
||||
if (self.get_selected_ids().length === 0) {
|
||||
self.$(".oe_account_recon_reconcile").attr("disabled", "");
|
||||
} else {
|
||||
self.$(".oe_account_recon_reconcile").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
},
|
||||
load_list: function() {
|
||||
var self = this;
|
||||
var tmp = this._super.apply(this, arguments);
|
||||
if (this.partners) {
|
||||
this.$el.prepend(QWeb.render("AccountReconciliation", {widget: this}));
|
||||
this.$(".oe_account_recon_previous").click(function() {
|
||||
self.current_partner = (((self.current_partner - 1) % self.partners.length) + self.partners.length) % self.partners.length;
|
||||
self.search_by_partner();
|
||||
});
|
||||
this.$(".oe_account_recon_next").click(function() {
|
||||
self.current_partner = (self.current_partner + 1) % self.partners.length;
|
||||
self.search_by_partner();
|
||||
});
|
||||
this.$(".oe_account_recon_reconcile").click(function() {
|
||||
self.reconcile();
|
||||
});
|
||||
this.$(".oe_account_recom_mark_as_reconciled").click(function() {
|
||||
self.mark_as_reconciled();
|
||||
});
|
||||
}
|
||||
return tmp;
|
||||
},
|
||||
do_search: function(domain, context, group_by) {
|
||||
var self = this;
|
||||
this.last_domain = domain;
|
||||
this.last_context = context;
|
||||
this.last_group_by = group_by;
|
||||
this.old_search = _.bind(this._super, this);
|
||||
var mod = new instance.web.Model("account.move.line", context, domain);
|
||||
return mod.call("list_partners_to_reconcile", []).then(function(result) {
|
||||
var current = self.current_partner !== null ? self.partners[self.current_partner][0] : null;
|
||||
self.partners = result;
|
||||
var index = _.find(_.range(self.partners.length), function(el) {
|
||||
if (current === self.partners[el][0])
|
||||
return true;
|
||||
});
|
||||
if (index !== undefined)
|
||||
self.current_partner = index;
|
||||
else
|
||||
self.current_partner = self.partners.length == 0 ? null : 0;
|
||||
self.search_by_partner();
|
||||
});
|
||||
},
|
||||
search_by_partner: function() {
|
||||
var self = this;
|
||||
var fct = function() {
|
||||
return self.old_search(new instance.web.CompoundDomain(self.last_domain,
|
||||
[["partner_id", "in", self.current_partner === null ? [] :
|
||||
[self.partners[self.current_partner][0]] ]]), self.last_context, self.last_group_by);
|
||||
};
|
||||
if (self.current_partner === null) {
|
||||
self.last_reconciliation_date = _t("Never");
|
||||
return fct();
|
||||
} else {
|
||||
return new instance.web.Model("res.partner").call("read",
|
||||
[self.partners[self.current_partner][0], ["last_reconciliation_date"]]).then(function(res) {
|
||||
self.last_reconciliation_date =
|
||||
instance.web.format_value(res.last_reconciliation_date, {"type": "datetime"}, _t("Never"));
|
||||
return fct();
|
||||
});
|
||||
}
|
||||
},
|
||||
reconcile: function() {
|
||||
var self = this;
|
||||
var ids = this.get_selected_ids();
|
||||
if (ids.length === 0) {
|
||||
new instance.web.Dialog(this, {
|
||||
title: _t("Warning"),
|
||||
size: 'medium',
|
||||
}, $("<div />").text(_t("You must choose at least one record."))).open();
|
||||
return false;
|
||||
}
|
||||
|
||||
new instance.web.Model("ir.model.data").call("get_object_reference", ["account", "action_view_account_move_line_reconcile"]).then(function(result) {
|
||||
var additional_context = _.extend({
|
||||
active_id: ids[0],
|
||||
active_ids: ids,
|
||||
active_model: self.model
|
||||
});
|
||||
return self.rpc("/web/action/load", {
|
||||
action_id: result[1],
|
||||
context: additional_context
|
||||
}).done(function (result) {
|
||||
result.context = instance.web.pyeval.eval('contexts', [result.context, additional_context]);
|
||||
result.flags = result.flags || {};
|
||||
result.flags.new_window = true;
|
||||
return self.do_action(result, {
|
||||
on_close: function () {
|
||||
self.do_search(self.last_domain, self.last_context, self.last_group_by);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
mark_as_reconciled: function() {
|
||||
var self = this;
|
||||
var id = self.partners[self.current_partner][0];
|
||||
new instance.web.Model("res.partner").call("mark_as_reconciled", [[id]]).then(function() {
|
||||
self.do_search(self.last_domain, self.last_context, self.last_group_by);
|
||||
});
|
||||
},
|
||||
do_select: function (ids, records) {
|
||||
this.trigger('record_selected')
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
});
|
||||
|
||||
};
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,194 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="bank_statement_nothing_to_reconcile">
|
||||
<div class="oe_form_sheetbg"><div class="oe_form_sheet oe_form_sheet_width">
|
||||
<div class="oe_view_nocontent"><p>
|
||||
<b>Good Job!</b> Bank statements are fully reconciled.</p>
|
||||
<p>This page displays all the bank transactions that are to be reconciled and provides with a neat interface to do so.</p>
|
||||
</div>
|
||||
</div></div>
|
||||
</t>
|
||||
|
||||
<t t-name="bank_statement_reconciliation">
|
||||
<div class="oe_form_sheetbg"><div class="oe_form_sheet oe_form_sheet_width">
|
||||
<h1><t t-esc="title"/></h1>
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-text"><span class="valuenow">0</span> / <span class="valuemax"><t t-esc="total_lines"/></span></div>
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" t-att-aria-valuemax="total_lines" style="width: 0%;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_clear"></div>
|
||||
<div class="reconciliation_lines_container"></div>
|
||||
<p class='protip'>Tip : Hit ctrl-enter to validate the whole sheet.</p>
|
||||
</div></div>
|
||||
</t>
|
||||
|
||||
<t t-name="bank_statement_reconciliation_done_message">
|
||||
<div class='done_message'>
|
||||
<h2><t t-raw="title" /></h2>
|
||||
<p>It took you <strong><t t-esc="time_taken" /></strong> to reconcile <strong><t t-esc="transactions_done" /> transactions.<br/></strong> That's on average <t t-esc="sec_per_item" /> seconds per transaction.</p>
|
||||
<t t-if="done_with_ctrl_enter !== 0">
|
||||
<p>You validated <t t-esc="done_with_ctrl_enter" /> reconciliations with the ctrl-enter shortcut.</p>
|
||||
</t>
|
||||
<p class='achievements'>
|
||||
<t t-foreach="achievements" t-as="achievement">
|
||||
<i class='fa fa-certificate achievement' t-att-data-title='achievement.title' t-att-data-content='achievement.desc'><i t-att-class="'fa '+achievement.icon"></i></i>
|
||||
</t>
|
||||
</p>
|
||||
<p class="action_buttons">
|
||||
<t t-if="has_statement_id">
|
||||
<button class="button_back_to_statement">Back to statement</button>
|
||||
<button class="button_close_statement">Close the statement</button>
|
||||
</t>
|
||||
</p>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="bank_statement_reconciliation_line">
|
||||
<table t-att-data-mode="mode">
|
||||
<tr>
|
||||
<td>
|
||||
<table class="accounting_view">
|
||||
<caption>
|
||||
<button class="button_ok"></button>
|
||||
<span class="partner_name"><t t-esc="line.partner_name"/></span>
|
||||
<div class="change_partner_container oe_form"></div>
|
||||
</caption>
|
||||
<tbody class="tbody_initial_line">
|
||||
<tr class="initial_line">
|
||||
<td><span class="toggle_match glyphicon glyphicon-cog"></span></td>
|
||||
<td><t t-esc="line.account_code"/></td>
|
||||
<td><t t-esc="line.date"/></td>
|
||||
<td><t t-esc="line.name"/>
|
||||
<t t-if="line.amount_currency_str"> (<t t-esc="line.amount_currency_str"/>)</t></td>
|
||||
<td><t t-if="line.amount > 0">
|
||||
<t t-esc="line.amount_str"/></t></td>
|
||||
<td><t t-if="line.amount < 0">
|
||||
<t t-esc="line.amount_str"/></t></td>
|
||||
<td><span class="line_info_button glyphicon glyphicon-info-sign" t-att-data-content="line.q_popover"></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody class="tbody_matched_lines"></tbody>
|
||||
<tbody class="tbody_created_lines"></tbody>
|
||||
<tbody class="tbody_open_balance"></tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="action_pane match">
|
||||
<div class="match_controls">
|
||||
<input type="text" class="filter" placeholder="Filter" value="" />
|
||||
<span class="pager_control_right pull-right glyphicon glyphicon-chevron-right"></span>
|
||||
<span class="pager_control_left pull-right glyphicon glyphicon-chevron-left"></span>
|
||||
</div>
|
||||
<table></table>
|
||||
</div>
|
||||
|
||||
<div class="action_pane create">
|
||||
<!-- NB : I use a .quick_add:empty selector. whitespace characters being a node, there shall be none -->
|
||||
<div class="quick_add btn-group btn-group-sm"><t t-foreach="presets" t-as="preset"><button type='button' class='btn btn-default preset' t-att-data-presetid="preset.id"><t t-esc="preset.name"/></button></t></div>
|
||||
<div class="oe_form create_form">
|
||||
<!-- here come some form_create_field -->
|
||||
<table class="create_field add_line_container"><tr><td><a href="javascript:void(0)" class="add_line">New</a></td></tr></table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
|
||||
<t t-name="filter_no_match">
|
||||
<tr><td style='text-align: center;'>No result matching '<t t-esc="filter_str" />'</td></tr>
|
||||
</t>
|
||||
|
||||
<t t-name="form_create_field">
|
||||
<table t-att-class='"create_field create_"+id'><tr>
|
||||
<th><t t-esc="label"/></th>
|
||||
<td class="create_account_container" t-att-class='"create_"+id+"_container"'></td>
|
||||
</tr></table>
|
||||
</t>
|
||||
|
||||
<t t-name="bank_statement_reconciliation_line_details">
|
||||
<table class='details'>
|
||||
<tr><td>Date</td><td><t t-esc="line.date"/></td></tr>
|
||||
<tr><td>Partner</td><td><t t-esc="line.partner_name"/></td></tr>
|
||||
<tr t-if="line.ref"><td>Transaction</td><td><t t-esc="line.ref"/></td></tr>
|
||||
<tr><td>Description</td><td><t t-esc="line.name"/></td></tr>
|
||||
<tr><td>Amount</td><td><t t-esc="line.amount_str"/><t t-if="line.amount_currency_str"> (<t t-esc="line.amount_currency_str"/>)</t></td></tr>
|
||||
<tr><td>Account</td><td><t t-esc="line.account_code"/> <t t-esc="line.account_name"/></td></tr>
|
||||
</table>
|
||||
</t>
|
||||
|
||||
|
||||
<t t-name="bank_statement_reconciliation_move_line">
|
||||
<tr class="mv_line" t-att-data-lineid="line.id" t-att-data-selected="selected">
|
||||
<td><span class="glyphicon glyphicon-add-remove"></span></td>
|
||||
<td><t t-esc="line.account_code"/></td>
|
||||
<td><t t-esc="line.q_due_date"/></td>
|
||||
<td><t t-esc="line.q_label"/></td>
|
||||
|
||||
<td><t t-if="line.debit !== 0">
|
||||
<t t-if="line.propose_partial_reconcile" t-call="icon_do_partial_reconciliation"></t>
|
||||
<t t-if="line.partial_reconcile" t-call="icon_undo_partial_reconciliation"></t>
|
||||
<t t-esc="line.debit_str"/>
|
||||
</t></td>
|
||||
<td><t t-if="line.credit !== 0">
|
||||
<t t-if="line.propose_partial_reconcile"><t t-call="icon_do_partial_reconciliation" /></t>
|
||||
<t t-if="line.partial_reconcile"><t t-call="icon_undo_partial_reconciliation" /></t>
|
||||
<t t-esc="line.credit_str"/>
|
||||
</t></td>
|
||||
<td><span class="line_info_button glyphicon glyphicon-info-sign" t-att-data-content="line.q_popover"></span></td>
|
||||
</tr>
|
||||
</t>
|
||||
|
||||
<t t-name="icon_do_partial_reconciliation">
|
||||
<i class="do_partial_reconcile_button fa fa-exclamation-triangle" data-content="This move's amount is higher than the transaction's amount. Click to do a partial reconciliation"></i>
|
||||
</t>
|
||||
|
||||
<t t-name="icon_undo_partial_reconciliation">
|
||||
<i class="undo_partial_reconcile_button fa fa-exclamation-triangle" data-content="Undo the partial reconciliation."></i>
|
||||
</t>
|
||||
|
||||
<t t-name="bank_statement_reconciliation_move_line_details">
|
||||
<table class='details'>
|
||||
<tr><td>ID</td><td><t t-esc="line.id"/></td></tr>
|
||||
<tr><td>Account</td><td><t t-esc="line.account_code"/> <t t-esc="line.account_name"/></td></tr>
|
||||
<tr><td>Journal</td><td><t t-esc="line.journal_name"/></td></tr>
|
||||
<tr><td>Period</td><td><t t-esc="line.period_name"/></td></tr>
|
||||
<tr><td>Date</td><td><t t-esc="line.date"/></td></tr>
|
||||
<tr><td>Due Date</td><td><t t-esc="line.q_due_date"/></td></tr>
|
||||
<tr><td>Amount</td>
|
||||
<td><t t-if="line.debit !== 0" t-esc="line.debit_str"/><t t-if="line.credit !== 0" t-esc="line.credit_str"/>
|
||||
<t t-if="line.amount_currency_str"> (<t t-esc="line.amount_currency_str"/>)</t>
|
||||
</td></tr>
|
||||
</table>
|
||||
</t>
|
||||
|
||||
|
||||
<t t-name="bank_statement_reconciliation_created_line">
|
||||
<tr class="created_line" t-att-data-lineid="line.id">
|
||||
<td><t t-if="! line.no_remove_action"><span class="line_remove_button glyphicon glyphicon-remove"></span></t></td>
|
||||
<td><t t-esc="line.account_num"/></td>
|
||||
<td></td>
|
||||
<td><t t-esc="line.label"/></td>
|
||||
<td><t t-if="line.amount < 0"><t t-esc="line.amount_str"/></t></td>
|
||||
<td><t t-if="line.amount > 0"><t t-esc="line.amount_str"/></t></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</t>
|
||||
|
||||
<t t-name="bank_statement_reconciliation_line_open_balance">
|
||||
<tr class="line_open_balance">
|
||||
<td><span class="toggle_create glyphicon glyphicon-play"></span></td>
|
||||
<td><t t-esc="account_code"/></td>
|
||||
<td></td>
|
||||
<td class="js_open_balance">Open balance</td>
|
||||
<td><t t-esc="debit"/></td>
|
||||
<td><t t-esc="credit"/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</t>
|
||||
</templates>
|
|
@ -76,4 +76,4 @@
|
|||
I check that the past accounts are taken into account in partner credit
|
||||
-
|
||||
!assert {model: res.partner, id: base.res_partner_2, string: Total Receivable does not takes unreconciled moves of previous years}:
|
||||
- credit == 15.0
|
||||
- credit == 1040.0
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
<link rel="stylesheet" href="/account/static/src/css/account_move_reconciliation.css"/>
|
||||
<link rel="stylesheet" href="/account/static/src/css/account_move_line_quickadd.css"/>
|
||||
<link rel="stylesheet" href="/account/static/src/css/account_bank_and_cash.css"/>
|
||||
<script type="text/javascript" src="/account/static/src/js/account_move_reconciliation.js"></script>
|
||||
<link rel="stylesheet" href="/account/static/src/css/account_bank_statement_reconciliation.css"/>
|
||||
<script type="text/javascript" src="/account/static/src/js/account_widgets.js"></script>
|
||||
<script type="text/javascript" src="/account/static/src/js/account_move_line_quickadd.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
</tr>
|
||||
<tr t-foreach="get_lines_with_out_partner(data['form'])" t-as="not_partner">
|
||||
<td>
|
||||
<span t-esc="partner['name']"/>
|
||||
<span t-esc="not_partner['name']"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-esc="formatLang(not_partner['direction'], currency_obj=res_company.currency_id)"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<t t-call="report.external_layout">
|
||||
<div class="page">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-xs-offset-8">
|
||||
<div class="col-xs-5 col-xs-offset-7">
|
||||
<address t-field="o.partner_id"
|
||||
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' />
|
||||
<span t-field="o.partner_id.vat"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<t t-call="report.external_layout">
|
||||
<div class="page">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-xs-offset-6">
|
||||
<div class="col-xs-5 col-xs-offset-7">
|
||||
<span t-field="o.name"/><br/>
|
||||
<span t-raw="addresses[o.id].replace('\n\n', '\n').replace('\n', '<br>')"/>
|
||||
<span t-field="o.vat"/>
|
||||
|
|
|
@ -63,8 +63,6 @@ import account_report_account_balance
|
|||
|
||||
import account_change_currency
|
||||
|
||||
import pos_box;
|
||||
|
||||
import pos_box
|
||||
import account_statement_from_invoice
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Account Automatic Reconcile</field>
|
||||
<field name="model">account.automatic.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reconciliation" version="7.0">
|
||||
<form string="Reconciliation">
|
||||
<separator string="Reconciliation"/>
|
||||
<label string="For an invoice to be considered as paid, the invoice entries must be reconciled with counterparts, usually payments. With the automatic reconciliation functionality, OpenERP makes its own search for entries to reconcile in a series of accounts. It finds entries for each partner where the amounts correspond."/>
|
||||
<field name="account_ids" domain="[('reconcile','=',1)]"/>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<field name="name">Automatic reconcile unreconcile</field>
|
||||
<field name="model">account.automatic.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reconciliation Result" version="7.0">
|
||||
<form string="Reconciliation Result">
|
||||
<group>
|
||||
<field name="reconciled"/>
|
||||
<field name="unreconciled"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">Change Currency</field>
|
||||
<field name="model">account.change.currency</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Invoice Currency" version="7.0">
|
||||
<form string="Invoice Currency">
|
||||
<group string="This wizard will change the currency of the invoice">
|
||||
<field name="currency_id"/>
|
||||
</group>
|
||||
|
|
|
@ -62,9 +62,10 @@ class account_chart(osv.osv_memory):
|
|||
ORDER BY p.date_stop DESC
|
||||
LIMIT 1) AS period_stop''', (fiscalyear_id, fiscalyear_id))
|
||||
periods = [i[0] for i in cr.fetchall()]
|
||||
if periods and len(periods) > 1:
|
||||
if periods:
|
||||
start_period = periods[0]
|
||||
end_period = periods[1]
|
||||
if len(periods) > 1:
|
||||
end_period = periods[1]
|
||||
res['value'] = {'period_from': start_period, 'period_to': end_period}
|
||||
else:
|
||||
res['value'] = {'period_from': False, 'period_to': False}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">account.chart.form</field>
|
||||
<field name="model">account.chart</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account charts" version="7.0">
|
||||
<form string="Account charts">
|
||||
<group>
|
||||
<label for="fiscalyear"/>
|
||||
<div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">account.fiscalyear.close.state.form</field>
|
||||
<field name="model">account.fiscalyear.close.state</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Close states of Fiscal year and periods" version="7.0">
|
||||
<form string="Close states of Fiscal year and periods">
|
||||
<group>
|
||||
<field name="fy_id" domain="[('state','=','draft')]"/>
|
||||
</group>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">account.fiscalyear.close.form</field>
|
||||
<field name="model">account.fiscalyear.close</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Generate Fiscal Year Opening Entries" version="7.0">
|
||||
<form string="Generate Fiscal Year Opening Entries">
|
||||
<separator string="Generate Fiscal Year Opening Entries"/>
|
||||
<label string="This wizard will generate the end of year journal entries of selected fiscal year. Note that you can run this wizard many times for the same fiscal year: it will simply replace the old opening entries with the new ones."/>
|
||||
<newline/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.invoice.refund.form</field>
|
||||
<field name="model">account.invoice.refund</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Credit Note" version="7.0">
|
||||
<form string="Credit Note">
|
||||
<group>
|
||||
<group colspan="2">
|
||||
<label for="filter_refund"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">account.invoice.confirm.form</field>
|
||||
<field name="model">account.invoice.confirm</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Confirm Draft Invoices" version="7.0">
|
||||
<form string="Confirm Draft Invoices">
|
||||
<p class="oe_grey">
|
||||
Once draft invoices are confirmed, you will not be able
|
||||
to modify them. The invoices will receive a unique
|
||||
|
@ -31,7 +31,7 @@
|
|||
<field name="name">account.invoice.cancel.form</field>
|
||||
<field name="model">account.invoice.cancel</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Cancel Selected Invoices" version="7.0">
|
||||
<form string="Cancel Selected Invoices">
|
||||
<footer>
|
||||
<button string="Cancel Invoices" name="invoice_cancel" type="object" default_focus="1" class="oe_highlight"/>
|
||||
or
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Open Journal Button</field>
|
||||
<field name="model">account.journal.select</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal Select" version="7.0">
|
||||
<form string="Journal Select">
|
||||
<label string="Are you sure you want to open Journal Entries?"/>
|
||||
<footer>
|
||||
<button string="Open Entries" name="action_open_window" type="object" class="oe_highlight"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">account.move.bank.reconcile.form</field>
|
||||
<field name="model">account.move.bank.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bank reconciliation" version="7.0">
|
||||
<form string="Bank reconciliation">
|
||||
<group>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">account.move.line.reconcile.select.form</field>
|
||||
<field name="model">account.move.line.reconcile.select</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reconciliation" version="7.0">
|
||||
<form string="Reconciliation">
|
||||
<group>
|
||||
<field name="account_id"/>
|
||||
</group>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Open Move Line Button</field>
|
||||
<field name="model">account.move.line.select</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Select" version="7.0">
|
||||
<form string="Account Select">
|
||||
<label string="Are you sure you want to open Account move line entries?"/>
|
||||
<footer>
|
||||
<button string="Open Entries" name="open_window" type="object" default_focus="1" class="oe_highlight"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">account.move.line.unreconcile.select.form</field>
|
||||
<field name="model">account.move.line.unreconcile.select</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Unreconciliation" version="7.0">
|
||||
<form string="Unreconciliation">
|
||||
<group>
|
||||
<field name="account_id"/>
|
||||
</group>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">account.open.closed.fiscalyear.form</field>
|
||||
<field name="model">account.open.closed.fiscalyear</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Cancel Fiscal Year Closing Entries" version="7.0">
|
||||
<form string="Cancel Fiscal Year Closing Entries">
|
||||
<separator string="Cancel Fiscal Year Closing Entries"/>
|
||||
<p class="oe_grey">
|
||||
This wizard will remove the end of year journal entries of selected fiscal year. Note that you can run this wizard many times for the same fiscal year.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.period.close.form</field>
|
||||
<field name="model">account.period.close</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Close Period" version="7.0">
|
||||
<form string="Close Period">
|
||||
<group string="Are you sure?">
|
||||
<field name="sure"/>
|
||||
</group>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">Partner Reconcilation Process</field>
|
||||
<field name="model">account.partner.reconcile.process</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Partner Reconciliation" version="7.0">
|
||||
<form string="Partner Reconciliation">
|
||||
<group col="4">
|
||||
<field name="next_partner_id"/>
|
||||
<field name="progress" widget="progressbar" colspan="4"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.move.line.reconcile.full.form</field>
|
||||
<field name="model">account.move.line.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reconciliation" version="7.0">
|
||||
<form string="Reconciliation">
|
||||
<group col="4" string="Reconciliation Transactions">
|
||||
<field name="trans_nbr"/>
|
||||
<newline/>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<field name="name">account.move.line.reconcile.writeoff.form</field>
|
||||
<field name="model">account.move.line.reconcile.writeoff</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Information addendum" version="7.0">
|
||||
<form string="Information addendum">
|
||||
<header>
|
||||
<button string="Reconcile" name="trans_rec_reconcile" type="object" default_focus="1" class="oe_highlight"/>
|
||||
or
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<field name="model">account.aged.trial.balance</field>
|
||||
<!--<field name="inherit_id" ref="account_common_report_view" />-->
|
||||
<field name="arch" type="xml">
|
||||
<form string="Report Options" version="7.0">
|
||||
<form string="Report Options">
|
||||
<separator string="Aged Partner Balance"/>
|
||||
<label string="Aged Partner Balance is a more detailed report of your receivables by intervals. When opening that report, OpenERP asks for the name of the company, the fiscal period and the size of the interval to be analyzed (in days). OpenERP then calculates a table of credit balance by period. So if you request an interval of 30 days OpenERP generates an analysis of creditors for the past month, past two months, and so on. "/>
|
||||
<group col="4">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Common Report</field>
|
||||
<field name="model">account.common.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Report Options" version="7.0">
|
||||
<form string="Report Options">
|
||||
<label string=""/> <!-- binding for inherited views -->
|
||||
<group col="4">
|
||||
<field name="chart_account_id" widget='selection' on_change="onchange_chart_id(chart_account_id, context)"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Account State Open</field>
|
||||
<field name="model">account.state.open</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Open Invoice" version="7.0">
|
||||
<form string="Open Invoice">
|
||||
<label string="Are you sure you want to open this invoice ?"/>
|
||||
<newline/>
|
||||
<label string="(Invoice should be unreconciled if you want to open it)"/>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
import time
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools.translate import _
|
||||
|
||||
class account_statement_from_invoice_lines(osv.osv_memory):
|
||||
"""
|
||||
|
@ -40,7 +39,7 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
|||
statement_id = context.get('statement_id', False)
|
||||
if not statement_id:
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
line_ids = data['line_ids']
|
||||
if not line_ids:
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
@ -49,14 +48,11 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
|||
statement_obj = self.pool.get('account.bank.statement')
|
||||
statement_line_obj = self.pool.get('account.bank.statement.line')
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
voucher_obj = self.pool.get('account.voucher')
|
||||
voucher_line_obj = self.pool.get('account.voucher.line')
|
||||
line_date = time.strftime('%Y-%m-%d')
|
||||
statement = statement_obj.browse(cr, uid, statement_id, context=context)
|
||||
|
||||
# for each selected move lines
|
||||
for line in line_obj.browse(cr, uid, line_ids, context=context):
|
||||
voucher_res = {}
|
||||
ctx = context.copy()
|
||||
# take the date for computation of currency => use payment date
|
||||
ctx['date'] = line_date
|
||||
|
@ -70,55 +66,19 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
|||
if line.amount_currency:
|
||||
amount = currency_obj.compute(cr, uid, line.currency_id.id,
|
||||
statement.currency.id, line.amount_currency, context=ctx)
|
||||
elif (line.invoice and line.invoice.currency_id.id <> statement.currency.id):
|
||||
elif (line.invoice and line.invoice.currency_id.id != statement.currency.id):
|
||||
amount = currency_obj.compute(cr, uid, line.invoice.currency_id.id,
|
||||
statement.currency.id, amount, context=ctx)
|
||||
|
||||
context.update({'move_line_ids': [line.id],
|
||||
'invoice_id': line.invoice.id})
|
||||
type = 'general'
|
||||
ttype = amount < 0 and 'payment' or 'receipt'
|
||||
sign = 1
|
||||
if line.journal_id.type in ('sale', 'sale_refund'):
|
||||
type = 'customer'
|
||||
ttype = 'receipt'
|
||||
elif line.journal_id.type in ('purchase', 'purhcase_refund'):
|
||||
type = 'supplier'
|
||||
ttype = 'payment'
|
||||
sign = -1
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, amount=sign*amount, currency_id= statement.currency.id, ttype=ttype, date=line_date, context=context)
|
||||
voucher_res = { 'type': ttype,
|
||||
'name': line.name,
|
||||
'partner_id': line.partner_id.id,
|
||||
'journal_id': statement.journal_id.id,
|
||||
'account_id': result['value'].get('account_id', statement.journal_id.default_credit_account_id.id),
|
||||
'company_id': statement.company_id.id,
|
||||
'currency_id': statement.currency.id,
|
||||
'date': statement.date,
|
||||
'amount': sign*amount,
|
||||
'payment_rate': result['value']['payment_rate'],
|
||||
'payment_rate_currency_id': result['value']['payment_rate_currency_id'],
|
||||
'period_id':statement.period_id.id}
|
||||
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
|
||||
|
||||
voucher_line_dict = {}
|
||||
for line_dict in result['value']['line_cr_ids'] + result['value']['line_dr_ids']:
|
||||
move_line = line_obj.browse(cr, uid, line_dict['move_line_id'], context)
|
||||
if line.move_id.id == move_line.move_id.id:
|
||||
voucher_line_dict = line_dict
|
||||
|
||||
if voucher_line_dict:
|
||||
voucher_line_dict.update({'voucher_id': voucher_id})
|
||||
voucher_line_obj.create(cr, uid, voucher_line_dict, context=context)
|
||||
statement_line_obj.create(cr, uid, {
|
||||
'name': line.name or '?',
|
||||
'amount': amount,
|
||||
'type': type,
|
||||
'partner_id': line.partner_id.id,
|
||||
'account_id': line.account_id.id,
|
||||
'statement_id': statement_id,
|
||||
'ref': line.ref,
|
||||
'voucher_id': voucher_id,
|
||||
'date': statement.date,
|
||||
}, context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">account.statement.from.invoice.lines.form</field>
|
||||
<field name="model">account.statement.from.invoice.lines</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Import Entries" version="7.0">
|
||||
<form string="Import Entries">
|
||||
<separator string="Payable and Receivables"/>
|
||||
<field height="300" width="700" name="line_ids" domain="[('account_id.type','in',['receivable','payable']),('reconcile_id','=',False), ('reconcile_partial_id','=',False), ('state', '=', 'valid')]"/>
|
||||
<footer>
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.subscription.generate.form</field>
|
||||
<field name="model">account.subscription.generate</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Subscription Compute" version="7.0">
|
||||
<form string="Subscription Compute">
|
||||
<group>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.tax.chart.form</field>
|
||||
<field name="model">account.tax.chart</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account tax charts" version="7.0">
|
||||
<form string="Account tax charts">
|
||||
<group>
|
||||
<label for="period_id"/>
|
||||
<div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Unreconcile Entries</field>
|
||||
<field name="model">account.unreconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Unreconcile" version="7.0">
|
||||
<form string="Unreconcile">
|
||||
<separator string="Unreconcile Transactions"/>
|
||||
<label string="If you unreconcile transactions, you must also verify all the actions that are linked to those transactions because they will not be disabled"/>
|
||||
<footer>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<field name="name">Unreconcile Entries</field>
|
||||
<field name="model">account.unreconcile.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Unreconciliation" version="7.0">
|
||||
<form string="Unreconciliation">
|
||||
<header>
|
||||
<button icon="gtk-ok" string="Unreconcile" name="trans_unrec_reconcile" type="object" default_focus="1" class="oe_highlight" />
|
||||
</header>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.use.model.form</field>
|
||||
<field name="model">account.use.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Entries From Models" version="7.0">
|
||||
<form string="Create Entries From Models">
|
||||
<group>
|
||||
<field name="model"/>
|
||||
</group>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<field name="name">account.use.model.create.entry.form</field>
|
||||
<field name="model">account.use.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Use Model" version="7.0">
|
||||
<form string="Use Model">
|
||||
<label string = "Are you sure you want to create entries?"/>
|
||||
<footer>
|
||||
<button string="Ok" name="create_entries" type="object" default_focus='1' class="oe_highlight"/>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<field name="name">Post Journal Entries</field>
|
||||
<field name="model">validate.account.move</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Post Journal Entries" version="7.0">
|
||||
<form string="Post Journal Entries">
|
||||
<group>
|
||||
<field name="journal_ids"/>
|
||||
<field name="period_ids"/>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<field name="name">Post Journal Entries</field>
|
||||
<field name="model">validate.account.move.lines</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Post Journal Entries" version="7.0">
|
||||
<form string="Post Journal Entries">
|
||||
<separator string="Post Journal Entries"/>
|
||||
<label string="All selected journal entries will be validated and posted. It means you won't be able to modify their accounting fields anymore."/>
|
||||
<footer>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">Account Tax Declaration</field>
|
||||
<field name="model">account.vat.declaration</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Taxes Report" version="7.0">
|
||||
<form string="Taxes Report">
|
||||
<label colspan="4" string="This menu prints a tax declaration based on invoices or payments. Select one or several periods of the fiscal year. The information required for a tax declaration is automatically generated by OpenERP from invoices (or payments, in some countries). This data is updated in real time. That’s very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter."/>
|
||||
<group string="Taxes Report" col="4">
|
||||
<field name="chart_tax_id" widget='selection'/>
|
||||
|
|
|
@ -56,7 +56,6 @@ class CashBoxIn(CashBox):
|
|||
return {
|
||||
'statement_id' : record.id,
|
||||
'journal_id' : record.journal_id.id,
|
||||
'account_id' : record.journal_id.internal_account_id.id,
|
||||
'amount' : box.amount or 0.0,
|
||||
'ref' : '%s' % (box.ref or ''),
|
||||
'name' : box.name,
|
||||
|
@ -73,7 +72,6 @@ class CashBoxOut(CashBox):
|
|||
return {
|
||||
'statement_id' : record.id,
|
||||
'journal_id' : record.journal_id.id,
|
||||
'account_id' : record.journal_id.internal_account_id.id,
|
||||
'amount' : -amount if amount > 0.0 else amount,
|
||||
'name' : box.name,
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">cash_box_in</field>
|
||||
<field name="model">cash.box.in</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Put Money In" version="7.0">
|
||||
<form string="Put Money In">
|
||||
<separator string="Fill in this form if you put money in the cash register:" colspan="4" />
|
||||
<group>
|
||||
<field name="name" class="oe_inline"/>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<field name="name">cash_box_out</field>
|
||||
<field name="model">cash.box.out</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Take Money Out" version="7.0">
|
||||
<form string="Take Money Out">
|
||||
<separator string="Describe why you take money from the cash register:"/>
|
||||
<group>
|
||||
<field name="name" class="oe_inline"/>
|
||||
|
|
|
@ -22,7 +22,6 @@ from dateutil.relativedelta import relativedelta
|
|||
import datetime
|
||||
import logging
|
||||
import time
|
||||
import traceback
|
||||
|
||||
from openerp.osv import osv, fields
|
||||
from openerp.osv.orm import intersect, except_orm
|
||||
|
@ -69,17 +68,23 @@ class account_analytic_invoice_line(osv.osv):
|
|||
if partner_id:
|
||||
part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=local_context)
|
||||
if part.lang:
|
||||
context.update({'lang': part.lang})
|
||||
local_context.update({'lang': part.lang})
|
||||
|
||||
result = {}
|
||||
res = self.pool.get('product.product').browse(cr, uid, product, context=local_context)
|
||||
price = False
|
||||
if price_unit is not False:
|
||||
price = price_unit
|
||||
elif pricelist_id:
|
||||
price = res.price
|
||||
else:
|
||||
if price is False:
|
||||
price = res.list_price
|
||||
result.update({'name': name or res.description or False,'uom_id': uom_id or res.uom_id.id or False, 'price_unit': price})
|
||||
if not name:
|
||||
name = self.pool.get('product.product').name_get(cr, uid, [res.id], context=local_context)[0][1]
|
||||
if res.description_sale:
|
||||
name += '\n'+res.description_sale
|
||||
|
||||
result.update({'name': name or False,'uom_id': uom_id or res.uom_id.id or False, 'price_unit': price})
|
||||
|
||||
res_final = {'value':result}
|
||||
if result['uom_id'] != res.uom_id.id:
|
||||
|
@ -548,18 +553,17 @@ class account_analytic_account(osv.osv):
|
|||
'nodestroy': True,
|
||||
}
|
||||
|
||||
def on_change_template(self, cr, uid, ids, template_id, date_start=False, fix_price_invoices=False, invoice_on_timesheets=False, recurring_invoices=False, context=None):
|
||||
def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None):
|
||||
if not template_id:
|
||||
return {}
|
||||
obj_analytic_line = self.pool.get('account.analytic.invoice.line')
|
||||
res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, date_start=date_start, context=context)
|
||||
|
||||
template = self.browse(cr, uid, template_id, context=context)
|
||||
|
||||
if not fix_price_invoices:
|
||||
if not ids:
|
||||
res['value']['fix_price_invoices'] = template.fix_price_invoices
|
||||
res['value']['amount_max'] = template.amount_max
|
||||
if not invoice_on_timesheets:
|
||||
if not ids:
|
||||
res['value']['invoice_on_timesheets'] = template.invoice_on_timesheets
|
||||
res['value']['hours_qtt_est'] = template.hours_qtt_est
|
||||
|
||||
|
@ -567,7 +571,7 @@ class account_analytic_account(osv.osv):
|
|||
res['value']['to_invoice'] = template.to_invoice.id
|
||||
if template.pricelist_id.id:
|
||||
res['value']['pricelist_id'] = template.pricelist_id.id
|
||||
if not recurring_invoices:
|
||||
if not ids:
|
||||
invoice_line_ids = []
|
||||
for x in template.recurring_invoice_line_ids:
|
||||
invoice_line_ids.append((0, 0, {
|
||||
|
@ -742,29 +746,32 @@ class account_analytic_account(osv.osv):
|
|||
contract_ids = ids
|
||||
else:
|
||||
contract_ids = self.search(cr, uid, [('recurring_next_date','<=', current_date), ('state','=', 'open'), ('recurring_invoices','=', True), ('type', '=', 'contract')])
|
||||
for contract in self.browse(cr, uid, contract_ids, context=context):
|
||||
try:
|
||||
invoice_values = self._prepare_invoice(cr, uid, contract, context=context)
|
||||
invoice_ids.append(self.pool['account.invoice'].create(cr, uid, invoice_values, context=context))
|
||||
next_date = datetime.datetime.strptime(contract.recurring_next_date or current_date, "%Y-%m-%d")
|
||||
interval = contract.recurring_interval
|
||||
if contract.recurring_rule_type == 'daily':
|
||||
new_date = next_date+relativedelta(days=+interval)
|
||||
elif contract.recurring_rule_type == 'weekly':
|
||||
new_date = next_date+relativedelta(weeks=+interval)
|
||||
elif contract.recurring_rule_type == 'monthly':
|
||||
new_date = next_date+relativedelta(months=+interval)
|
||||
else:
|
||||
new_date = next_date+relativedelta(years=+interval)
|
||||
self.write(cr, uid, [contract.id], {'recurring_next_date': new_date.strftime('%Y-%m-%d')}, context=context)
|
||||
if automatic:
|
||||
cr.commit()
|
||||
except Exception:
|
||||
if automatic:
|
||||
cr.rollback()
|
||||
_logger.error(traceback.format_exc())
|
||||
else:
|
||||
raise
|
||||
if contract_ids:
|
||||
cr.execute('SELECT company_id, array_agg(id) as ids FROM account_analytic_account WHERE id IN %s GROUP BY company_id', (tuple(contract_ids),))
|
||||
for company_id, ids in cr.fetchall():
|
||||
for contract in self.browse(cr, uid, ids, context=dict(context, company_id=company_id, force_company=company_id)):
|
||||
try:
|
||||
invoice_values = self._prepare_invoice(cr, uid, contract, context=context)
|
||||
invoice_ids.append(self.pool['account.invoice'].create(cr, uid, invoice_values, context=context))
|
||||
next_date = datetime.datetime.strptime(contract.recurring_next_date or current_date, "%Y-%m-%d")
|
||||
interval = contract.recurring_interval
|
||||
if contract.recurring_rule_type == 'daily':
|
||||
new_date = next_date+relativedelta(days=+interval)
|
||||
elif contract.recurring_rule_type == 'weekly':
|
||||
new_date = next_date+relativedelta(weeks=+interval)
|
||||
elif contract.recurring_rule_type == 'monthly':
|
||||
new_date = next_date+relativedelta(months=+interval)
|
||||
else:
|
||||
new_date = next_date+relativedelta(years=+interval)
|
||||
self.write(cr, uid, [contract.id], {'recurring_next_date': new_date.strftime('%Y-%m-%d')}, context=context)
|
||||
if automatic:
|
||||
cr.commit()
|
||||
except Exception:
|
||||
if automatic:
|
||||
cr.rollback()
|
||||
_logger.exception('Fail to create recurring invoice for contract %s', contract.code)
|
||||
else:
|
||||
raise
|
||||
return invoice_ids
|
||||
|
||||
class account_analytic_account_summary_user(osv.osv):
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
|
||||
<field eval="40" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//div[@name="duration"]' position="after" version="7.0">
|
||||
<xpath expr='//div[@name="duration"]' position="after">
|
||||
<label for="quantity_max"/>
|
||||
<div>
|
||||
<field name="quantity_max"/>
|
||||
|
@ -38,9 +38,6 @@
|
|||
<field name="partner_id" position="attributes">
|
||||
<attribute name="attrs">{'required': [('type','=','contract'),'|','|',('fix_price_invoices','=',True), ('invoice_on_timesheets', '=', True), ('recurring_invoices', '=', True)]}</attribute>
|
||||
</field>
|
||||
<field name="template_id" position="attributes">
|
||||
<attribute name="on_change">on_change_template(template_id, date_start, fix_price_invoices, invoice_on_timesheets, recurring_invoices)</attribute>
|
||||
</field>
|
||||
<xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
|
||||
</xpath>
|
||||
<xpath expr='//separator[@name="description"]' position='before'>
|
||||
|
@ -142,7 +139,8 @@
|
|||
<group>
|
||||
<field name="pricelist_id"
|
||||
class="oe_inline"
|
||||
attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
|
||||
attrs="{'required': [('invoice_on_timesheets', '=', True)]}"
|
||||
domain="[('type', '=', 'sale')]"/>
|
||||
<field name="to_invoice"
|
||||
class="oe_inline"
|
||||
widget="selection"
|
||||
|
@ -169,7 +167,7 @@
|
|||
<div attrs="{'invisible': [('recurring_invoices','=',False)]}">
|
||||
<field name="recurring_invoice_line_ids">
|
||||
<tree string="Account Analytic Lines" editable="bottom">
|
||||
<field name="product_id" on_change="product_id_change(product_id, uom_id, quantity, name, parent.partner_id, price_unit, parent.pricelist_id, parent.company_id)"/>
|
||||
<field name="product_id" on_change="product_id_change(product_id, uom_id, quantity, False, parent.partner_id, False, parent.pricelist_id, parent.company_id)"/>
|
||||
<field name="name"/>
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id"/>
|
||||
|
@ -238,7 +236,7 @@
|
|||
<filter string="Customer Contracts" help="Contracts assigned to a customer." name="has_partner" domain="[('partner_id', '!=', False)]"/>
|
||||
<filter string="Contracts not assigned" help="Contracts that are not assigned to an account manager." domain="[('manager_id', '=', False)]"/>
|
||||
<separator/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Status" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Account Manager" domain="[]" context="{'group_by':'manager_id'}"/>
|
||||
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
|
|
|
@ -39,7 +39,7 @@ class account_analytic_default(osv.osv):
|
|||
'date_stop': fields.date('End Date', help="Default end date for this Analytic Account."),
|
||||
}
|
||||
|
||||
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context=None):
|
||||
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, company_id=None, context=None):
|
||||
domain = []
|
||||
if product_id:
|
||||
domain += ['|', ('product_id', '=', product_id)]
|
||||
|
@ -47,6 +47,9 @@ class account_analytic_default(osv.osv):
|
|||
if partner_id:
|
||||
domain += ['|', ('partner_id', '=', partner_id)]
|
||||
domain += [('partner_id', '=', False)]
|
||||
if company_id:
|
||||
domain += ['|', ('company_id', '=', company_id)]
|
||||
domain += [('company_id', '=', False)]
|
||||
if user_id:
|
||||
domain += ['|',('user_id', '=', user_id)]
|
||||
domain += [('user_id','=', False)]
|
||||
|
@ -59,6 +62,7 @@ class account_analytic_default(osv.osv):
|
|||
index = 0
|
||||
if rec.product_id: index += 1
|
||||
if rec.partner_id: index += 1
|
||||
if rec.company_id: index += 1
|
||||
if rec.user_id: index += 1
|
||||
if rec.date_start: index += 1
|
||||
if rec.date_stop: index += 1
|
||||
|
@ -74,7 +78,7 @@ class account_invoice_line(osv.osv):
|
|||
|
||||
def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
|
||||
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom_id, qty, name, type, partner_id, fposition_id, price_unit, currency_id=currency_id, context=context, company_id=company_id)
|
||||
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
|
||||
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), company_id=company_id, context=context)
|
||||
if rec:
|
||||
res_prod['value'].update({'account_analytic_id': rec.analytic_id.id})
|
||||
else:
|
||||
|
@ -88,7 +92,7 @@ class stock_picking(osv.osv):
|
|||
|
||||
def _get_account_analytic_invoice(self, cursor, user, picking, move_line):
|
||||
partner_id = picking.partner_id and picking.partner_id.id or False
|
||||
rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id , user, time.strftime('%Y-%m-%d'), context={})
|
||||
rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id, user, time.strftime('%Y-%m-%d'))
|
||||
|
||||
if rec:
|
||||
return rec.analytic_id.id
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<field name="name">account.analytic.default.form</field>
|
||||
<field name="model">account.analytic.default</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Defaults" version="7.0">
|
||||
<form string="Analytic Defaults">
|
||||
<group col="4">
|
||||
<field name="analytic_id" required="1" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="sequence"/>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<field name="partner_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="User" icon="terp-personal" context="{'group_by':'user_id'}" help="User"/>
|
||||
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" help="Partner"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}" help="Product" />
|
||||
|
|
|
@ -74,6 +74,7 @@ The analytic plan validates the minimum and maximum percentage at the time of cr
|
|||
'wizard/analytic_plan_create_model_view.xml',
|
||||
'wizard/account_crossovered_analytic_view.xml',
|
||||
'views/report_crossoveredanalyticplans.xml',
|
||||
'views/account_analytic_plans.xml',
|
||||
],
|
||||
'demo': [],
|
||||
'test': ['test/acount_analytic_plans_report.yml'],
|
||||
|
|
|
@ -81,7 +81,7 @@ class account_analytic_plan_line(osv.osv):
|
|||
_order = "sequence, id"
|
||||
_columns = {
|
||||
'plan_id': fields.many2one('account.analytic.plan','Analytic Plan',required=True),
|
||||
'name': fields.char('Plan Name', size=64, required=True, select=True),
|
||||
'name': fields.char('Axis Name', size=64, required=True, select=True),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'root_analytic_id': fields.many2one('account.analytic.account', 'Root Account', help="Root account of this plan.", required=False),
|
||||
'min_required': fields.float('Minimum Allowed (%)'),
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<field name="name">account.analytic.plan.instance.form</field>
|
||||
<field name="model">account.analytic.plan.instance</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Distribution" version="7.0">
|
||||
<form string="Analytic Distribution">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<field name="rate"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
</tree>
|
||||
<form string="Analytic Distribution" version="7.0">
|
||||
<form string="Analytic Distribution">
|
||||
<field name="rate"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
</form>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<field name="name">account.analytic.plan.instance.line.form</field>
|
||||
<field name="model">account.analytic.plan.instance.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Distribution Line" version="7.0">
|
||||
<form string="Analytic Distribution Line">
|
||||
<group col="4">
|
||||
<field name="plan_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
|
@ -160,7 +160,7 @@
|
|||
<field name="name">account.analytic.plan.form</field>
|
||||
<field name="model">account.analytic.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Plan" version="7.0">
|
||||
<form string="Analytic Plan">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="default_instance_id"/>
|
||||
|
@ -204,7 +204,7 @@
|
|||
<field name="name">account.analytic.plan.line.form</field>
|
||||
<field name="model">account.analytic.plan.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Plan Line" version="7.0">
|
||||
<form string="Analytic Plan Line">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
|
@ -233,57 +233,25 @@
|
|||
|
||||
<!-- add property field on default analytic account-->
|
||||
|
||||
<record model="ir.ui.view" id="view_default_inherit_form">
|
||||
<field name="name">account.analytic.default.form.plans</field>
|
||||
<field name="model">account.analytic.default</field>
|
||||
<field name="inherit_id" ref="account_analytic_default.view_account_analytic_default_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="analytic_id" required="1" position="replace">
|
||||
<field name="analytics_id" required="1"/>
|
||||
</field>
|
||||
<record model="ir.ui.view" id="view_default_inherit_form">
|
||||
<field name="name">account.analytic.default.form.plans</field>
|
||||
<field name="model">account.analytic.default</field>
|
||||
<field name="inherit_id" ref="account_analytic_default.view_account_analytic_default_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="analytic_id" required="1" position="replace">
|
||||
<field name="analytics_id" required="1"/>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_default_inherit_tree">
|
||||
<field name="name">account.analytic.default.tree.plans</field>
|
||||
<field name="model">account.analytic.default</field>
|
||||
<field name="inherit_id" ref="account_analytic_default.view_account_analytic_default_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='analytic_id']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='analytic_id']" position="after">
|
||||
<field name="analytics_id" required="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_inherit_form" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.form.inherit</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/tree/field[@name='analytic_account_id']" position="replace">
|
||||
<field name="analytics_id" groups="analytic.group_analytic_accounting"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/form/group/field[@name='analytic_account_id']" position="replace">
|
||||
<field name="analytics_id" groups="analytic.group_analytic_accounting"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_inherit_form2" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.form.inherit</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form2"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/tree/field[@name='analytic_account_id']" position="replace">
|
||||
<field name="analytics_id" groups="analytic.group_analytic_accounting"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/form/group/field[@name='analytic_account_id']" position="replace">
|
||||
<field name="analytics_id" groups="analytic.group_analytic_accounting"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_default_inherit_tree">
|
||||
<field name="name">account.analytic.default.tree.plans</field>
|
||||
<field name="model">account.analytic.default</field>
|
||||
<field name="inherit_id" ref="account_analytic_default.view_account_analytic_default_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='analytic_id']" position="replace">
|
||||
<field name="analytics_id" required="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
openerp.account_analytic_plans = function(instance) {
|
||||
|
||||
var _t = instance.web._t,
|
||||
_lt = instance.web._lt;
|
||||
var QWeb = instance.web.qweb;
|
||||
|
||||
instance.web.account.bankStatementReconciliation.include({
|
||||
|
||||
init: function(parent, context) {
|
||||
this._super(parent, context);
|
||||
delete this.create_form_fields.analytic_account_id;
|
||||
this.create_form_fields["analytic_plan"] = {
|
||||
id: "analytic_plan",
|
||||
index: 4,
|
||||
corresponding_property: "analytics_id",
|
||||
label: _t("Analytic Distribution"),
|
||||
required: false,
|
||||
tabindex: 14,
|
||||
group: "analytic.group_analytic_accounting",
|
||||
constructor: instance.web.form.FieldMany2One,
|
||||
field_properties: {
|
||||
relation: "account.analytic.plan.instance",
|
||||
string: _t("Analytic Distribution"),
|
||||
type: "many2one",
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
start: function() {
|
||||
return this._super().then(function() {
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
};
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- vim:fdn=3:
|
||||
-->
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="assets_backend" name="account analytic plans assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/account_analytic_plans/static/src/js/account_bank_reconciliation.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.crossovered.analytic.form</field>
|
||||
<field name="model">account.crossovered.analytic</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Crossovered Analytic" version="7.0">
|
||||
<form string="Crossovered Analytic">
|
||||
<group col="4">
|
||||
<field name="date1"/>
|
||||
<field name="date2"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">analytic.plan.create.model.msg.form</field>
|
||||
<field name="model">analytic.plan.create.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Distribution Model Saved" version="7.0">
|
||||
<form string="Distribution Model Saved">
|
||||
<label string="Save This Distribution as a Model"/>
|
||||
<footer>
|
||||
<button string="Ok" type="object" name="activate" default_focus="1" class="oe_highlight"/>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<field name="name">analytic.plan.create.model.form</field>
|
||||
<field name="model">analytic.plan.create.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Distribution Model Saved" version="7.0">
|
||||
<form string="Distribution Model Saved">
|
||||
<label string="This distribution model has been saved.You will be able to reuse it later."/>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -1,29 +1,18 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="product_normal_form_view" model="ir.ui.view">
|
||||
<field name="name">product.normal.form.inherit.stock</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="account.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="property_account_expense" position="after">
|
||||
<label string="" colspan="2"/>
|
||||
<field name="property_account_creditor_price_difference" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" />
|
||||
<newline/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.product.form.inherit</field>
|
||||
<field name="name">product.normal.form.inherit.stock</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="account.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="property_account_expense" position="after">
|
||||
<label string="" colspan="2"/>
|
||||
<field name="purchase_ok" invisible="1"/>
|
||||
<field name="property_account_creditor_price_difference" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" />
|
||||
<newline/>
|
||||
</field>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_category_property_form" model="ir.ui.view">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<field name="name">account.asset.category.form</field>
|
||||
<field name="model">account.asset.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Asset category" version="7.0">
|
||||
<form string="Asset category">
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<field name="name">account.asset.asset.form</field>
|
||||
<field name="model">account.asset.asset</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Asset" version="7.0">
|
||||
<form string="Asset">
|
||||
<header>
|
||||
<button name="validate" states="draft" string="Confirm Asset" type="object" class="oe_highlight"/>
|
||||
<button name="set_to_close" states="open" string="Set to Close" type="object" class="oe_highlight"/>
|
||||
|
@ -238,7 +238,7 @@
|
|||
<field name="name">account.asset.history.form</field>
|
||||
<field name="model">account.asset.history</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Asset History" version="7.0">
|
||||
<form string="Asset History">
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By...">
|
||||
<group expand="1" string="Group By">
|
||||
<filter string="Asset" name="asset" context="{'group_by':'asset_id'}"/>
|
||||
<filter string="Asset Category" name="asset_category" icon="terp-stock_symbol-selection" context="{'group_by':'asset_category_id'}"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">wizard.asset.modify.form</field>
|
||||
<field name="model">asset.modify</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Modify Asset" version="7.0">
|
||||
<form string="Modify Asset">
|
||||
<group string="Asset Durations to Modify" col="4">
|
||||
<group colspan="2" col="2">
|
||||
<field name="name"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">asset.depreciation.confirmation.wizard</field>
|
||||
<field name="model">asset.depreciation.confirmation.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Compute Asset" version="7.0">
|
||||
<form string="Compute Asset">
|
||||
<group>
|
||||
<field name="period_id"/>
|
||||
</group>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="name">statement.line.global.form</field>
|
||||
<field name="model">account.bank.statement.line.global</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Batch Payment Info" version="7.0">
|
||||
<form string="Batch Payment Info">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="amount"/>
|
||||
|
@ -42,20 +42,11 @@
|
|||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='date']" position="after">
|
||||
<field name="val_date" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
|
||||
<field name="val_date" invisible="1"/>
|
||||
<field name="globalisation_id" string="Glob. Id" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/group/field[@name='date']" position="after">
|
||||
<field name="val_date"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/group/field[@name='amount']" position="after">
|
||||
<field name="globalisation_id"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -74,10 +65,7 @@
|
|||
<field name="name"/>
|
||||
<field name="statement_id"/>
|
||||
<field name="ref" readonly="1"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field name="account_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type', '<>', 'view')]"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="amount" readonly="1" sum="Total Amount"/>
|
||||
<field name="globalisation_id" string="Glob. Id"/>
|
||||
<field name="globalisation_amount" string="Glob. Am."/>
|
||||
|
@ -90,7 +78,7 @@
|
|||
<field name="name">bank.statement.line.form</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Statement Line" version="7.0">
|
||||
<form string="Statement Line">
|
||||
<group col="4">
|
||||
<field name="statement_id"/>
|
||||
<field name="journal_id"/>
|
||||
|
@ -98,10 +86,7 @@
|
|||
<field name="val_date"/>
|
||||
<field name="name"/>
|
||||
<field name="ref" readonly="0"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field domain="[('type', '<>', 'view')]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type', '<>', 'view')]"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="globalisation_id"/>
|
||||
<field name="sequence" readonly="0"/>
|
||||
|
@ -129,16 +114,14 @@
|
|||
<field name="statement_id"/>
|
||||
<field name="globalisation_id" string="Glob. Id"/>
|
||||
<group string="Extended Filters..." expand="0">
|
||||
<field name="account_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="globalisation_amount" string="Glob. Amount"/>
|
||||
<field name="note"/>
|
||||
</group>
|
||||
<group string="Group By..." expand="1">
|
||||
<group string="Group By" expand="1">
|
||||
<filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-green"/>
|
||||
<filter string="Statement" context="{'group_by':'statement_id'}" icon="terp-folder-orange"/>
|
||||
<filter string="Fin.Account" context="{'group_by':'account_id'}" icon="terp-folder-yellow"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="name">cancel.statement.line.form</field>
|
||||
<field name="model">cancel.statement.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Cancel selected statement lines" version="7.0">
|
||||
<form string="Cancel selected statement lines">
|
||||
<header>
|
||||
<button icon="gtk-execute" string="Cancel Lines" name="cancel_lines" type="object"/>
|
||||
</header>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="name">confirm.statement.line.form</field>
|
||||
<field name="model">confirm.statement.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Confirm selected statement lines" version="7.0">
|
||||
<form string="Confirm selected statement lines">
|
||||
<header>
|
||||
<button string="Confirm Lines" name="confirm_lines" type="object" class="oe_highlight"/>
|
||||
or
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
import datetime
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools import ustr
|
||||
from openerp.tools.translate import _
|
||||
|
||||
import openerp.addons.decimal_precision as dp
|
||||
|
@ -114,7 +115,7 @@ class crossovered_budget_lines(osv.osv):
|
|||
for line in self.browse(cr, uid, ids, context=context):
|
||||
acc_ids = [x.id for x in line.general_budget_id.account_ids]
|
||||
if not acc_ids:
|
||||
raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % str(line.general_budget_id.name))
|
||||
raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % ustr(line.general_budget_id.name))
|
||||
date_to = line.date_to
|
||||
date_from = line.date_from
|
||||
if context.has_key('wizard_date_from'):
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<field name="name">account.budget.post.form.inherit</field>
|
||||
<field name="model">account.budget.post</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Budgetary Position" version="7.0">
|
||||
<form string="Budgetary Position">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
|
@ -69,7 +69,7 @@
|
|||
<field name="theoritical_amount" sum="Theoretical Amount"/>
|
||||
<field name="percentage"/>
|
||||
</tree>
|
||||
<form string="Budget Lines" version="7.0">
|
||||
<form string="Budget Lines">
|
||||
<group col="4">
|
||||
<field name="crossovered_budget_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
|
@ -93,7 +93,7 @@
|
|||
<field name="name">crossovered.budget.view.form</field>
|
||||
<field name="model">crossovered.budget</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Budget" version="7.0">
|
||||
<form string="Budget">
|
||||
<header>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" class="oe_highlight"/>
|
||||
|
@ -138,7 +138,7 @@
|
|||
<field name="theoritical_amount" sum="Theoretical Amount"/>
|
||||
<field name="percentage"/>
|
||||
</tree>
|
||||
<form string="Budget Lines" version="7.0">
|
||||
<form string="Budget Lines">
|
||||
<group>
|
||||
<group>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
|
@ -255,7 +255,7 @@
|
|||
<field name="name">crossovered.budget.line.form</field>
|
||||
<field name="model">crossovered.budget.lines</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Budget Lines" version="7.0">
|
||||
<form string="Budget Lines">
|
||||
<sheet>
|
||||
<group col="4">
|
||||
<field name="crossovered_budget_id"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.budget.analytic.form</field>
|
||||
<field name="model">account.budget.analytic</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Dates Period" version="7.0">
|
||||
<form string="Select Dates Period">
|
||||
<group string="This wizard is used to print budget" col="4">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.budget.crossvered.report.form</field>
|
||||
<field name="model">account.budget.crossvered.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Dates Period" version="7.0">
|
||||
<form string="Select Dates Period">
|
||||
<group string="This wizard is used to print budget" col="4">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.budget.crossvered.summary.report.form</field>
|
||||
<field name="model">account.budget.crossvered.summary.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Dates Period" version="7.0">
|
||||
<form string="Select Dates Period">
|
||||
<group string="This wizard is used to print summary of budgets">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.budget.report.form</field>
|
||||
<field name="model">account.budget.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Dates Period" version="7.0">
|
||||
<form string="Select Dates Period">
|
||||
<group string="Print Budgets" col="4">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="name">account.check.form</field>
|
||||
<field name="model">account.check.write</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Check" version="7.0">
|
||||
<form string="Check">
|
||||
<group col="4">
|
||||
<field name="check_number"/>
|
||||
</group>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue