[MERGE] merge team3's work of sprint 22-23
bzr revid: qdp-launchpad@tinyerp.com-20100618140304-yxomezlycdidk98c
This commit is contained in:
commit
c77b521ffb
|
@ -33,5 +33,4 @@ import product
|
|||
import sequence
|
||||
import company
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -23,7 +23,7 @@
|
|||
{
|
||||
"name" : "Accounting and Financial Management",
|
||||
"version" : "1.1",
|
||||
"depends" : ["product", "analytic", "process"],
|
||||
"depends" : ["product", "analytic", "process","board"],
|
||||
"author" : "Tiny",
|
||||
"category": 'Generic Modules/Accounting',
|
||||
"description": """Financial and accounting module that covers:
|
||||
|
@ -34,10 +34,15 @@
|
|||
Budgets
|
||||
Customer and Supplier Invoices
|
||||
Bank statements
|
||||
Reconciliation process by partner
|
||||
Creates a dashboards for accountants that includes:
|
||||
* List of uninvoiced quotations
|
||||
* Graph of aged receivables
|
||||
* Graph of aged incomes
|
||||
|
||||
The processes like maintaining of general ledger is done through the defined financial Journals (entry move line or
|
||||
grouping is maintained through journal) for a particular financial year and for preparation of vouchers there is a
|
||||
module named account_voucherss
|
||||
module named account_vouchers
|
||||
""",
|
||||
'website': 'http://www.openerp.com',
|
||||
'init_xml': [],
|
||||
|
@ -81,6 +86,7 @@ module named account_voucherss
|
|||
'wizard/account_compare_account_balance_report_view.xml',
|
||||
'wizard/account_third_party_ledger.xml',
|
||||
'wizard/account_reconcile_view.xml',
|
||||
'wizard/account_reconcile_partner_process_view.xml',
|
||||
'wizard/account_automatic_reconcile_view.xml',
|
||||
'project/wizard/project_account_analytic_line_view.xml',
|
||||
'account_end_fy.xml',
|
||||
|
@ -111,7 +117,8 @@ module named account_voucherss
|
|||
'report/account_report_view.xml',
|
||||
'report/account_analytic_report_view.xml',
|
||||
'report/account_account_report_view.xml',
|
||||
'report/account_analytic_entries_report_view.xml'
|
||||
'report/account_analytic_entries_report_view.xml',
|
||||
'board_account_view.xml',
|
||||
],
|
||||
'demo_xml': [
|
||||
#'demo/price_accuracy00.yml',
|
||||
|
@ -120,10 +127,19 @@ module named account_voucherss
|
|||
'project/analytic_account_demo.xml',
|
||||
'demo/account_minimal.xml',
|
||||
'account_unit_test.xml',
|
||||
'board_account_demo.xml',
|
||||
],
|
||||
'test': [
|
||||
'test/account_customer_invoice.yml',
|
||||
'test/account_supplier_invoice.yml',
|
||||
'test/account_change_currency.yml',
|
||||
'test/chart_of_account.yml',
|
||||
'test/account_period_close.yml',
|
||||
'test/account_fiscalyear_close_state.yml',
|
||||
'test/account_invoice_state.yml',
|
||||
'test/account_use_model.yml',
|
||||
'test/account_validate_account_move.yml',
|
||||
# 'test/account_fiscalyear_close.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
|
|
@ -18,26 +18,23 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from operator import itemgetter
|
||||
import netsvc
|
||||
|
||||
from osv import fields, osv
|
||||
import decimal_precision as dp
|
||||
|
||||
from tools.misc import currency
|
||||
from tools.translate import _
|
||||
import pooler
|
||||
from datetime import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from operator import itemgetter
|
||||
|
||||
import netsvc
|
||||
import pooler
|
||||
from osv import fields, osv
|
||||
import decimal_precision as dp
|
||||
from tools.misc import currency
|
||||
from tools.translate import _
|
||||
from tools import config
|
||||
|
||||
def check_cycle(self, cr, uid, ids):
|
||||
""" climbs the ``self._table.parent_id`` chains for 100 levels or
|
||||
until it can't find any more parent(s)
|
||||
|
||||
|
||||
Returns true if it runs out of parents (no cycle), false if
|
||||
it can recurse 100 times without ending all chains
|
||||
"""
|
||||
|
@ -82,7 +79,7 @@ class account_payment_term(osv.osv):
|
|||
elif line.value == 'balance':
|
||||
amt = round(amount, prec)
|
||||
if amt:
|
||||
next_date = datetime.strptime(date_ref, '%y-%m-%d') + relativedelta(days=line.days)
|
||||
next_date = datetime.strptime(date_ref, '%Y-%m-%d') + relativedelta(days=line.days)
|
||||
if line.days2 < 0:
|
||||
next_date += relativedelta(day=line.days2)
|
||||
if line.days2 > 0:
|
||||
|
@ -249,7 +246,7 @@ class account_account(osv.osv):
|
|||
if ids3:
|
||||
ids3 = self._get_children_and_consol(cr, uid, ids3, context)
|
||||
return ids2 + ids3
|
||||
|
||||
|
||||
def __compute(self, cr, uid, ids, field_names, arg=None, context=None,
|
||||
query='', query_params=()):
|
||||
""" compute the balance, debit and/or credit for the provided
|
||||
|
@ -276,7 +273,7 @@ class account_account(osv.osv):
|
|||
accounts = {}
|
||||
if children_and_consolidated:
|
||||
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
|
||||
|
||||
wheres = [""]
|
||||
if query.strip():
|
||||
wheres.append(query.strip())
|
||||
|
@ -302,10 +299,10 @@ class account_account(osv.osv):
|
|||
cr.execute(request, params)
|
||||
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
|
||||
'Status: %s'%cr.statusmessage)
|
||||
|
||||
|
||||
for res in cr.dictfetchall():
|
||||
accounts[res['id']] = res
|
||||
|
||||
|
||||
# consolidate accounts with direct children
|
||||
children_and_consolidated.reverse()
|
||||
brs = list(self.browse(cr, uid, children_and_consolidated, context=context))
|
||||
|
@ -554,8 +551,13 @@ class account_account(osv.osv):
|
|||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
if 'company_id' in vals:
|
||||
move_lines = self.pool.get('account.move.line').search(cr, uid, [('account_id', 'in', ids)])
|
||||
if move_lines:
|
||||
raise osv.except_osv(_('Warning !'), _('You cannot modify Company of account as its related record exist in Entry Lines'))
|
||||
if 'active' in vals and not vals['active']:
|
||||
self._check_moves(cr, uid, ids, "write", context)
|
||||
self._check_moves(cr, uid, ids, "write", context=context)
|
||||
if 'type' in vals.keys():
|
||||
self._check_allow_type_change(cr, uid, ids, vals['type'], context=context)
|
||||
return super(account_account, self).write(cr, uid, ids, vals, context=context)
|
||||
|
@ -602,42 +604,46 @@ class account_journal(osv.osv):
|
|||
_name = "account.journal"
|
||||
_description = "Journal"
|
||||
_columns = {
|
||||
'name': fields.char('Journal Name', size=64, required=True, translate=True),
|
||||
'code': fields.char('Code', size=16),
|
||||
'type': fields.selection([('sale', 'Sale'), ('purchase', 'Purchase'), ('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
|
||||
'name': fields.char('Journal Name', size=64, required=True, translate=True,help="Name of the journal"),
|
||||
'code': fields.char('Code', size=16,required=True,help="Code of the journal"),
|
||||
'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'),('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
|
||||
help="Select 'Sale' for Sale journal to be used at the time of making invoice."\
|
||||
" Select 'Purchase' for Purchase Journal to be used at the time of approving purchase order."\
|
||||
" Select 'Cash' to be used at the time of making payment."\
|
||||
" Select 'General' to be used at the time of stock input/output."\
|
||||
" Select 'Situation' to be used at the time of making vouchers."),
|
||||
'refund_journal': fields.boolean('Refund Journal', help='Fill this if the journal is to be used for refunds of invoices.'),
|
||||
|
||||
'type_control_ids': fields.many2many('account.account.type', 'account_journal_type_rel', 'journal_id','type_id', 'Type Controls', domain=[('code','<>','view'), ('code', '<>', 'closed')]),
|
||||
'account_control_ids': fields.many2many('account.account', 'account_account_type_rel', 'journal_id','account_id', 'Account', domain=[('type','<>','view'), ('type', '<>', 'closed')]),
|
||||
|
||||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the journal without removing it."),
|
||||
'view_id': fields.many2one('account.journal.view', 'View', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
|
||||
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]"),
|
||||
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]"),
|
||||
'view_id': fields.many2one('account.journal.view', 'Display Mode', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
|
||||
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]", help="It acts as a default account for credit amount"),
|
||||
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]", help="It acts as a default account for debit amount"),
|
||||
'centralisation': fields.boolean('Centralised counterpart', help="Check this box to determine that each entry of this journal won't create a new counterpart but will share the same counterpart. This is used in fiscal year closing."),
|
||||
'update_posted': fields.boolean('Allow Cancelling Entries'),
|
||||
'update_posted': fields.boolean('Allow Cancelling Entries', help="Check this box if you want to allow the cancellation the entries related to this journal or of the invoice related to this journal"),
|
||||
'group_invoice_lines': fields.boolean('Group invoice lines', help="If this box is checked, the system will try to group the accounting lines when generating them from invoices."),
|
||||
'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="The sequence gives the display order for a list of journals", required=True),
|
||||
'user_id': fields.many2one('res.users', 'User', help="The user responsible for this journal"),
|
||||
'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'),
|
||||
'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'),
|
||||
'entry_posted': fields.boolean('Skip \'Draft\' State for Created Entries', help='Check this box if you don\'t want new account moves to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation.'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True,select=1),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"),
|
||||
'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \
|
||||
help="The sequence used for invoice numbers in this journal."),
|
||||
'allow_date':fields.boolean('Check Date not in the Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'active': lambda *a: 1,
|
||||
'user_id': lambda self,cr,uid,context: uid,
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||
}
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
obj=[]
|
||||
if 'company_id' in vals:
|
||||
move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)])
|
||||
if move_lines:
|
||||
raise osv.except_osv(_('Warning !'), _('You cannot modify company of this journal as its related record exist in Entry Lines'))
|
||||
return super(account_journal, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
journal_id = super(account_journal, self).create(cr, uid, vals, context)
|
||||
# journal_name = self.browse(cr, uid, [journal_id])[0].code
|
||||
|
@ -663,6 +669,15 @@ class account_journal(osv.osv):
|
|||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def onchange_type(self, cr, uid, ids, type):
|
||||
res={}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
if type == 'situation':
|
||||
res= {'value':{'centralisation': True}}
|
||||
else:
|
||||
res= {'value':{'centralisation': False}}
|
||||
return res
|
||||
|
||||
account_journal()
|
||||
|
||||
class account_fiscalyear(osv.osv):
|
||||
|
@ -756,7 +771,7 @@ class account_period(osv.osv):
|
|||
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
|
||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True,
|
||||
help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True)
|
||||
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
|
@ -829,6 +844,14 @@ class account_period(osv.osv):
|
|||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
obj=[]
|
||||
if 'company_id' in vals:
|
||||
move_lines = self.pool.get('account.move.line').search(cr, uid, [('period_id', 'in', ids)])
|
||||
if move_lines:
|
||||
raise osv.except_osv(_('Warning !'), _('You cannot modify company of this period as its related record exist in Entry Lines'))
|
||||
return super(account_period, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
account_period()
|
||||
|
||||
class account_journal_period(osv.osv):
|
||||
|
@ -854,7 +877,7 @@ class account_journal_period(osv.osv):
|
|||
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'State', required=True, readonly=True,
|
||||
help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'),
|
||||
'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'),
|
||||
'company_id' : fields.many2one('res.company', 'Company')
|
||||
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company')
|
||||
}
|
||||
|
||||
def _check(self, cr, uid, ids, context={}):
|
||||
|
@ -1426,14 +1449,14 @@ class account_tax_code(osv.osv):
|
|||
'sign': lambda *args: 1.0,
|
||||
'notprintable': lambda *a: False,
|
||||
}
|
||||
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
default.update({'line_ids': []})
|
||||
return super(account_tax_code, self).copy(cr, uid, id, default, context)
|
||||
|
||||
|
||||
_check_recursion = check_cycle
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id'])
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<notebook>
|
||||
<page string="Line">
|
||||
<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.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})"/>
|
||||
<field name="uos_id"/>
|
||||
<field name="uos_id" widget="selection" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})"/>
|
||||
<field name="quantity"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount"/>
|
||||
|
@ -220,7 +220,8 @@
|
|||
<field name="name"/>
|
||||
<newline/>
|
||||
<field name="origin" groups="base.group_extended"/>
|
||||
<field colspan="4" domain="[('partner_id','=',partner_id)]" name="address_contact_id" groups="base.group_extended"/>
|
||||
<field domain="[('partner_id','=',partner_id)]" name="address_contact_id" groups="base.group_extended"/>
|
||||
<field name="user_id"/>
|
||||
<field name="move_id"/>
|
||||
<separator colspan="4" string="Additional Information"/>
|
||||
<field colspan="4" name="comment" nolabel="1"/>
|
||||
|
@ -404,7 +405,7 @@
|
|||
<field name="view_id" ref="invoice_form"/>
|
||||
<field name="act_window_id" ref="action_invoice_tree"/>
|
||||
</record>
|
||||
<menuitem name="Invoices" id="menu_finance_invoice" parent="account.menu_finance" sequence="2"/>
|
||||
<!-- <menuitem name="Invoices" id="menu_finance_invoice" parent="account.menu_finance" sequence="2"/>-->
|
||||
|
||||
<record id="action_invoice_tree1" model="ir.actions.act_window">
|
||||
<field name="name">Customer Invoices</field>
|
||||
|
@ -427,10 +428,10 @@
|
|||
<field name="view_id" ref="invoice_form"/>
|
||||
<field name="act_window_id" ref="action_invoice_tree1"/>
|
||||
</record>
|
||||
<menuitem action="action_invoice_tree1" id="menu_action_invoice_tree1" parent="account.menu_finance_invoice"/>
|
||||
<menuitem action="action_invoice_tree1" id="menu_action_invoice_tree1" parent="menu_finance_receivables"/>
|
||||
|
||||
<record id="action_invoice_tree2" model="ir.actions.act_window">
|
||||
<field name="name">Supplier Invoices</field>
|
||||
<field name="name">Vendor Invoices</field>
|
||||
<field name="res_model">account.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
|
@ -439,7 +440,7 @@
|
|||
<field name="context">{'type':'in_invoice'}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_filter"/>
|
||||
</record>
|
||||
<menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="account.menu_finance_invoice"/>
|
||||
<menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="menu_finance_payables"/>
|
||||
|
||||
<record id="action_invoice_tree3" model="ir.actions.act_window">
|
||||
<field name="name">Customer Refunds</field>
|
||||
|
@ -465,10 +466,10 @@
|
|||
<field name="act_window_id" ref="action_invoice_tree3"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_invoice_tree3" id="menu_action_invoice_tree3" parent="account.menu_finance_invoice"/>
|
||||
<menuitem action="action_invoice_tree3" id="menu_action_invoice_tree3" parent="menu_finance_receivables"/>
|
||||
|
||||
<record id="action_invoice_tree4" model="ir.actions.act_window">
|
||||
<field name="name">Supplier Refunds</field>
|
||||
<field name="name">Vendor Refunds</field>
|
||||
<field name="res_model">account.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
|
@ -477,7 +478,7 @@
|
|||
<field name="context">{'type':'in_refund'}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_filter"/>
|
||||
</record>
|
||||
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="account.menu_finance_invoice"/>
|
||||
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>
|
||||
|
||||
<act_window domain="[('partner_id','=',active_id)]" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
|
||||
|
||||
|
|
|
@ -2,27 +2,51 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="8"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_finance_configuration" sequence="20"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Financial Management" sequence="1"/>
|
||||
<menuitem id="menu_finance_receivables" name="Receivables" parent="menu_finance" sequence="2"/>
|
||||
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="3"/>
|
||||
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="4"/>
|
||||
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Journal Entries Validation" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="10"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
|
||||
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_generic_report" name="Management Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Financial Management" sequence="5"/>
|
||||
<!-- <menuitem id="menu_finance_configuration1" name="Configuration" parent="menu_finance" sequence="80"/>-->
|
||||
<!-- <menuitem id="base.menu_action_currency_form" parent="menu_finance_configuration" sequence="20"/>-->
|
||||
<!-- <menuitem id="menu_finance_accounting1" name="Financial Accounting" parent="menu_finance_configuration" sequence="80"/>-->
|
||||
<!-- <menuitem id="menu_analytic_accounting1" name="Analytic Accounting" parent="menu_finance_configuration" sequence="80"/>-->
|
||||
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="7"/>
|
||||
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="account.menu_finance_reporting" sequence="1"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Statements" parent="account.menu_finance_reporting" sequence="2"/>
|
||||
<menuitem id="menu_generic_report" name="Generic Reports" parent="account.menu_finance_legal_statement" sequence="8"/>
|
||||
<!-- <menuitem id="menu_finance_reporting11" name="Reporting" parent="account.menu_finance" sequence="80"/>-->
|
||||
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/>
|
||||
<!-- <menuitem id="menu_finance_legal_statement1" name="Legal Statements" parent="account.menu_finance_reporting" sequence="200"/>-->
|
||||
<!-- <menuitem id="menu_generic_report" name="Generic Reports" parent="account.menu_finance_legal_statement" sequence="8"/>-->
|
||||
|
||||
<menuitem id="menu_finance_entries" name="Accounting" parent="account.menu_finance" sequence="1"
|
||||
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="1"
|
||||
groups="group_account_user"/>
|
||||
<menuitem id="account.menu_finance_recurrent_entries" name="Recurrent Entries" parent="account.menu_finance_entries" sequence="15"/>
|
||||
<menuitem id="account.menu_finance_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing" sequence="15"/>
|
||||
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="account.menu_finance"
|
||||
sequence="3"
|
||||
groups="group_account_user"/>
|
||||
<menuitem id="menu_account_end_year_treatments" name="End of Year Treatments" parent="account.menu_finance_periodical_processing" sequence="20"/>
|
||||
<!-- <menuitem id="menu_finance_periodical_processing11" name="Periodical Processing" parent="account.menu_finance"-->
|
||||
<!-- sequence="3"-->
|
||||
<!-- groups="group_account_user"/>-->
|
||||
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing"/>
|
||||
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="account.menu_finance_reporting" sequence="3"/>
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
|
@ -18,13 +18,12 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
from datetime import datetime
|
||||
import decimal_precision as dp
|
||||
import tools
|
||||
|
||||
|
@ -499,9 +498,17 @@ class account_move_line(osv.osv):
|
|||
return False
|
||||
return True
|
||||
|
||||
def _check_company_id(self, cr, uid, ids):
|
||||
lines = self.browse(cr, uid, ids)
|
||||
for l in lines:
|
||||
if l.company_id != l.account_id.company_id or l.company_id != l.period_id.company_id:
|
||||
return False
|
||||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_no_view, 'You can not create move line on view account.', ['account_id']),
|
||||
(_check_no_closed, 'You can not create move line on closed account.', ['account_id']),
|
||||
(_check_company_id,'Company must be same for its related account and period.',['company_id'] ),
|
||||
]
|
||||
|
||||
#TODO: ONCHANGE_ACCOUNT_ID: set account_tax_id
|
||||
|
@ -570,11 +577,54 @@ class account_move_line(osv.osv):
|
|||
# writeoff; entry generated for the difference between the lines
|
||||
#
|
||||
|
||||
def reconcile_partial(self, cr, uid, ids, type='auto', context={}):
|
||||
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
if context is None:
|
||||
context = {}
|
||||
if context and context.get('next_partner_only', False):
|
||||
if not context.get('partner_id', False):
|
||||
partner = self.get_next_partner_only(cr, uid, offset, context)
|
||||
else:
|
||||
partner = context.get('partner_id', False)
|
||||
if not partner:
|
||||
return []
|
||||
args.append(('partner_id', '=', partner[0]))
|
||||
return super(account_move_line, self).search(cr, uid, args, offset, limit, order, context, count)
|
||||
|
||||
def get_next_partner_only(self, cr, uid, offset=0, context=None):
|
||||
cr.execute(
|
||||
"""
|
||||
SELECT p.id
|
||||
FROM res_partner p
|
||||
RIGHT JOIN (
|
||||
SELECT l.partner_id as partner_id, SUM(l.debit) as debit, SUM(l.credit) as credit
|
||||
FROM account_move_line l
|
||||
LEFT JOIN account_account a ON (a.id = l.account_id)
|
||||
LEFT JOIN res_partner p ON (l.partner_id = p.id)
|
||||
WHERE a.reconcile IS TRUE
|
||||
AND l.reconcile_id IS NULL
|
||||
AND (p.last_reconciliation_date IS NULL OR l.date > p.last_reconciliation_date)
|
||||
AND l.state <> 'draft'
|
||||
GROUP BY l.partner_id
|
||||
) AS s ON (p.id = s.partner_id)
|
||||
ORDER BY p.last_reconciliation_date LIMIT 1 OFFSET %s""", (offset,)
|
||||
)
|
||||
return cr.fetchone()
|
||||
|
||||
def reconcile_partial(self, cr, uid, ids, type='auto', context=None):
|
||||
merges = []
|
||||
unmerge = []
|
||||
total = 0.0
|
||||
merges_rec = []
|
||||
|
||||
company_list = []
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if company_list and not line.company_id.id in company_list:
|
||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
|
||||
company_list.append(line.company_id.id)
|
||||
|
||||
for line in self.browse(cr, uid, ids, context):
|
||||
if line.reconcile_id:
|
||||
raise osv.except_osv(_('Warning'), _('Already Reconciled!'))
|
||||
|
@ -588,6 +638,7 @@ class account_move_line(osv.osv):
|
|||
else:
|
||||
unmerge.append(line.id)
|
||||
total += (line.debit or 0.0) - (line.credit or 0.0)
|
||||
|
||||
if not total:
|
||||
res = self.reconcile(cr, uid, merges+unmerge, context=context)
|
||||
return res
|
||||
|
@ -598,13 +649,22 @@ class account_move_line(osv.osv):
|
|||
self.pool.get('account.move.reconcile').reconcile_partial_check(cr, uid, [r_id] + merges_rec, context=context)
|
||||
return True
|
||||
|
||||
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context={}):
|
||||
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context=None):
|
||||
lines = self.browse(cr, uid, ids, context=context)
|
||||
unrec_lines = filter(lambda x: not x['reconcile_id'], lines)
|
||||
credit = debit = 0.0
|
||||
currency = 0.0
|
||||
account_id = False
|
||||
partner_id = False
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
company_list = []
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if company_list and not line.company_id.id in company_list:
|
||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
|
||||
company_list.append(line.company_id.id)
|
||||
|
||||
for line in unrec_lines:
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error'),
|
||||
|
@ -703,6 +763,11 @@ class account_move_line(osv.osv):
|
|||
# because of the way the line_id are defined: (4, x, False)
|
||||
for id in ids:
|
||||
wf_service.trg_trigger(uid, 'account.move.line', id, cr)
|
||||
|
||||
if lines and lines[0]:
|
||||
partner_id = lines[0].partner_id.id
|
||||
if context and context.get('stop_reconcile', False):
|
||||
self.pool.get('res.partner').write(cr, uid, [partner_id], {'last_reconciliation_date': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return r_id
|
||||
|
||||
def view_header_get(self, cr, user, view_id, view_type, context):
|
||||
|
@ -839,7 +904,7 @@ class account_move_line(osv.osv):
|
|||
if vals.get('date', False):
|
||||
todo_date = vals['date']
|
||||
del vals['date']
|
||||
|
||||
|
||||
for line in self.browse(cr, uid, ids,context=context):
|
||||
ctx = context.copy()
|
||||
if ('journal_id' not in ctx):
|
||||
|
@ -851,8 +916,8 @@ class account_move_line(osv.osv):
|
|||
if line.move_id:
|
||||
ctx['period_id'] = line.move_id.period_id.id
|
||||
else:
|
||||
ctx['period_id'] = line.period_id.id
|
||||
#Check for centralisation
|
||||
ctx['period_id'] = line.period_id.id
|
||||
#Check for centralisation
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, ctx['journal_id'], context=ctx)
|
||||
if journal.centralisation:
|
||||
self._check_moves(cr, uid, context=ctx)
|
||||
|
|
|
@ -163,13 +163,13 @@
|
|||
</record>
|
||||
|
||||
<record id="action_account_form" model="ir.actions.act_window">
|
||||
<field name="name">List of Accounts</field>
|
||||
<field name="name">Accounts</field>
|
||||
<field name="res_model">account.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="search_view_id" ref="view_account_search"/>
|
||||
</record>
|
||||
<menuitem id="account_account_menu" name="Financial Accounts" parent="account.menu_finance_accounting"/>
|
||||
<menuitem id="account_account_menu" name="Accounts" parent="menu_finance_accounting"/>
|
||||
<menuitem action="action_account_form" id="menu_action_account_form" parent="account_account_menu"/>
|
||||
|
||||
<record id="view_account_tree" model="ir.ui.view">
|
||||
|
@ -197,7 +197,7 @@
|
|||
<field name="view_id" ref="view_account_tree"/>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
</record>
|
||||
<menuitem action="action_account_tree" id="menu_action_account_tree" parent="account.account_account_menu"/>
|
||||
<!-- <menuitem action="action_account_tree" id="menu_action_account_tree" parent="account.account_account_menu"/>-->
|
||||
|
||||
<!--
|
||||
Journal
|
||||
|
@ -272,22 +272,19 @@
|
|||
<group colspan="4" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="active" select="1"/>
|
||||
<field name="type"/>
|
||||
<field name="type" on_change="onchange_type(type)"/>
|
||||
<field name="refund_journal" attrs="{'readonly':[('type','=','general'),('type','=','cash'),('type','=','situation')]}"/>
|
||||
</group>
|
||||
|
||||
<notebook colspan="4">
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Journal View" colspan="4"/>
|
||||
<field name="view_id"/>
|
||||
<field name="view_id" widget="selection"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Sequence" colspan="4"/>
|
||||
<field name="sequence_id"/>
|
||||
<field name="invoice_sequence_id"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
|
@ -296,7 +293,7 @@
|
|||
<field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Validations" colspan="4"/>
|
||||
<field name="allow_date" groups="base.group_extended"/>
|
||||
</group>
|
||||
|
@ -307,15 +304,19 @@
|
|||
<field name="user_id" groups="base.group_extended"/>
|
||||
<field name="currency"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Other Configuration" colspan="4"/>
|
||||
<field name="centralisation"/>
|
||||
<field name="group_invoice_lines"/>
|
||||
<field name="update_posted"/>
|
||||
<field name="centralisation" groups="base.group_extended"/>
|
||||
<field name="entry_posted"/>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Invoicing Data" colspan="4"/>
|
||||
<field name="invoice_sequence_id"/>
|
||||
<field name="group_invoice_lines"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Entry Controls">
|
||||
<page string="Entry Controls" groups="base.group_extended">
|
||||
<separator colspan="4" string="Accounts Type Allowed (empty for no control)"/>
|
||||
<field colspan="4" name="type_control_ids" nolabel="1"/>
|
||||
<separator colspan="4" string="Accounts Allowed (empty for no control)"/>
|
||||
|
@ -326,12 +327,12 @@
|
|||
</field>
|
||||
</record>
|
||||
<record id="action_account_journal_form" model="ir.actions.act_window">
|
||||
<field name="name">Financial Journals</field>
|
||||
<field name="name">Journals</field>
|
||||
<field name="res_model">account.journal</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="menu_finance_accounting"/>
|
||||
<menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="account_account_menu"/>
|
||||
|
||||
<record id="view_bank_statement_tree" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.tree</field>
|
||||
|
@ -415,12 +416,12 @@
|
|||
</field>
|
||||
</record>
|
||||
<record id="action_bank_statement_tree" model="ir.actions.act_window">
|
||||
<field name="name">Entries by Statements</field>
|
||||
<field name="name">Bank Statements</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_bank_statement_tree" id="menu_bank_statement_tree" parent="menu_finance_entries" sequence="7"/>
|
||||
<menuitem string="Bank Statements" action="action_bank_statement_tree" id="menu_bank_statement_tree" parent="menu_finance_bank_and_cash" sequence="7"/>
|
||||
|
||||
<record id="action_bank_statement_draft_tree" model="ir.actions.act_window">
|
||||
<field name="name">Draft statements</field>
|
||||
|
@ -517,7 +518,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_account_type_form" groups="base.group_extended" id="menu_action_account_type_form" parent="account.account_account_menu"/>
|
||||
<menuitem action="action_account_type_form" groups="base.group_extended" id="menu_action_account_type_form" parent="menu_low_level"/>
|
||||
<!--
|
||||
Entries
|
||||
-->
|
||||
|
@ -609,7 +610,7 @@
|
|||
<field name="view_id" ref="view_tax_code_tree"/>
|
||||
</record>
|
||||
<menuitem id="next_id_27" name="Taxes" parent="account.menu_finance_accounting"/>
|
||||
<menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="next_id_27" sequence="12"/>
|
||||
<menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="menu_low_level" sequence="12"/>
|
||||
|
||||
|
||||
<!--
|
||||
|
@ -841,7 +842,9 @@
|
|||
<separator orientation="vertical"/>
|
||||
<field name="date" select='1'/>
|
||||
<field name="account_id" select='1'/>
|
||||
<field name="partner_id" select='1'/>
|
||||
<field name="partner_id" select='1'>
|
||||
<filter help="Next Partner Entries to reconcile" name="next_partner" string="Next Partner to reconcile" context="{'next_partner_only': 1}" icon="terp-partner" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
|
||||
</field>
|
||||
<field name="balance" string="Debit/Credit" select='1'/>
|
||||
</group>
|
||||
</search>
|
||||
|
@ -1006,11 +1009,22 @@
|
|||
<field name="view_id" ref="view_move_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="action_move_to_review" model="ir.actions.act_window">
|
||||
<field name="name">Journal Entries to Review</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_move_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_filter"/>
|
||||
<field name="domain">[('to_check','=',True)]</field>
|
||||
</record>
|
||||
<menuitem action="action_move_to_review" id="menu_action_move_to_review" parent="periodical_processing_journal_entries_validation"/>
|
||||
<menuitem id="next_id_29" name="Search Entries" parent="account.menu_finance_entries" sequence="40"/>
|
||||
<menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>
|
||||
|
||||
<record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
|
||||
<field name="name">Journal Entries</field>
|
||||
<field name="name">Journal Vouchers</field>
|
||||
<field name="res_model">account.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -1020,6 +1034,30 @@
|
|||
|
||||
<menuitem action="action_move_line_form_encode_by_move" id="menu_encode_entries_by_move" parent="menu_finance_entries"/>
|
||||
|
||||
<record id="action_account_moves_sale" model="ir.actions.act_window">
|
||||
<field name="name">Receivable Entries</field>
|
||||
<field name="res_model">account.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_move_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'sale')]</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_moves_sale" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables"/>
|
||||
|
||||
<record id="action_account_moves_purchase" model="ir.actions.act_window">
|
||||
<field name="name">Payable Entries</field>
|
||||
<field name="res_model">account.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_move_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'purchase')]</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>
|
||||
|
||||
<record id="action_move_line_search" model="ir.actions.act_window">
|
||||
<field name="name">Entry Lines</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
@ -1040,6 +1078,29 @@
|
|||
<field name="view_mode">form</field>
|
||||
<field name="act_window_id" ref="action_move_line_search"/>
|
||||
</record>
|
||||
<record id="action_move_line_search_view3" model="ir.actions.act_window">
|
||||
<field name="name">Cash Register</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.move.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_move_line_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_line_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'cash')]</field>
|
||||
</record>
|
||||
<record id="action_move_line_search_view4" model="ir.actions.act_window">
|
||||
<field name="name">Checks Register</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.move.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_move_line_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_line_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
|
||||
</record>
|
||||
<menuitem action="action_move_line_search_view3" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash"/>
|
||||
<menuitem action="action_move_line_search_view4" id="journal_bank_move_lines" parent="menu_finance_bank_and_cash"/>
|
||||
|
||||
<menuitem action="action_move_line_search" id="menu_action_move_line_search" parent="account.next_id_29"/>
|
||||
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="account.menu_finance" sequence="4"/>
|
||||
|
@ -1108,20 +1169,32 @@
|
|||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" ref="view_bank_statement_reconcile_form"/>
|
||||
</record>
|
||||
<menuitem
|
||||
<!-- <menuitem
|
||||
id="next_id_30"
|
||||
name="Bank Reconciliation"
|
||||
parent="account.menu_finance_periodical_processing"
|
||||
groups="group_account_user"/>
|
||||
parent="menu_finance_periodical_processing"
|
||||
groups="group_account_user"/> -->
|
||||
|
||||
<menuitem action="action_bank_statement_reconciliation_form" id="menu_action_account_bank_reconcile_tree" parent="next_id_30"/>
|
||||
<!-- <menuitem action="action_bank_statement_reconciliation_form" id="menu_action_account_bank_reconcile_tree" parent="next_id_30"/>-->
|
||||
<!-- <wizard id="action_account_bank_reconcile_tree" menu="False" model="account.move.line" name="account.move.bank.reconcile" string="Bank reconciliation"/> -->
|
||||
<!-- <menuitem action="action_account_bank_reconcile_tree" id="menu_action_account_bank_reconcile_check_tree" parent="account.next_id_30" type="wizard"/> -->
|
||||
|
||||
<!-- bank reconsilation -->
|
||||
<menuitem action="action_account_bank_reconcile_tree"
|
||||
id="menu_action_account_bank_reconcile_check_tree"
|
||||
parent="account.next_id_30" />
|
||||
parent="periodical_processing_reconciliation" groups="group_account_user" />
|
||||
|
||||
<act_window
|
||||
context="{'search_default_next_partner':1}"
|
||||
id="action_account_manual_reconcile" name="Entry Lines"
|
||||
res_model="account.move.line"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
name="Manual Reconcilication" icon="STOCK_EXECUTE"
|
||||
action="action_account_manual_reconcile"
|
||||
id="menu_manual_reconcile"
|
||||
parent="account.periodical_processing_reconciliation"/>
|
||||
|
||||
|
||||
<act_window
|
||||
|
@ -1244,12 +1317,12 @@
|
|||
</field>
|
||||
</record>
|
||||
<record id="action_model_form" model="ir.actions.act_window">
|
||||
<field name="name">Models Definition</field>
|
||||
<field name="name">Define Models</field>
|
||||
<field name="res_model">account.model</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_model_form" id="menu_action_model_form" parent="menu_finance_configuration"/>
|
||||
<menuitem action="action_model_form" id="menu_action_model_form" parent="account.menu_finance_recurrent_entries"/>
|
||||
|
||||
|
||||
<!--
|
||||
|
@ -1312,7 +1385,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_payment_term_form" id="menu_action_payment_term_form" parent="menu_finance_configuration"/>
|
||||
<menuitem action="action_payment_term_form" id="menu_action_payment_term_form" parent="menu_configuration_misc"/>
|
||||
|
||||
<!--
|
||||
# Account Subscriptions
|
||||
|
@ -1392,7 +1465,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_subscription_form" id="menu_action_subscription_form" parent="account.menu_finance_recurrent_entries"/>
|
||||
<!-- <menuitem action="action_subscription_form" id="menu_action_subscription_form" parent="account.menu_finance_recurrent_entries"/>-->
|
||||
|
||||
<record id="action_subscription_form_running" model="ir.actions.act_window">
|
||||
<field name="name">Running Subscriptions</field>
|
||||
|
@ -1525,8 +1598,18 @@
|
|||
<menuitem
|
||||
id="account_template_folder"
|
||||
name="Templates"
|
||||
parent="account.menu_finance_accounting"
|
||||
parent="menu_finance_accounting"
|
||||
groups="base.group_multi_company"/>
|
||||
<menuitem
|
||||
id="account_template_taxes"
|
||||
name="Taxes"
|
||||
parent="account_template_folder"
|
||||
groups="base.group_multi_company" sequence="2"/>
|
||||
<menuitem
|
||||
id="account_template_accounts"
|
||||
name="Accounts"
|
||||
parent="account_template_folder"
|
||||
groups="base.group_multi_company" sequence="1"/>
|
||||
|
||||
|
||||
<record id="view_account_template_form" model="ir.ui.view">
|
||||
|
@ -1577,7 +1660,7 @@
|
|||
</record>
|
||||
|
||||
|
||||
<menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_template_folder"/>
|
||||
<menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_template_accounts"/>
|
||||
|
||||
<!-- Chart of Accounts Templates -->
|
||||
|
||||
|
@ -1622,7 +1705,7 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_folder"/>
|
||||
<menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts"/>
|
||||
|
||||
<!-- Account Tax Templates -->
|
||||
|
||||
|
@ -1698,7 +1781,7 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="account_template_folder" sequence="13"/>
|
||||
<menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="account_template_taxes" sequence="13"/>
|
||||
|
||||
<!-- Account Tax Code Templates -->
|
||||
<record id="view_tax_code_template_tree" model="ir.ui.view">
|
||||
|
@ -1736,7 +1819,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_folder" sequence="14"/>
|
||||
<menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
|
||||
|
||||
|
||||
<!-- Wizard for Multi Charts of Accounts -->
|
||||
|
@ -1783,7 +1866,6 @@
|
|||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<xpath expr='//button[@name="action_skip"]' position='replace'/>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
-->
|
||||
|
||||
<!-- automatic reconcile -->
|
||||
<menuitem id="next_id_20" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="next_id_20" name="Reconciliation" parent="menu_finance_periodical_processing"/>-->
|
||||
<!-- <wizard id="wizard_automatic_reconcile" menu="False" model="account.account" name="account.automatic.reconcile" string="Automatic reconciliation"/>
|
||||
<menuitem action="wizard_automatic_reconcile" id="menu_automatic_reconcile" parent="next_id_20" type="wizard"/>-->
|
||||
|
||||
|
@ -52,18 +52,15 @@
|
|||
<!-- <wizard id="wizard_reconcile_unreconcile" model="account.move.reconcile" name="account.reconcile.unreconcile" string="Unreconcile Entries"/>-->
|
||||
|
||||
|
||||
<!-- <wizard id="wizard_reconcile_select" menu="False" model="account.move.line" name="account.move.line.reconcile.select" string="Reconcile entries"/>
|
||||
<menuitem action="wizard_reconcile_select" id="menu_reconcile_select" parent="account.next_id_20" type="wizard"/>
|
||||
-->
|
||||
<!-- <wizard id="wizard_reconcile_select" menu="False" model="account.move.line" name="account.move.line.reconcile.select" string="Reconcile entries"/> -->
|
||||
<!-- <menuitem action="wizard_reconcile_select" id="menu_reconcile_select" parent="account.next_id_20" type="wizard"/> -->
|
||||
|
||||
<!-- unreconcile -->
|
||||
<!-- <wizard id="wizard_unreconcile" model="account.move.line" name="account.move.line.unreconcile" string="Unreconcile Entries"/>-->
|
||||
|
||||
<!-- unreconcile
|
||||
|
||||
<wizard id="wizard_unreconcile_select" menu="False" model="account.move.line" name="account.move.line.unreconcile.select" string="Unreconcile entries"/>
|
||||
<menuitem action="wizard_unreconcile_select" id="menu_unreconcile_select" parent="account.next_id_20" type="wizard"/>
|
||||
-->
|
||||
<!-- <wizard id="wizard_unreconcile_select" menu="False" model="account.move.line" name="account.move.line.unreconcile.select" string="Unreconcile entries"/> -->
|
||||
<!-- <menuitem action="wizard_unreconcile_select" id="menu_unreconcile_select" parent="account.next_id_20" type="wizard"/> -->
|
||||
|
||||
<!-- subscriptions -->
|
||||
<!--
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<!--
|
||||
Administrator shortcut
|
||||
Demo user startup menu
|
|
@ -6,13 +6,6 @@
|
|||
<field name="name">Accountants</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_analytic_line_to_invoice" model="ir.actions.act_window">
|
||||
<field name="name">Costs to invoice</field>
|
||||
<field name="res_model">report.account.analytic.line.to.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
</record>
|
||||
|
||||
<record id="action_aged_receivable" model="ir.actions.act_window">
|
||||
<field name="name">Receivable Accounts</field>
|
||||
<field name="res_model">report.account.receivable</field>
|
||||
|
@ -28,9 +21,6 @@
|
|||
<field name="domain">[('type','=','income')]</field>
|
||||
</record>
|
||||
|
||||
|
||||
<act_window domain="[('state','<>','close'),('partner_id','<>',False),('to_invoice', '<>', False)]" id="act_my_account" name="Accounts to invoice" res_model="account.analytic.account" src_model="res.users" view_mode="tree,form" view_type="form"/>
|
||||
|
||||
<record id="board_account_form" model="ir.ui.view">
|
||||
<field name="name">board.account.form</field>
|
||||
<field name="model">board.board</field>
|
||||
|
@ -38,25 +28,12 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Account Board">
|
||||
<hpaned>
|
||||
|
||||
<child1>
|
||||
|
||||
<action colspan="4" height="160" name="%(hr_timesheet_invoice.action_analytic_account_tree)d" string="Analytic accounts to close" width="510"/>
|
||||
|
||||
<action colspan="4" height="160" name="%(act_my_account)d" string="Accounts to invoice" width="510"/>
|
||||
|
||||
<action colspan="4" height="160" name="%(account.action_invoice_tree1)d" string="Draft Customer Invoices" domain="[('state','=','draft'),('type','=','out_invoice')]"/>
|
||||
</child1>
|
||||
|
||||
<child2>
|
||||
<button colspan="4" icon="terp-purchase" name="%(account_report.action_account_report_tree_view_indicator)d" string="My indicators" type="action"/>
|
||||
|
||||
<action colspan="4" height="220" name="%(action_account_analytic_line_to_invoice)d" string="Costs to invoice"/>
|
||||
|
||||
<action colspan="4" height="220" name="%(action_aged_receivable)d" string="Aged receivables"/>
|
||||
|
||||
<action colspan="4" height="220" name="%(action_aged_income)d" string="Aged income"/>
|
||||
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
|
@ -71,6 +48,7 @@
|
|||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_account_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
|
||||
<menuitem id="next_id_68" name="Accounting" parent="base.dashboard"
|
||||
groups="account.group_account_manager"/>
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -33,3 +33,5 @@ out after this mail was sent, please consider the present one as \
|
|||
void. Do not hesitate to contact our accounting department'
|
||||
}
|
||||
res_company()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -21,12 +21,12 @@
|
|||
import time
|
||||
import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from tools.translate import _
|
||||
from os.path import join as opj
|
||||
from operator import itemgetter
|
||||
from tools.translate import _
|
||||
from osv import fields, osv
|
||||
import netsvc
|
||||
import tools
|
||||
from os.path import join as opj
|
||||
|
||||
class account_installer(osv.osv_memory):
|
||||
_name = 'account.installer'
|
||||
|
|
|
@ -777,8 +777,14 @@ class account_invoice(osv.osv):
|
|||
|
||||
if inv.type in ('in_invoice', 'in_refund'):
|
||||
ref = inv.reference
|
||||
entry_type = 'journal_pur_voucher'
|
||||
if inv.type == 'in_refund':
|
||||
entry_type = 'cont_voucher'
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, inv.number)
|
||||
entry_type = 'journal_sale_vou'
|
||||
if inv.type == 'out_refund':
|
||||
entry_type = 'cont_voucher'
|
||||
|
||||
diff_currency_p = inv.currency_id.id <> company_currency
|
||||
# create one move line for the total and possibly adjust the other lines amount
|
||||
|
@ -849,7 +855,7 @@ class account_invoice(osv.osv):
|
|||
|
||||
line = self.finalize_invoice_move_lines(cr, uid, inv, line)
|
||||
|
||||
move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date}
|
||||
move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date, 'type': entry_type}
|
||||
period_id=inv.period_id and inv.period_id.id or False
|
||||
if not period_id:
|
||||
period_ids= self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d'))])
|
||||
|
@ -1073,10 +1079,20 @@ class account_invoice(osv.osv):
|
|||
else:
|
||||
amount_currency = False
|
||||
currency_id = False
|
||||
|
||||
pay_journal = self.pool.get('account.journal').read(cr, uid, pay_journal_id, ['type'], context=context)
|
||||
if invoice.type in ('in_invoice', 'out_invoice'):
|
||||
if pay_journal['type'] == 'bank':
|
||||
entry_type = 'bank_pay_voucher' # Bank payment
|
||||
else:
|
||||
entry_type = 'pay_voucher' # Cash payment
|
||||
else:
|
||||
entry_type = 'cont_voucher'
|
||||
if invoice.type in ('in_invoice', 'in_refund'):
|
||||
ref = invoice.reference
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, invoice.number)
|
||||
|
||||
# Pay attention to the sign for both debit/credit AND amount_currency
|
||||
l1 = {
|
||||
'debit': direction * pay_amount>0 and direction * pay_amount,
|
||||
|
@ -1107,7 +1123,7 @@ class account_invoice(osv.osv):
|
|||
l2['name'] = name
|
||||
|
||||
lines = [(0, 0, l1), (0, 0, l2)]
|
||||
move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date}
|
||||
move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date, 'type': entry_type}
|
||||
move_id = self.pool.get('account.move').create(cr, uid, move, context=context)
|
||||
|
||||
line_ids = []
|
||||
|
@ -1305,7 +1321,7 @@ class account_invoice_line(osv.osv):
|
|||
result['name'] = res.partner_ref
|
||||
|
||||
domain = {}
|
||||
result['uos_id'] = uom or res.uom_id.id or False
|
||||
result['uos_id'] = res.uom_id.id or uom or False
|
||||
if result['uos_id']:
|
||||
res2 = res.uom_id.category_id.id
|
||||
if res2 :
|
||||
|
@ -1328,8 +1344,22 @@ class account_invoice_line(osv.osv):
|
|||
if company.currency_id.id != currency.id:
|
||||
new_price = res_final['value']['price_unit'] * currency.rate
|
||||
res_final['value']['price_unit'] = new_price
|
||||
|
||||
if uom:
|
||||
uom = self.pool.get('product.uom').browse(cr, uid, uom, context=context)
|
||||
if res.uom_id.category_id.id == uom.category_id.id:
|
||||
new_price = res_final['value']['price_unit'] * uom.factor_inv
|
||||
res_final['value']['price_unit'] = new_price
|
||||
return res_final
|
||||
|
||||
def uos_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
|
||||
res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context)
|
||||
if 'uos_id' in res['value']:
|
||||
del res['value']['uos_id']
|
||||
if not uom:
|
||||
res['value']['price_unit'] = 0.0
|
||||
return res
|
||||
|
||||
def move_line_get(self, cr, uid, invoice_id, context=None):
|
||||
res = []
|
||||
tax_grouped = {}
|
||||
|
|
|
@ -89,7 +89,7 @@ class res_partner(osv.osv):
|
|||
_name = 'res.partner'
|
||||
_inherit = 'res.partner'
|
||||
_description = 'Partner'
|
||||
|
||||
|
||||
def _credit_debit_get(self, cr, uid, ids, field_names, arg, context):
|
||||
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
cr.execute("""SELECT l.partner_id, a.type, SUM(l.debit-l.credit)
|
||||
|
@ -114,7 +114,7 @@ class res_partner(osv.osv):
|
|||
if val is None: val=0
|
||||
res[pid][maps[type]] = (type=='receivable') and val or -val
|
||||
return res
|
||||
|
||||
|
||||
def _asset_difference_search(self, cr, uid, obj, name, type, args, context=None):
|
||||
if not len(args):
|
||||
return []
|
||||
|
@ -136,7 +136,7 @@ class res_partner(osv.osv):
|
|||
if not len(res):
|
||||
return [('id','=','0')]
|
||||
return [('id','in',map(itemgetter(0), res))]
|
||||
|
||||
|
||||
def _credit_search(self, cr, uid, obj, name, args, context):
|
||||
return self._asset_difference_search(cr, uid, obj, name, 'receivable', args, context=context)
|
||||
|
||||
|
@ -187,6 +187,7 @@ class res_partner(osv.osv):
|
|||
help="This payment term will be used instead of the default one for the current partner"),
|
||||
'ref_companies': fields.one2many('res.company', 'partner_id',
|
||||
'Companies that refers to partner'),
|
||||
'last_reconciliation_date': fields.datetime('Last Reconciliation Date', help='Date on which partner account entries reconciled last time')
|
||||
}
|
||||
res_partner()
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<menuitem
|
||||
action="action_account_fiscal_position_form"
|
||||
id="menu_action_account_fiscal_position_form"
|
||||
parent="account.menu_finance_accounting" sequence="20"/>
|
||||
parent="next_id_27" sequence="20"/>
|
||||
|
||||
<!--
|
||||
Partners Extension
|
||||
|
@ -122,10 +122,10 @@
|
|||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Partners info tab view-->
|
||||
|
||||
<act_window
|
||||
<act_window
|
||||
id="action_analytic_open"
|
||||
name="Analytic Accounts"
|
||||
res_model="account.analytic.account"
|
||||
|
@ -134,5 +134,16 @@
|
|||
view_type="form"
|
||||
view_mode="tree,form,graph,calendar"/>
|
||||
|
||||
<record id="view_res_partner_reconcile" model="ir.ui.view">
|
||||
<field name="name">res.partner.form.reconcile</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="credit_limit" position="after">
|
||||
<field name="last_reconciliation_date"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_invoiceinvoice0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_finance_invoice"/>
|
||||
<field name="menu_id" ref="account.menu_finance_receivables"/>
|
||||
<field name="model_id" ref="account.model_account_invoice"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Create Invoice"""" name="name"/>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_supplierinvoiceinvoice0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_finance_invoice"/>
|
||||
<field name="menu_id" ref="account.menu_finance_payables"/>
|
||||
<field name="model_id" ref="account.model_account_invoice"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Create Invoice"""" name="name"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -46,7 +46,7 @@ class account_journal(osv.osv):
|
|||
_inherit="account.journal"
|
||||
|
||||
_columns = {
|
||||
'analytic_journal_id':fields.many2one('account.analytic.journal', 'Analytic Journal'),
|
||||
'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal',help="Journal for analytic entries"),
|
||||
}
|
||||
account_journal()
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
|
||||
</record>
|
||||
<!--<menuitem id="menu_analytic_account" name="Analytic Accounts" parent="account.menu_analytic_accounting"/>-->
|
||||
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="account.menu_analytic_accounting"/>
|
||||
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="menu_analytic"/>
|
||||
|
||||
<record id="act_account_renew_view" model="ir.actions.act_window">
|
||||
<field name="name">Accounts to Renew</field>
|
||||
|
@ -114,7 +114,7 @@
|
|||
</record>
|
||||
|
||||
<record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Chart of Accounts</field>
|
||||
<field name="name">Chart of Analytic Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
|
@ -122,10 +122,10 @@
|
|||
<field name="view_mode">form,graph</field>
|
||||
<field name="view_id" ref="view_account_analytic_account_tree"/>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_account_analytic_account_tree2"
|
||||
id="account_analytic_def_chart"
|
||||
parent="account_analytic_def_account"/>
|
||||
<!-- <menuitem-->
|
||||
<!-- action="action_account_analytic_account_tree2"-->
|
||||
<!-- id="account_analytic_def_chart"-->
|
||||
<!-- parent="account_analytic_def_account"/>-->
|
||||
<!-- <menuitem action="action_account_analytic_account_tree2" id="account_analytic_chart" parent="account.menu_finance_charts"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_analytic_account_chart" menu="False" model="account.analytic.account" name="account.analytic.account.chart" string="Analytic Chart of Accounts"/>
|
||||
|
@ -206,14 +206,14 @@
|
|||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<field name="view_id" ref="view_account_analytic_line_tree"/>
|
||||
</record>
|
||||
<wizard id="action_account_analytic_line" menu="False" model="account.analytic.line" name="account.analytic.line" string="Entries by Line"/>
|
||||
<menuitem id="next_id_41" name="Analytic Entries" parent="account.menu_finance_entries"/>
|
||||
<!-- <wizard id="action_account_analytic_line" menu="False" model="account.analytic.line" name="account.analytic.line" string="Entries by Line"/>-->
|
||||
<!-- <menuitem id="next_id_41" name="Analytic Entries" parent="account.menu_finance_entries"/>-->
|
||||
<!-- Entries by Line -->
|
||||
|
||||
<menuitem icon="STOCK_JUSTIFY_FILL"
|
||||
action="action_project_account_analytic_line_form"
|
||||
id="account_entries_analytic_entries"
|
||||
parent="next_id_41"/>
|
||||
<!-- <menuitem icon="STOCK_JUSTIFY_FILL"-->
|
||||
<!-- action="action_project_account_analytic_line_form"-->
|
||||
<!-- id="account_entries_analytic_entries"-->
|
||||
<!-- parent="next_id_41"/>-->
|
||||
|
||||
<record id="action_account_tree1" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Entries</field>
|
||||
|
@ -293,31 +293,49 @@
|
|||
</field>
|
||||
</record>
|
||||
<record id="action_account_analytic_journal_form" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Journal Definition</field>
|
||||
<field name="name">Analytic Journals</field>
|
||||
<field name="res_model">account.analytic.journal</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="account.menu_analytic_accounting"/>
|
||||
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic"/>
|
||||
|
||||
#
|
||||
# Open journal entries
|
||||
#
|
||||
|
||||
<record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<field name="name">Entries of Open Analytic Journals</field>
|
||||
<field name="name">Analytic Journal Items</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id','=',active_id)]</field>
|
||||
</record>
|
||||
<record id="ir_open_account_journal_analytic" model="ir.values">
|
||||
<field eval="'tree_but_open'" name="key2"/>
|
||||
<field eval="'account.analytic.journal'" name="model"/>
|
||||
<field name="name">Open Analytic Journal</field>
|
||||
<field eval="'ir.actions.act_window,%d'%action_account_analytic_journal_open_form" name="value"/>
|
||||
<field eval="True" name="object"/>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_entries"/>
|
||||
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<field name="name">Check Register</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id','=',active_id)]</field>
|
||||
</record> -->
|
||||
<!-- <menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_bank_and_cash"/>-->
|
||||
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<field name="name">Checks Register</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id','=',active_id)]</field>
|
||||
</record> -->
|
||||
<!-- <menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_bank_and_cash"/>-->
|
||||
|
||||
<!-- <record id="ir_open_account_journal_analytic" model="ir.values">-->
|
||||
<!-- <field eval="'tree_but_open'" name="key2"/>-->
|
||||
<!-- <field eval="'account.analytic.journal'" name="model"/>-->
|
||||
<!-- <field name="name">Open Analytic Journal</field>-->
|
||||
<!-- <field eval="'ir.actions.act_window,%d'%action_account_analytic_journal_open_form" name="value"/>-->
|
||||
<!-- <field eval="True" name="object"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
#
|
||||
# Reporting
|
||||
|
@ -331,13 +349,13 @@
|
|||
<menuitem action="action_account_analytic_journal_tree" id="account_analytic_journal_print" parent="account.next_id_40"/>
|
||||
|
||||
|
||||
<record id="action_account_analytic_journal_tree2" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Entries by Journal</field>
|
||||
<field name="res_model">account.analytic.journal</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="view_account_analytic_journal_tree"/>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_tree2" id="account_analytic_journal_entries" parent="account.next_id_41"/>
|
||||
<!-- <record id="action_account_analytic_journal_tree2" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">Analytic Entries by Journal</field>-->
|
||||
<!-- <field name="res_model">account.analytic.journal</field>-->
|
||||
<!-- <field name="view_type">tree</field>-->
|
||||
<!-- <field name="view_id" ref="view_account_analytic_journal_tree"/>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem action="action_account_analytic_journal_tree2" id="account_analytic_journal_entries" parent="account.next_id_41"/>-->
|
||||
|
||||
#
|
||||
# Statistics
|
||||
|
|
|
@ -55,51 +55,3 @@ class account_analytic_cost_ledger_journal_report(osv.osv_memory):
|
|||
|
||||
account_analytic_cost_ledger_journal_report()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
#import time
|
||||
#import wizard
|
||||
#
|
||||
#_form = '''<?xml version="1.0"?>
|
||||
#<form string="Select period">
|
||||
# <separator string="Cost Legder for period" colspan="4"/>
|
||||
# <field name="date1"/>
|
||||
# <field name="date2"/>
|
||||
# <separator string="and Journals" colspan="4"/>
|
||||
# <field name="journal" colspan="4"/>
|
||||
#</form>'''
|
||||
#
|
||||
#_fields = {
|
||||
# 'date1': {'string':'Start of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-01-01')},
|
||||
# 'date2': {'string':'End of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
|
||||
# 'journal': {'string':'Journals','type':'many2many', 'relation':'account.analytic.journal'},
|
||||
#}
|
||||
#
|
||||
#
|
||||
#class wizard_report(wizard.interface):
|
||||
# states = {
|
||||
# 'init': {
|
||||
# 'actions': [],
|
||||
# 'result': {
|
||||
# 'type': 'form',
|
||||
# 'arch': _form,
|
||||
# 'fields': _fields,
|
||||
# 'state': [
|
||||
# ('end','Cancel'),
|
||||
# ('report','Print')
|
||||
# ]
|
||||
# }
|
||||
# },
|
||||
# 'report': {
|
||||
# 'actions': [],
|
||||
# 'result': {
|
||||
# 'type': 'print',
|
||||
# 'report': 'account.analytic.account.quantity_cost_ledger',
|
||||
# 'state': 'end'
|
||||
# }
|
||||
# },
|
||||
# }
|
||||
#
|
||||
#wizard_report('account.analytic.account.quantity_cost_ledger.report')
|
||||
#
|
||||
## vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -32,26 +32,26 @@ class project_account_analytic_line(osv.osv_memory):
|
|||
def action_open_window(self, cr, uid, ids, context={}):
|
||||
mod_obj =self.pool.get('ir.model.data')
|
||||
domain = []
|
||||
for data in self.read(cr, uid, ids, context=context):
|
||||
from_date = data['from_date']
|
||||
to_date = data['to_date']
|
||||
if from_date and to_date:
|
||||
domain = [('date','>=',from_date), ('date','<=',to_date)]
|
||||
elif from_date:
|
||||
domain = [('date','>=',from_date)]
|
||||
elif to_date:
|
||||
domain = [('date','<=',to_date)]
|
||||
result = mod_obj._get_id(cr, uid, 'account', 'view_account_analytic_line_filter')
|
||||
id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
|
||||
return {
|
||||
'name': _('Analytic Entries by line'),
|
||||
'view_type': 'form',
|
||||
"view_mode": 'tree,form',
|
||||
'res_model': 'account.analytic.line',
|
||||
'type': 'ir.actions.act_window',
|
||||
'domain': domain,
|
||||
'search_view_id': id['res_id'],
|
||||
}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
from_date = data['from_date']
|
||||
to_date = data['to_date']
|
||||
if from_date and to_date:
|
||||
domain = [('date','>=',from_date), ('date','<=',to_date)]
|
||||
elif from_date:
|
||||
domain = [('date','>=',from_date)]
|
||||
elif to_date:
|
||||
domain = [('date','<=',to_date)]
|
||||
result = mod_obj._get_id(cr, uid, 'account', 'view_account_analytic_line_filter')
|
||||
id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
|
||||
return {
|
||||
'name': _('Analytic Entries by line'),
|
||||
'view_type': 'form',
|
||||
"view_mode": 'tree,form',
|
||||
'res_model': 'account.analytic.line',
|
||||
'type': 'ir.actions.act_window',
|
||||
'domain': domain,
|
||||
'search_view_id': id['res_id'],
|
||||
}
|
||||
|
||||
project_account_analytic_line()
|
||||
|
||||
|
|
|
@ -24,7 +24,11 @@
|
|||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_invoice" model="ir.ui.menu">
|
||||
<record id="menu_finance_receivables" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_invoice')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_payables" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_invoice')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,11 +15,10 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
from osv import fields,osv
|
||||
|
||||
class ir_sequence_fiscalyear(osv.osv):
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
-
|
||||
In order to test change currency wizard I create an invoice with currency "EUR" and change it to "USD" using the wizard
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_currency}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
invoice_line:
|
||||
- account_id: account.a_sale
|
||||
name: '[PC1] Basic PC'
|
||||
price_unit: 450.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
I check that Initially customer invoice is in the draft state
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_currency, string: Customer Invoice is in Draft state}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of invoice to proforma2 by clicking PRO-FORMA button
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_proforma2, ref: account_invoice_currency}
|
||||
-
|
||||
I check that now customer invoice is in the "proforma2" state
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_currency}:
|
||||
- state == 'proforma2'
|
||||
-
|
||||
Now I select USD as new currency
|
||||
-
|
||||
!record {model: account.change.currency, id: account_change_currency_0}:
|
||||
currency_id: base.USD
|
||||
-
|
||||
I clicked on Change Currency button to change the currency
|
||||
-
|
||||
!python {model: account.change.currency}: |
|
||||
try:
|
||||
self.view_init(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
|
||||
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
|
||||
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
|
||||
})
|
||||
self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
|
||||
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
|
||||
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
|
||||
})
|
||||
except:
|
||||
print "You can not change currency for Open Invoice !"
|
||||
-
|
||||
I can't change the currency of invoice when it is not in draft state so i change the state to cancel
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_cancel, ref: account_invoice_currency}
|
||||
-
|
||||
I change the state to "Draft"
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
self.action_cancel_draft(cr, uid, [ref("account_invoice_currency")], {"lang": 'en_US',
|
||||
"tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_invoice_tree1")],
|
||||
"type": "out_invoice", "active_id": ref("account.menu_action_invoice_tree1"),
|
||||
})
|
||||
-
|
||||
I change the currency.
|
||||
-
|
||||
!record {model: account.change.currency, id: account_change_currency_0}:
|
||||
currency_id: base.USD
|
||||
-
|
||||
I clicked on Change Currency button to change the currency
|
||||
-
|
||||
!python {model: account.change.currency}: |
|
||||
self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
|
||||
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
|
||||
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
|
||||
})
|
||||
-
|
||||
I check that the currency is changed successfully
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_currency, string: Currency changed from EUR to USD}:
|
||||
- currency_id.id == ref("base.USD")
|
|
@ -1,9 +1,7 @@
|
|||
-
|
||||
In order to test account invoice i create a new customer invoice
|
||||
In order to test account invoice I create a new customer invoice
|
||||
-
|
||||
Creating a account.invoice record
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_0}:
|
||||
!record {model: account.invoice, id: account_invoice_customer0}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_zen
|
||||
address_invoice_id: base.res_partner_address_zen
|
||||
|
@ -21,36 +19,30 @@
|
|||
partner_id: base.res_partner_3
|
||||
reference_type: none
|
||||
-
|
||||
I check that Initially customer invoice is in the draft state
|
||||
I check that Initially customer invoice is in the "Draft" state
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_0}:
|
||||
!assert {model: account.invoice, id: account_invoice_customer0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of invoice to proforma2 by clicking PRO-FORMA button
|
||||
I change the state of invoice to "Proforma2" by clicking PRO-FORMA button
|
||||
-
|
||||
Performing a workflow action invoice_proforma2 on module account.invoice
|
||||
!workflow {model: account.invoice, action: invoice_proforma2, ref: account_invoice_customer0}
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_proforma2, ref: account_invoice_0}
|
||||
I check that the invoice state is now "Proforma2"
|
||||
-
|
||||
I check that the invoice state is now proforma2
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_0}:
|
||||
!assert {model: account.invoice, id: account_invoice_customer0}:
|
||||
- state == 'proforma2'
|
||||
-
|
||||
I create invoice by clicking on Create button
|
||||
-
|
||||
Performing a workflow action invoice_open on module account.invoice
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_customer0}
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_0}
|
||||
I check that the invoice state is "Open"
|
||||
-
|
||||
I check that the invoice state is now open
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_0}:
|
||||
!assert {model: account.invoice, id: account_invoice_customer0}:
|
||||
- state == 'open'
|
||||
-
|
||||
I make a partial payment of 1000 by clicking on Pay Invoice button
|
||||
-
|
||||
Creating a account.invoice.pay record
|
||||
I create a record for partial payment of 1000 EUR.
|
||||
-
|
||||
!record {model: account.invoice.pay, id: account_invoice_pay_first0}:
|
||||
amount: 1000.0
|
||||
|
@ -58,25 +50,21 @@
|
|||
journal_id: account.sales_journal
|
||||
name: First payment for [PC3] Medium PC to Distrib PC
|
||||
period_id: account.period_5
|
||||
|
||||
|
||||
-
|
||||
Performing an osv_memory action pay_and_reconcile on module account.invoice.pay
|
||||
I make partial payment by clicking on Partial Payment button
|
||||
-
|
||||
!python {model: account.invoice.pay}: |
|
||||
self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_first0")], {"lang":
|
||||
'en_US', "active_model": "account.invoice", "tz": False, "record_id": 3, "active_ids":
|
||||
[ref("account_invoice_0")], "type": "out_invoice", "active_id": ref("account_invoice_0"),
|
||||
[ref("account_invoice_customer0")], "type": "out_invoice", "active_id": ref("account_invoice_customer0"),
|
||||
})
|
||||
-
|
||||
I check that the invoice state is still open
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_0}:
|
||||
!assert {model: account.invoice, id: account_invoice_customer0}:
|
||||
- state == 'open'
|
||||
-
|
||||
I make second partial payment of 6000 by clicking on Pay Invoice button
|
||||
-
|
||||
Creating a account.invoice.pay record
|
||||
I make second partial payment of 6000 EUR.
|
||||
-
|
||||
!record {model: account.invoice.pay, id: account_invoice_pay_second0}:
|
||||
amount: 6000.0
|
||||
|
@ -84,19 +72,17 @@
|
|||
journal_id: account.sales_journal
|
||||
name: Second payment for [PC3] Medium PC to Distrib PC
|
||||
period_id: account.period_5
|
||||
|
||||
-
|
||||
Performing an osv_memory action pay_and_reconcile on module account.invoice.pay
|
||||
I make partial payment by clicking on Partial Payment button
|
||||
|
||||
-
|
||||
!python {model: account.invoice.pay}: |
|
||||
self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_second0")], {"lang":
|
||||
'en_US', "active_model": "account.invoice", "tz": False, "record_id": 3, "active_ids":
|
||||
[ref("account_invoice_0")], "type": "out_invoice", "active_id": ref("account_invoice_0"),
|
||||
[ref("account_invoice_customer0")], "type": "out_invoice", "active_id": ref("account_invoice_customer0"),
|
||||
})
|
||||
-
|
||||
I make final partial payment of 2000 by clicking on Pay Invoice button
|
||||
-
|
||||
Creating a account.invoice.pay record
|
||||
I make final partial payment of 2000 EUR
|
||||
-
|
||||
!record {model: account.invoice.pay, id: account_invoice_pay_final0}:
|
||||
amount: 2000.0
|
||||
|
@ -105,39 +91,39 @@
|
|||
name: Final payment for [PC3] Medium PC to Distrib PC
|
||||
period_id: account.period_5
|
||||
|
||||
|
||||
-
|
||||
Performing an osv_memory action pay_and_reconcile on module account.invoice.pay
|
||||
I make partial payment by clicking on Partial Payment button
|
||||
|
||||
-
|
||||
!python {model: account.invoice.pay}: |
|
||||
self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_final0")], {"lang":
|
||||
'en_US', "active_model": "account.invoice", "tz": False, "record_id": 3, "active_ids":
|
||||
[ref("account_invoice_0")], "type": "out_invoice", "active_id": ref("account_invoice_0"),
|
||||
[ref("account_invoice_customer0")], "type": "out_invoice", "active_id": ref("account_invoice_customer0"),
|
||||
})
|
||||
|
||||
-
|
||||
I check that the invoice state is now Done
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_0}:
|
||||
!assert {model: account.invoice, id: account_invoice_customer0}:
|
||||
- state == 'paid'
|
||||
-
|
||||
I check that an payment entry gets created in the account.move.line
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_invoice_0"))
|
||||
acc_id=self.browse(cr, uid, ref("account_invoice_customer0"))
|
||||
assert(acc_id.move_id)
|
||||
#-
|
||||
# I refund the invoice
|
||||
#-
|
||||
# Creating a account.invoice.refund record
|
||||
#-
|
||||
# !record {model: account.invoice.refund, id: account_invoice_refund_0}:
|
||||
# description: Refund
|
||||
#
|
||||
#-
|
||||
# Performing an osv_memory action invoice_refund on module account.invoice.refund
|
||||
#-
|
||||
# !python {model: account.invoice.refund}: |
|
||||
# self.invoice_refund(cr, uid, [ref("account_invoice_refund_0")], {"lang": 'en_US', "tz": False, "active_model": "account.invoice", "active_ids": [ref("account.account_invoice_0")], "type": "out_invoice", "active_id": ref("account.account_invoice_0"), })
|
||||
# return self.compute_refund(cr, uid, [ref("account_invoice_refund_0")], "refund" {"lang": 'en_US',"tz": False, "active_model": "account.invoice", "active_ids": [ref("account.account_invoice_0")], "type": "out_invoice", "active_id": ref("account.account_invoice_0"), })
|
||||
-
|
||||
I refund the invoice Using Credit Note
|
||||
-
|
||||
!record {model: account.invoice.refund, id: account_invoice_refund_0}:
|
||||
description: Refund To China Export
|
||||
period: account.period_5
|
||||
-
|
||||
I clicked on refund button
|
||||
-
|
||||
!python {model: account.invoice.refund}: |
|
||||
self.invoice_refund(cr, uid, [ref("account_invoice_refund_0")], {"lang": 'en_US', "tz": False, "active_model": "account.invoice", "active_ids": [ref("account.account_invoice_customer0")], "type": "out_invoice", "active_id": ref("account.account_invoice_customer0"), })
|
||||
-
|
||||
I checked that a new entry with state "Draft" created in account move line
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
-
|
||||
In order to test Generate Fiscalyear Opening Entries wizard of OpenERP I first create a fiscalyear "Fiscal Year 2011" to which the entries will move
|
||||
-
|
||||
!record {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0}:
|
||||
code: FY2011
|
||||
company_id: base.main_company
|
||||
date_start: '2011-01-01'
|
||||
date_stop: '2011-12-31'
|
||||
name: Fiscal Year 2011
|
||||
-
|
||||
I create a period "Jan2011" for the new fiscalyear
|
||||
-
|
||||
!record {model: account.period, id: account_period_jan11}:
|
||||
company_id: base.main_company
|
||||
date_start: '2011-01-01'
|
||||
date_stop: '2011-12-31'
|
||||
fiscalyear_id: account_fiscalyear_fiscalyear0
|
||||
name: Jan2011
|
||||
special: 1
|
||||
|
||||
-
|
||||
I made modification in journal so it can move entries
|
||||
-
|
||||
!record {model: account.journal, id: account.sales_journal}:
|
||||
centralisation: 1
|
||||
|
||||
-
|
||||
I called the Generate Fiscalyear Opening Entries wizard
|
||||
-
|
||||
!record {model: account.fiscalyear.close, id: account_fiscalyear_close_0}:
|
||||
fy2_id: account_fiscalyear_fiscalyear0
|
||||
fy_id: account.data_fiscalyear
|
||||
journal_id: account.sales_journal
|
||||
period_id: account_period_jan11
|
||||
report_name: End of Fiscal Year Entry
|
||||
sure: 1
|
||||
-
|
||||
I clicked on create Button
|
||||
|
||||
-
|
||||
!python {model: account.fiscalyear.close}: |
|
||||
self.data_save(cr, uid, [ref("account_fiscalyear_close_0")], {"lang": 'en_US',
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close")],
|
||||
"tz": False, "active_id": ref("account.menu_wizard_fy_close"), })
|
||||
|
||||
-
|
||||
I check the opening entries By using "Entries by Line wizard"
|
||||
-
|
||||
!record {model: account.move.journal, id: account_move_journal_0}:
|
||||
journal_id: account.sales_journal
|
||||
period_id: account_period_jan11
|
||||
-
|
||||
I clicked on Open Journal Button to check the entries
|
||||
|
||||
-
|
||||
!python {model: account.move.journal}: |
|
||||
self.action_open_window(cr, uid, [ref("account_move_journal_0")], {"lang": 'en_US',
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
|
||||
"tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
|
||||
})
|
||||
|
||||
-
|
||||
In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011"
|
||||
-
|
||||
!record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}:
|
||||
fyear_id: account.data_fiscalyear
|
||||
-
|
||||
I clicked on Open button
|
||||
-
|
||||
!python {model: account.open.closed.fiscalyear}: |
|
||||
self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang":
|
||||
'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")],
|
||||
"tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), })
|
||||
-
|
||||
I check the opening entries By using "Entries by Line wizard"
|
||||
-
|
||||
!record {model: account.move.journal, id: account_move_journal_2}:
|
||||
journal_id: account.sales_journal
|
||||
period_id: account_period_jan11
|
||||
|
||||
-
|
||||
I checked the Opening entries are cancelled successfully
|
||||
-
|
||||
!python {model: account.move.journal}: |
|
||||
self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US',
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
|
||||
"tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
|
||||
})
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
-
|
||||
In order to check the Close a Fiscal Year wizard in OpenERP I first create a Fiscalyear
|
||||
-
|
||||
!record {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0}:
|
||||
code: FY2011
|
||||
company_id: base.main_company
|
||||
date_start: '2011-01-01'
|
||||
date_stop: '2011-12-31'
|
||||
name: Fiscal Year 2011
|
||||
-
|
||||
I create monthly Periods for this fiscalyear
|
||||
-
|
||||
!python {model: account.fiscalyear}: |
|
||||
self.create_period(cr, uid, [ref("account_fiscalyear_fiscalyear0")], {"lang":
|
||||
'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_account_fiscalyear_form")],
|
||||
"tz": False, "active_id": ref("account.menu_action_account_fiscalyear_form"),
|
||||
})
|
||||
-
|
||||
I check that the fiscalyear state is "Draft"
|
||||
-
|
||||
!assert {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0, string: Fiscal Year is in Draft state}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I run the Close a Fiscalyear wizard to close this fiscalyear
|
||||
-
|
||||
!record {model: account.fiscalyear.close.state, id: account_fiscalyear_close_state_0}:
|
||||
fy_id: account_fiscalyear_fiscalyear0
|
||||
sure: 1
|
||||
-
|
||||
I clicked on Close States Button to close fiscalyear
|
||||
|
||||
-
|
||||
!python {model: account.fiscalyear.close.state}: |
|
||||
self.data_save(cr, uid, [ref("account_fiscalyear_close_state_0")], {"lang": 'en_US',
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close_state")],
|
||||
"tz": False, "active_id": ref("account.menu_wizard_fy_close_state"), })
|
||||
-
|
||||
I check that the fiscalyear state is now "Done"
|
||||
-
|
||||
!assert {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0, string: Fiscal Year is in Done state}:
|
||||
- state == 'done'
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
-
|
||||
In order to test Confirm Draft Invoice wizard I create an invoice and confirm it with this wizard
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_state}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
invoice_line:
|
||||
- account_id: account.a_sale
|
||||
name: '[PC1] Basic PC'
|
||||
price_unit: 450.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.bank_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
reference_type: none
|
||||
-
|
||||
I check that Initially customer invoice state is "Draft"
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_state}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I called the "Confirm Draft Invoices" wizard
|
||||
-
|
||||
!record {model: account.invoice.confirm, id: account_invoice_confirm_0}:
|
||||
{}
|
||||
-
|
||||
I clicked on Confirm Invoices Button
|
||||
-
|
||||
!python {model: account.invoice.confirm}: |
|
||||
self.invoice_confirm(cr, uid, [ref("account_invoice_confirm_0")], {"lang": 'en_US',
|
||||
"tz": False, "active_model": "account.invoice", "active_ids": [ref("account_invoice_state")],
|
||||
"type": "out_invoice", "active_id": ref("account_invoice_state"), })
|
||||
-
|
||||
I check that customer invoice state is "Open"
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_state}:
|
||||
- state == 'open'
|
||||
-
|
||||
I Modified the journal record so it can cancel invoice
|
||||
-
|
||||
!record {model: account.journal, id: account.bank_journal}:
|
||||
update_posted: 1
|
||||
|
||||
|
||||
-
|
||||
In order to check the "Cancel Selected Invoices" wizard in openerp I cancelled this open invoice using this wizard
|
||||
-
|
||||
!record {model: account.invoice.cancel, id: account_invoice_cancel_0}:
|
||||
{}
|
||||
|
||||
-
|
||||
I clicked on Cancel Invoices Button
|
||||
-
|
||||
!python {model: account.invoice.cancel}: |
|
||||
self.invoice_cancel(cr, uid, [ref("account_invoice_cancel_0")], {"lang": 'en_US',
|
||||
"tz": False, "active_model": "account.invoice", "active_ids": [ref("account_invoice_state")],
|
||||
"type": "out_invoice", "active_id": ref("account_invoice_state"), })
|
||||
|
||||
-
|
||||
I check that customer invoice is in the cancel state
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_state}:
|
||||
- state == 'cancel'
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
|
||||
-
|
||||
In order to test close period wizard I create a period then close it and checked it's state
|
||||
-
|
||||
!record {model: account.period, id: account_period_jan0}:
|
||||
company_id: base.main_company
|
||||
date_start: '2010-01-01'
|
||||
date_stop: '2010-01-31'
|
||||
fiscalyear_id: account.data_fiscalyear
|
||||
name: Jan-2010
|
||||
special: 1
|
||||
|
||||
-
|
||||
I check that the period state is "Draft"
|
||||
-
|
||||
!assert {model: account.period, id: account_period_jan0, string: Period is in Draft state}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I use "Close a Period" wizard to close period Jan-2010
|
||||
-
|
||||
!record {model: account.period.close, id: account_period_close_0}:
|
||||
sure: 1
|
||||
-
|
||||
I clicked on Close Period Button to close Period
|
||||
|
||||
-
|
||||
!python {model: account.period.close}: |
|
||||
self.data_save(cr, uid, [ref("account_period_close_0")], {"lang": 'en_US', "active_model":
|
||||
"account.period", "active_ids": [ref("account_period_jan0")], "tz": False, "active_id":
|
||||
ref("account_period_jan0"), })
|
||||
-
|
||||
I check that the period state is "Done"
|
||||
-
|
||||
!assert {model: account.period, id: account_period_jan0, string: Period is in Done state}:
|
||||
- state == 'done'
|
|
@ -1,9 +1,7 @@
|
|||
-
|
||||
In order to test account invoice i create a new supplier invoice
|
||||
In order to test account invoice I create a new supplier invoice
|
||||
-
|
||||
Creating a account.invoice record
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_1}:
|
||||
!record {model: account.invoice, id: account_invoice_supplier0}:
|
||||
account_id: account.a_pay
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
|
@ -22,25 +20,21 @@
|
|||
reference_type: none
|
||||
type: in_invoice
|
||||
-
|
||||
I check that Initially supplier invoice is in the draft state
|
||||
I check that Initially supplier invoice state is "Draft"
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_1}:
|
||||
!assert {model: account.invoice, id: account_invoice_supplier0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of invoice to open by clicking Validate button
|
||||
-
|
||||
Performing a workflow action invoice_open on module account.invoice
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_supplier0}
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_1}
|
||||
I check that the invoice state is now "Open"
|
||||
-
|
||||
I check that the invoice state is now open
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_1}:
|
||||
!assert {model: account.invoice, id: account_invoice_supplier0}:
|
||||
- state == 'open'
|
||||
-
|
||||
I make a partial payment of 2000 by clicking on Pay Invoice button
|
||||
-
|
||||
Creating a account.invoice.pay record
|
||||
I make a partial payment of 2000 EUR
|
||||
-
|
||||
!record {model: account.invoice.pay, id: account_invoice_pay_firstpaymenttoaxelorforbasicpc0}:
|
||||
amount: 2000.0
|
||||
|
@ -48,24 +42,21 @@
|
|||
journal_id: account.sales_journal
|
||||
name: First Payment to Axelor for Basic PC
|
||||
period_id: account.period_5
|
||||
|
||||
-
|
||||
Performing an osv_memory action pay_and_reconcile on module account.invoice.pay
|
||||
I make partial payment by clicking on Partial Payment button
|
||||
-
|
||||
!python {model: account.invoice.pay}: |
|
||||
self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_firstpaymenttoaxelorforbasicpc0")],
|
||||
{"lang": 'en_US', "active_model": "account.invoice", "tz": False, "record_id":
|
||||
25, "active_ids": [ref("account_invoice_1")], "type": "in_invoice", "active_id":
|
||||
ref("account_invoice_1"), })
|
||||
25, "active_ids": [ref("account_invoice_supplier0")], "type": "in_invoice", "active_id":
|
||||
ref("account_invoice_supplier0"), })
|
||||
-
|
||||
I check that the invoice state is still open
|
||||
I check that the invoice state is still "Open"
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_1}:
|
||||
!assert {model: account.invoice, id: account_invoice_supplier0}:
|
||||
- state == 'open'
|
||||
-
|
||||
I make final partial payment of 1000 by clicking on Pay Invoice button
|
||||
-
|
||||
Creating a account.invoice.pay record
|
||||
I make final partial payment of 1000 EUR
|
||||
-
|
||||
!record {model: account.invoice.pay, id: account_invoice_pay_finalpaymenttoaxelorforbasicpc0}:
|
||||
amount: 1000.0
|
||||
|
@ -73,45 +64,23 @@
|
|||
journal_id: account.sales_journal
|
||||
name: Final Payment to Axelor for Basic PC
|
||||
period_id: account.period_5
|
||||
|
||||
|
||||
-
|
||||
Performing an osv_memory action pay_and_reconcile on module account.invoice.pay
|
||||
I make partial payment by clicking on Partial Payment button
|
||||
-
|
||||
!python {model: account.invoice.pay}: |
|
||||
self.pay_and_reconcile(cr, uid, [ref("account_invoice_pay_finalpaymenttoaxelorforbasicpc0")],
|
||||
{"lang": 'en_US', "active_model": "account.invoice", "tz": False, "record_id":
|
||||
25, "active_ids": [ref("account_invoice_1")], "type": "in_invoice", "active_id":
|
||||
ref("account_invoice_1"), })
|
||||
25, "active_ids": [ref("account_invoice_supplier0")], "type": "in_invoice", "active_id":
|
||||
ref("account_invoice_supplier0"), })
|
||||
|
||||
-
|
||||
I check that the invoice state is now Done
|
||||
I check that the invoice state is now "Done"
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_1}:
|
||||
!assert {model: account.invoice, id: account_invoice_supplier0}:
|
||||
- state == 'paid'
|
||||
-
|
||||
I check that an payment entry gets created in the account.move.line
|
||||
I check that an payment entry gets created in the account move line
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_invoice_1"))
|
||||
acc_id=self.browse(cr, uid, ref("account_invoice_supplier0"))
|
||||
assert(acc_id.move_id)
|
||||
#-
|
||||
# I refund the invoice
|
||||
#-
|
||||
# Creating a account.invoice.refund record
|
||||
#-
|
||||
# !record {model: account.invoice.refund, id: account_invoice_refund_0}:
|
||||
# date: '2010-06-22'
|
||||
# description: 'Refund By Axelor '
|
||||
#
|
||||
#
|
||||
#-
|
||||
# Performing an osv_memory action invoice_refund on module account.invoice.refund
|
||||
#-
|
||||
# !python {model: account.invoice.refund}: |
|
||||
# self.invoice_refund(cr, uid, [ref("account_invoice_refund_0")], {"lang": 'en_US',
|
||||
# "tz": False, "active_model": "account.invoice", "active_ids": [ref("account_invoice_1")],
|
||||
# "type": "in_invoice", "active_id": ref("account_invoice_1"), })
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
-
|
||||
In order to test account use models wizard in OpenERP I create an account model record
|
||||
-
|
||||
!record {model: account.model, id: account_model_mymodelonyears0}:
|
||||
journal_id: account.expenses_journal
|
||||
lines_id:
|
||||
- account_id: account.a_recv
|
||||
credit: 0.0
|
||||
debit: 0.0
|
||||
name: test1
|
||||
sequence: 0.0
|
||||
date: today
|
||||
quantity: 0.0
|
||||
name: My Model on %(year)s
|
||||
|
||||
-
|
||||
I create an account use model record
|
||||
|
||||
-
|
||||
!record {model: account.use.model, id: account_use_model_0}:
|
||||
{}
|
||||
|
||||
-
|
||||
I create entries.
|
||||
-
|
||||
!python {model: account.use.model}: |
|
||||
self.create_entries(cr, uid, [ref("account_use_model_0")], {"lang": 'en_US', "active_model":
|
||||
"account.model", "active_ids": [ref("account_model_mymodelonyears0")], "tz":
|
||||
False, "active_id": ref("account_model_mymodelonyears0"), })
|
||||
-
|
||||
I create an account use model record
|
||||
-
|
||||
!record {model: account.use.model, id: account_use_model_1}:
|
||||
{}
|
||||
|
||||
-
|
||||
I checked that Moves are created successfully
|
||||
|
||||
-
|
||||
!python {model: account.use.model}: |
|
||||
self.open_moves(cr, uid, [ref("account_use_model_1")], {"lang": 'en_US', "move_ids":
|
||||
[], "tz": False, "active_model": "account.model", "active_ids": [ref("account_model_mymodelonyears0")],
|
||||
"active_id": ref("account_model_mymodelonyears0"), })
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
-
|
||||
In order to test Validate Ledger Postings wizard in OpenERP I created a account move
|
||||
|
||||
-
|
||||
!record {model: account.move, id: account_move_0}:
|
||||
date: '2010-06-07'
|
||||
journal_id: account.bank_journal
|
||||
line_id:
|
||||
- account_id: account.cash
|
||||
amount_currency: 0.0
|
||||
credit: 2000.0
|
||||
date: '2010-06-07'
|
||||
debit: 0.0
|
||||
journal_id: account.bank_journal
|
||||
name: Basic Computer
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
period_id: account.period_6
|
||||
ref: '2010010'
|
||||
tax_amount: 0.0
|
||||
- journal_id: account.bank_journal
|
||||
period_id: account.period_6
|
||||
ref: '2010010'
|
||||
tax_amount: 0.0
|
||||
account_id: account.a_recv
|
||||
amount_currency: 0.0
|
||||
credit: 0.0
|
||||
date: '2010-06-07'
|
||||
debit: 2000.0
|
||||
name: Basic Computer
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
quantity: 0.0
|
||||
name: /
|
||||
period_id: account.period_6
|
||||
ref: '2010010'
|
||||
state: draft
|
||||
|
||||
-
|
||||
I check that Initially account move state is "Draft"
|
||||
-
|
||||
!assert {model: account.move, id: account_move_0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I validate this account move by using Validate Ledger Postings
|
||||
-
|
||||
!record {model: validate.account.move, id: validate_account_move_0}:
|
||||
journal_id: account.bank_journal
|
||||
period_id: account.period_6
|
||||
-
|
||||
I clicked on validate Button
|
||||
-
|
||||
!python {model: validate.account.move}: |
|
||||
self.validate_move(cr, uid, [ref("validate_account_move_0")], {"lang": "en_US",
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_validate_account_moves")],
|
||||
"tz": False, "active_id": ref("account.menu_validate_account_moves"), })
|
||||
|
||||
-
|
||||
I check that the invoice state is now "Posted"
|
||||
-
|
||||
!assert {model: account.move, id: account_move_0}:
|
||||
- state == 'posted'
|
|
@ -0,0 +1,75 @@
|
|||
-
|
||||
In order to check the Chart of Accounts wizard I run the wizard with target move set as all
|
||||
|
||||
-
|
||||
!record {model: account.chart, id: account_chart_0}:
|
||||
target_move: all
|
||||
-
|
||||
I clicked on Open chart Button to open the chart
|
||||
-
|
||||
!python {model: account.chart}: |
|
||||
self.account_chart_open_window(cr, uid, [ref("account_chart_0")], {"lang": 'en_US',
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_account_tree2")],
|
||||
"tz": False, "active_id": ref("account.menu_action_account_tree2"), })
|
||||
|
||||
-
|
||||
I create chart of account with target move set as posted
|
||||
-
|
||||
!record {model: account.chart, id: account_chart_0}:
|
||||
target_move: posted
|
||||
-
|
||||
I clicked on Open chart Button to open the chart
|
||||
-
|
||||
!python {model: account.chart}: |
|
||||
self.account_chart_open_window(cr, uid, [ref("account_chart_0")], {"lang": 'en_US',
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_account_tree2")],
|
||||
"tz": False, "active_id": ref("account.menu_action_account_tree2"), })
|
||||
|
||||
-
|
||||
In order to test Account Move Line Wizard I check the move line entries using this wizard
|
||||
-
|
||||
!record {model: account.move.line.select, id: account_move_line_select_0}:
|
||||
{}
|
||||
-
|
||||
I clicked on Button to open the account move lines
|
||||
-
|
||||
!python {model: account.move.line.select}: |
|
||||
self.open_window(cr, uid, [ref("account_move_line_select_0")], {"lang": 'en_US',
|
||||
"state": "all", "tz": False, "active_model": "account.account", "active_ids":
|
||||
[ref("account.a_recv")], "fiscalyear": 1, "active_id": ref("account.a_recv"),
|
||||
})
|
||||
|
||||
|
||||
-
|
||||
In order to test the Analytic Charts of Account wizard I will generate chart
|
||||
|
||||
-
|
||||
!record {model: account.analytic.chart, id: account_analytic_chart_0}:
|
||||
from_date: '2010-01-01'
|
||||
to_date: '2010-06-30'
|
||||
-
|
||||
I clicked on Open chart Button to open the charts
|
||||
|
||||
-
|
||||
!python {model: account.analytic.chart}: |
|
||||
self.analytic_account_chart_open_window(cr, uid, [ref("account_analytic_chart_0")],
|
||||
{"lang": 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_analytic_account_tree2")],
|
||||
"tz": False, "active_id": ref("account.menu_action_analytic_account_tree2"),
|
||||
})
|
||||
|
||||
-
|
||||
In order to test Account Journal Select wizard I open journal entries using this wizard
|
||||
-
|
||||
!record {model: account.journal.select, id: account_journal_select_0}:
|
||||
{}
|
||||
-
|
||||
I clicked on Open Journal Button to open the entries
|
||||
|
||||
-
|
||||
!python {model: account.journal.select}: |
|
||||
self.action_open_window(cr, uid, [ref("account_journal_select_0")], {"lang":
|
||||
'en_US', "active_model": "account.journal.period", "active_ids": [ref("account.a_recv")],
|
||||
"tz": False, "active_id": ref("account.a_recv"), })
|
||||
-
|
||||
I check that the entries open successfully
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
import account_automatic_reconcile
|
||||
import account_move_line_reconcile_select
|
||||
import account_move_line_unreconcile_select
|
||||
import account_reconcile_partner_process
|
||||
import account_reconcile
|
||||
import account_unreconcile
|
||||
import account_invoice_refund
|
||||
|
|
|
@ -31,15 +31,16 @@ class account_automatic_reconcile(osv.osv_memory):
|
|||
_columns = {
|
||||
'account_ids': fields.many2many('account.account', 'reconcile_account_rel', 'reconcile_id', 'account_id', 'Account to reconcile', domain = [('reconcile','=',1)], \
|
||||
help = 'If no account is specified, the reconciliation will be made using every accounts that can be reconcilied'),
|
||||
'writeoff_acc_id': fields.many2one('account.account', 'Account', required=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
|
||||
'period_id': fields.many2one('account.period', 'Period', required=True),
|
||||
'writeoff_acc_id': fields.many2one('account.account', 'Account'),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal'),
|
||||
'period_id': fields.many2one('account.period', 'Period'),
|
||||
'max_amount': fields.float('Maximum write-off amount'),
|
||||
'power': fields.selection([(p, str(p)) for p in range(2, 10)], 'Power', required=True),
|
||||
'power': fields.selection([(p, str(p)) for p in range(2, 10)], 'Power', required=True, help='Number of partial amounts that can be combined to find a balance point can be chosen as the power of the automatic reconciliation'),
|
||||
'date1': fields.date('Start of period', required=True),
|
||||
'date2': fields.date('End of period', required=True),
|
||||
'reconciled': fields.integer('Reconciled transactions', readonly=True),
|
||||
'unreconciled': fields.integer('Not reconciled transactions', readonly=True),
|
||||
'allow_write_off': fields.boolean('Allow write off')
|
||||
}
|
||||
|
||||
def _get_reconciled(self, cr, uid, context={}):
|
||||
|
@ -145,16 +146,18 @@ class account_automatic_reconcile(osv.osv_memory):
|
|||
if not form['account_ids']:
|
||||
raise osv.except_osv(_('UserError'), _('You must select accounts to reconcile'))
|
||||
for account_id in form['account_ids']:
|
||||
if not context.get('allow_write_off', False):
|
||||
query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
|
||||
AND state <> 'draft' GROUP BY partner_id \
|
||||
HAVING ABS(SUM(debit-credit)) <> %s AND count(*)>0"%(account_id, 0.0)
|
||||
# query="SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
|
||||
# AND state <> 'draft' GROUP BY partner_id AND debit = credi"%(account_id)
|
||||
else:
|
||||
query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
|
||||
AND state <> 'draft' GROUP BY partner_id \
|
||||
HAVING ABS(SUM(debit-credit)) <= %s AND count(*)>0"%(account_id, max_amount or 0.0)
|
||||
# reconcile automatically all transactions from partners whose balance is 0
|
||||
cr.execute(
|
||||
"SELECT partner_id " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"GROUP BY partner_id " \
|
||||
"HAVING ABS(SUM(debit-credit)) < %s AND count(*)>0",
|
||||
(account_id, max_amount or 0.0))
|
||||
cr.execute(query)
|
||||
partner_ids = [id for (id,) in cr.fetchall()]
|
||||
for partner_id in partner_ids:
|
||||
cr.execute(
|
||||
|
@ -167,63 +170,67 @@ class account_automatic_reconcile(osv.osv_memory):
|
|||
(account_id, partner_id))
|
||||
line_ids = [id for (id,) in cr.fetchall()]
|
||||
if len(line_ids):
|
||||
move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
|
||||
reconciled += len(line_ids)
|
||||
if not context.get('allow_write_off', False):
|
||||
move_line_obj.reconcile_partial(cr, uid, line_ids, 'manual', context={})
|
||||
else:
|
||||
move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
|
||||
|
||||
# get the list of partners who have more than one unreconciled transaction
|
||||
cr.execute(
|
||||
"SELECT partner_id " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND partner_id IS NOT NULL " \
|
||||
"GROUP BY partner_id " \
|
||||
"HAVING count(*)>1",
|
||||
(account_id,))
|
||||
partner_ids = [id for (id,) in cr.fetchall()]
|
||||
#filter?
|
||||
for partner_id in partner_ids:
|
||||
# get the list of unreconciled 'debit transactions' for this partner
|
||||
cr.execute(
|
||||
"SELECT id, debit " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND partner_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND debit > 0",
|
||||
(account_id, partner_id))
|
||||
debits = cr.fetchall()
|
||||
# get the list of partners who have more than one unreconciled transaction
|
||||
cr.execute(
|
||||
"SELECT partner_id " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND partner_id IS NOT NULL " \
|
||||
"GROUP BY partner_id " \
|
||||
"HAVING count(*)>1",
|
||||
(account_id,))
|
||||
partner_ids = [id for (id,) in cr.fetchall()]
|
||||
#filter?
|
||||
for partner_id in partner_ids:
|
||||
# get the list of unreconciled 'debit transactions' for this partner
|
||||
cr.execute(
|
||||
"SELECT id, debit " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND partner_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND debit > 0",
|
||||
(account_id, partner_id))
|
||||
debits = cr.fetchall()
|
||||
|
||||
# get the list of unreconciled 'credit transactions' for this partner
|
||||
cr.execute(
|
||||
"SELECT id, credit " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND partner_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND credit > 0",
|
||||
(account_id, partner_id))
|
||||
credits = cr.fetchall()
|
||||
# get the list of unreconciled 'credit transactions' for this partner
|
||||
cr.execute(
|
||||
"SELECT id, credit " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND partner_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND credit > 0",
|
||||
(account_id, partner_id))
|
||||
credits = cr.fetchall()
|
||||
|
||||
(rec, unrec) = self.do_reconcile(cr, uid, credits, debits, max_amount, power, form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
|
||||
reconciled += rec
|
||||
unreconciled += unrec
|
||||
(rec, unrec) = self.do_reconcile(cr, uid, credits, debits, max_amount, power, form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
|
||||
reconciled += rec
|
||||
unreconciled += unrec
|
||||
|
||||
# add the number of transactions for partners who have only one
|
||||
# unreconciled transactions to the unreconciled count
|
||||
partner_filter = partner_ids and 'AND partner_id NOT IN %s',(tuple(partner_ids),) or ''
|
||||
cr.execute(
|
||||
"SELECT count(*) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " + partner_filter,
|
||||
(account_id,))
|
||||
additional_unrec = cr.fetchone()[0]
|
||||
context.update({'reconciled': reconciled, 'unreconciled': unreconciled + additional_unrec})
|
||||
# add the number of transactions for partners who have only one
|
||||
# unreconciled transactions to the unreconciled count
|
||||
partner_filter = partner_ids and 'AND partner_id not in (%s)' % ','.join(map(str, filter(None, partner_ids))) or ''
|
||||
cr.execute(
|
||||
"SELECT count(*) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " + partner_filter,
|
||||
(account_id,))
|
||||
additional_unrec = cr.fetchone()[0]
|
||||
unreconciled = unreconciled + additional_unrec
|
||||
context.update({'reconciled': reconciled, 'unreconciled': unreconciled})
|
||||
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','account_automatic_reconcile_view1')])
|
||||
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
|
||||
return {
|
||||
|
@ -239,4 +246,4 @@ class account_automatic_reconcile(osv.osv_memory):
|
|||
|
||||
account_automatic_reconcile()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -8,21 +8,29 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reconciliation">
|
||||
<group width="660" height="430">
|
||||
<separator string="Options" colspan="4"/>
|
||||
<group>
|
||||
<field name="account_ids" colspan="4" domain="[('reconcile','=',1)]"/>
|
||||
<field name="date1"/>
|
||||
<field name="date2"/>
|
||||
<field name="power"/>
|
||||
<separator string="Write-Off Move" colspan="4"/>
|
||||
<field name="max_amount"/>
|
||||
<field name="writeoff_acc_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<field name="allow_write_off"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group attrs="{'readonly':[('allow_write_off', '!=', True)]}">
|
||||
<separator string="Write-Off Move" colspan="4"/>
|
||||
<field name="max_amount"/>
|
||||
<field name="writeoff_acc_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
<field name="journal_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
<field name="period_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
</group>
|
||||
<separator string ="" colspan="4"/>
|
||||
<group colspan="2" col="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="reconcile" string="Reconcile" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -40,10 +48,10 @@
|
|||
|
||||
<menuitem
|
||||
icon="STOCK_EXECUTE"
|
||||
name="Automatic reconciliation"
|
||||
name="Automatic Reconciliation"
|
||||
action="action_account_automatic_reconcile"
|
||||
id="menu_automatic_reconcile"
|
||||
parent="next_id_20"/>
|
||||
parent="periodical_processing_reconciliation"/>
|
||||
|
||||
<record id="account_automatic_reconcile_view1" model="ir.ui.view">
|
||||
<field name="name">Automatic reconcile unreconcile</field>
|
||||
|
@ -64,4 +72,3 @@
|
|||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_chart" model="ir.ui.view">
|
||||
<record id="view_account_chart" model="ir.ui.view">
|
||||
<field name="name">account.chart.form</field>
|
||||
<field name="model">account.chart</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account charts">
|
||||
<group colspan="4" >
|
||||
<field name="fiscalyear"/>
|
||||
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
|
||||
<field name="target_move"/>
|
||||
<group colspan="4" >
|
||||
<field name="fiscalyear"/>
|
||||
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
|
||||
<field name="target_move"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
|
@ -22,7 +22,7 @@
|
|||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_account_chart" model="ir.actions.act_window">
|
||||
<field name="name">Chart of Accounts</field>
|
||||
|
@ -34,7 +34,7 @@
|
|||
</record>
|
||||
|
||||
<menuitem icon="STOCK_INDENT" action="action_account_chart"
|
||||
id="menu_action_account_tree2"
|
||||
parent="account.menu_finance_charts" />
|
||||
id="menu_action_account_tree2"
|
||||
parent="account.menu_finance_charts" />
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</record>
|
||||
|
||||
<record id="action_account_fiscalyear_close" model="ir.actions.act_window">
|
||||
<field name="name">Generate Fiscal Year Opening Entries</field>
|
||||
<field name="name">Generate Opening Entries</field>
|
||||
<field name="res_model">account.fiscalyear.close</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
|
|
@ -37,11 +37,11 @@ class account_invoice_confirm(osv.osv_memory):
|
|||
context = {}
|
||||
pool_obj = pooler.get_pool(cr.dbname)
|
||||
data_inv = pool_obj.get('account.invoice').read(cr, uid, context['active_ids'], ['state'], context=context)
|
||||
|
||||
|
||||
for record in data_inv:
|
||||
if record['state'] not in ('draft','proforma','proforma2'):
|
||||
raise osv.except_osv(_('Warning'), _("Selected Invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-Forma' state!"))
|
||||
wf_service.trg_validate(uid, 'account.invoice', id, 'invoice_open', cr)
|
||||
wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_open', cr)
|
||||
return {}
|
||||
|
||||
account_invoice_confirm()
|
||||
|
@ -61,7 +61,7 @@ class account_invoice_cancel(osv.osv_memory):
|
|||
wf_service = netsvc.LocalService('workflow')
|
||||
pool_obj = pooler.get_pool(cr.dbname)
|
||||
data_inv = pool_obj.get('account.invoice').read(cr, uid, context['active_ids'], ['state'], context=context)
|
||||
|
||||
|
||||
for record in data_inv:
|
||||
if record['state'] in ('cancel','paid'):
|
||||
raise osv.except_osv(_('Warning'), _("Selected Invoice(s) cannot be cancelled as they are already in 'Cancelled' or 'Done' state!"))
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal Select">
|
||||
<label string="Are you sure you want to open Journal Entries!" colspan="4"/>
|
||||
<separator string="" colspan="4" />
|
||||
<label string="Are you sure you want to open Journal Entries!" colspan="4"/>
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="action_open_window" type="object"/>
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem icon="STOCK_JUSTIFY_FILL"
|
||||
action="action_account_move_journal_line_form"
|
||||
id="menu_action_move_journal_line_form"
|
||||
parent="account.menu_finance_entries" sequence="5" />
|
||||
<!-- <menuitem icon="STOCK_JUSTIFY_FILL"-->
|
||||
<!-- action="action_account_move_journal_line_form"-->
|
||||
<!-- id="menu_action_move_journal_line_form"-->
|
||||
<!-- parent="account.menu_finance_entries" sequence="5" />-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -31,8 +31,8 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_reconcile_select"
|
||||
id="menu_reconcile_select" parent="account.next_id_20" />
|
||||
<!-- <menuitem action="action_account_reconcile_select"
|
||||
id="menu_reconcile_select" parent="periodical_processing_reconciliation" /> -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -43,7 +43,6 @@ class account_move_line_select(osv.osv_memory):
|
|||
else:
|
||||
fiscalyear_ids = [context['fiscalyear']]
|
||||
|
||||
fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('state', '=', 'draft')])
|
||||
fiscalyears = fiscalyear_obj.browse(cr, uid, fiscalyear_ids)
|
||||
|
||||
period_ids = []
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_unreconcile_select"
|
||||
id="menu_unreconcile_select" parent="account.next_id_20" />
|
||||
<!-- <menuitem action="action_account_unreconcile_select"
|
||||
id="menu_unreconcile_select" parent="periodical_processing_reconciliation" /> -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -29,9 +29,9 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_open_closed_fiscalyear"
|
||||
id="menu_wizard_open_closed_fy" sequence="2"
|
||||
parent="account.menu_account_end_year_treatments" />
|
||||
<!-- <menuitem action="action_account_open_closed_fiscalyear"-->
|
||||
<!-- id="menu_wizard_open_closed_fy" sequence="2"-->
|
||||
<!-- parent="account.menu_account_end_year_treatments" />-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -56,11 +56,11 @@ class account_move_line_reconcile(osv.osv_memory):
|
|||
if 'trans_nbr' in fields:
|
||||
res.update({'trans_nbr':data['trans_nbr']})
|
||||
if 'credit' in fields:
|
||||
res.update({'trans_nbr':data['credit']})
|
||||
res.update({'credit':data['credit']})
|
||||
if 'debit' in fields:
|
||||
res.update({'trans_nbr':data['debit']})
|
||||
res.update({'debit':data['debit']})
|
||||
if 'writeoff' in fields:
|
||||
res.update({'trans_nbr':data['writeoff']})
|
||||
res.update({'writeoff':data['writeoff']})
|
||||
return res
|
||||
|
||||
def partial_check(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import time
|
||||
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
|
||||
class account_partner_reconcile_process(osv.osv_memory):
|
||||
_name = 'account.partner.reconcile.process'
|
||||
_description = 'Reconcilation Process partner by partner'
|
||||
|
||||
def _get_to_reconcile(self, cr, uid, context=None):
|
||||
cr.execute(
|
||||
"SELECT l.partner_id " \
|
||||
"FROM account_move_line AS l LEFT JOIN res_partner p ON (p.id = l.partner_id) " \
|
||||
"WHERE l.reconcile_id IS NULL " \
|
||||
"AND (%s > to_char(p.last_reconciliation_date, 'YYYY-MM-DD') " \
|
||||
"OR p.last_reconciliation_date IS NULL ) " \
|
||||
"AND l.state <> 'draft' " \
|
||||
"GROUP BY l.partner_id ",(time.strftime('%Y-%m-%d'),)
|
||||
)
|
||||
return len(map(lambda x: x[0], cr.fetchall())) - 1
|
||||
|
||||
def _get_today_reconciled(self, cr, uid, context=None):
|
||||
cr.execute(
|
||||
"SELECT l.partner_id " \
|
||||
"FROM account_move_line AS l LEFT JOIN res_partner p ON (p.id = l.partner_id) " \
|
||||
"WHERE l.reconcile_id IS NULL " \
|
||||
"AND %s = to_char(p.last_reconciliation_date, 'YYYY-MM-DD') " \
|
||||
"AND l.state <> 'draft' " \
|
||||
"GROUP BY l.partner_id ",(time.strftime('%Y-%m-%d'),)
|
||||
)
|
||||
return len(map(lambda x: x[0], cr.fetchall())) + 1
|
||||
|
||||
def _get_partner(self, cr, uid, context=None):
|
||||
partner = self.pool.get('account.move.line').get_next_partner_only(cr, uid, offset=1, context=context)
|
||||
if not partner:
|
||||
return False
|
||||
return partner[0]
|
||||
|
||||
def data_get(self, cr, uid, to_reconcile, today_reconciled, context=None):
|
||||
return {'progress': (100 / float(to_reconcile + today_reconciled)) * today_reconciled}
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
res = super(account_partner_reconcile_process, self).default_get(cr, uid, fields, context=context)
|
||||
if 'to_reconcile' in res and 'today_reconciled' in res:
|
||||
data = self.data_get(cr, uid, res['to_reconcile'], res['today_reconciled'], context)
|
||||
res.update(data)
|
||||
return res
|
||||
|
||||
def next_partner(self, cr, uid, ids, context=None):
|
||||
partner_id = self.pool.get('account.move.line').read(cr, uid, context['active_id'], ['partner_id'])['partner_id'][0]
|
||||
self.pool.get('res.partner').write(cr, uid, partner_id, {'last_reconciliation_date': time.strftime('%Y-%m-%d')}, context)
|
||||
#TODO: we have to find a way to update the context of the current tab (we could open a new tab with the context but it's not really handy)
|
||||
#TODO: remove that comments when the client side dev is done
|
||||
#context.update({'partner_id': self.browse(cr, uid, ids, context)[0].next_partner_id})
|
||||
#return {'context': context,
|
||||
# 'target': 'opener',
|
||||
# 'name': 'reconciliation process',
|
||||
# 'view_type': 'form',
|
||||
# 'view_mode': 'tree,form',
|
||||
# 'res_model': 'account.move.line',
|
||||
# 'type': 'ir.actions.act_window'
|
||||
#}
|
||||
return {}
|
||||
|
||||
_columns = {
|
||||
'to_reconcile': fields.float('Remaining Partners', readonly=True, help='This is the remaining partners for who you should check if there is something to reconcile or not. This figure already count the current partner as reconciled.'),
|
||||
'today_reconciled': fields.float('Partners Reconciled Today', readonly=True, help='This figure depicts the total number of partners that have gone throught the reconciliation process today. The current partner is counted as already processed.'),
|
||||
'progress': fields.float('Progress', readonly=True, help='Shows you the progress made today on the reconciliation process. Given by \nPartners Reconciled Today \ (Remaining Partners + Partners Reconciled Today)'),
|
||||
'next_partner_id': fields.many2one('res.partner', 'Next Partner to Reconcile', readonly=True, help='This field shows you the next partner that will be automatically chosen by the system to go through the reconciliation process, based on the latest day it have been reconciled.'), # TODO: remove the readonly=True when teh client side will allow to update the context of existing tab, so that the user can change this value if he doesn't want to follow openerp proposal
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'to_reconcile': _get_to_reconcile,
|
||||
'today_reconciled': _get_today_reconciled,
|
||||
'next_partner_id': _get_partner,
|
||||
}
|
||||
|
||||
account_partner_reconcile_process()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<record id="account_partner_reconcile_view" model="ir.ui.view">
|
||||
<field name="name">Partner Reconcilation Process</field>
|
||||
<field name="model">account.partner.reconcile.process</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Partner Reconciliation">
|
||||
<field name="progress" widget="progressbar" colspan="4"/>
|
||||
<field name="today_reconciled"/>
|
||||
<field name="to_reconcile"/>
|
||||
<newline/>
|
||||
<field name="next_partner_id" colspan="4"/>
|
||||
<newline/>
|
||||
<group colspan="4" col="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="next_partner" icon="gtk-execute" type="object" string="Go to next partner" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_partner_reconcile" model="ir.actions.act_window">
|
||||
<field name="name">Reconciliation: Go to Next Partner</field>
|
||||
<field name="res_model">account.partner.reconcile.process</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="account_partner_reconcile_view"/>
|
||||
<field name="context">{'record_id':active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<record model="ir.values" id="action_partner_reconcile_actino">
|
||||
<field name="model_id" ref="account.model_account_move_line" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Partner reconciliation</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_partner_reconcile'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.move.line</field>
|
||||
</record>
|
||||
|
||||
<!-- <menuitem
|
||||
icon="STOCK_EXECUTE"
|
||||
name="Partner reconciliation"
|
||||
action="action_account_partner_reconcile"
|
||||
id="menu_partner_reconcile"
|
||||
parent="account.next_id_20"/>
|
||||
-->
|
||||
</data>
|
||||
</openerp>
|
|
@ -32,7 +32,7 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_subscription_generate" id="menu_generate_subscription" parent="account.menu_finance_periodical_processing" />
|
||||
<menuitem action="action_account_subscription_generate" id="menu_generate_subscription" parent="menu_finance_periodical_processing" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -7,15 +7,17 @@
|
|||
<field name="model">account.use.model</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Entries From Models">
|
||||
<group colspan="4" >
|
||||
<field name="model"/>
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Create Entries" name="create_entries" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Create Entries From Models">
|
||||
<group height="240" width="510">
|
||||
<separator string="This wizard will create entries from Models" colspan="4"/>
|
||||
<field name="model"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="2">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Create Entries" name="create_entries" type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
<menuitem
|
||||
name="Validate Ledger Postings"
|
||||
parent="account.menu_finance_periodical_processing"
|
||||
parent="periodical_processing_journal_entries_validation"
|
||||
action="action_validate_account_move"
|
||||
id="menu_validate_account_moves"
|
||||
/>
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_analytic_default_form"
|
||||
id="menu_analytic_defaul_form"
|
||||
parent="account.menu_analytic_accounting"/>
|
||||
<!-- <menuitem-->
|
||||
<!-- action="action_analytic_default_form"-->
|
||||
<!-- id="menu_analytic_defaul_form"-->
|
||||
<!-- parent="account.menu_analytic_accounting"/>-->
|
||||
|
||||
<act_window
|
||||
domain="[('account_id', '=', active_id)]" id="act_account_acount_move_line_open" name="Entries" res_model="account.move.line" src_model="account.account"/>
|
||||
|
|
|
@ -97,6 +97,8 @@ class account_analytic_plan_instance(osv.osv):
|
|||
}
|
||||
|
||||
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('journal_id', False):
|
||||
journal = self.pool.get('account.journal').browse(cr, user, [context['journal_id']], context=context)[0]
|
||||
analytic_journal = journal.analytic_journal_id and journal.analytic_journal_id.id or False
|
||||
|
|
|
@ -129,10 +129,10 @@
|
|||
src_model="account.analytic.plan"
|
||||
id="account_analytic_instance_model_open"/>
|
||||
|
||||
<menuitem
|
||||
name="Analytic Distribution's models" parent="account.account_def_analytic_journal"
|
||||
id="menu_account_analytic_plan_instance_action"
|
||||
action="account_analytic_plan_instance_action"/>
|
||||
<!-- <menuitem-->
|
||||
<!-- name="Analytic Distribution's models" parent="account.account_def_analytic_journal"-->
|
||||
<!-- id="menu_account_analytic_plan_instance_action"-->
|
||||
<!-- action="account_analytic_plan_instance_action"/>-->
|
||||
|
||||
<record model="ir.ui.view" id="account_analytic_plan_instance_line_form">
|
||||
<field name="name">account.analytic.plan.instance.line.form</field>
|
||||
|
@ -192,11 +192,16 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
parent="account.account_analytic_def_account"
|
||||
id="menu_account_analytic_plan_action"
|
||||
action="account_analytic_plan_form_action"/>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_analytic"
|
||||
name="Multi Plans"
|
||||
id="menu_account_analytic_multi_plan_action"
|
||||
/>
|
||||
<menuitem
|
||||
parent="menu_account_analytic_multi_plan_action"
|
||||
id="menu_account_analytic_plan_action"
|
||||
action="account_analytic_plan_form_action"/>
|
||||
|
||||
<record model="ir.ui.view" id="account_analytic_plan_line_form">
|
||||
<field name="name">account.analytic.plan.line.form</field>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -14,7 +14,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
{
|
||||
|
@ -22,11 +22,11 @@
|
|||
"version" : "1.2",
|
||||
"author" : "Tiny, Veritos",
|
||||
"website" : "http://tinyerp.com - http://veritos.nl",
|
||||
"description" : """This module will support the Anglo-Saxons accounting methodology by
|
||||
changing the accounting logic with stock transactions. The difference between the Anglo-Saxon accounting countries
|
||||
and the Rhine or also called Continental accounting countries is the moment of taking the Cost of Goods Sold versus Cost of Sales.
|
||||
Anglo-Saxons accounting does take the cost when sales invoice is created, Continental accounting will take the cost at he moment the goods are shipped.
|
||||
This module will add this functionality by using a interim account, to store the value of shipped goods and will contra book this interim account
|
||||
"description" : """This module will support the Anglo-Saxons accounting methodology by
|
||||
changing the accounting logic with stock transactions. The difference between the Anglo-Saxon accounting countries
|
||||
and the Rhine or also called Continental accounting countries is the moment of taking the Cost of Goods Sold versus Cost of Sales.
|
||||
Anglo-Saxons accounting does take the cost when sales invoice is created, Continental accounting will take the cost at the moment the goods are shipped.
|
||||
This module will add this functionality by using a interim account, to store the value of shipped goods and will contra book this interim account
|
||||
when the invoice is created to transfer this amount to the debtor or creditor account.
|
||||
Secondly, price differences between actual purchase price and fixed product standard price are booked on a seperate account""",
|
||||
"depends" : ["product", "account", "sale", "purchase", "stock"],
|
||||
|
|
|
@ -62,6 +62,10 @@ Three reports are available:
|
|||
'wizard/account_budget_crossovered_report_view.xml',
|
||||
],
|
||||
'demo_xml': ['crossovered_budget_demo.xml'],
|
||||
'test':[
|
||||
# 'test/account_budget_spread.yml',
|
||||
'test/account_budget.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0043819694157',
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
-
|
||||
In order to check account budget module in OpenERP I created a budget with few budget position
|
||||
-
|
||||
Creating a crossovered.budget record
|
||||
-
|
||||
!record {model: crossovered.budget, id: crossovered_budget_budget0}:
|
||||
code: B2011
|
||||
date_from: '2011-01-01'
|
||||
date_to: '2011-12-31'
|
||||
name: Budget 2011
|
||||
state: draft
|
||||
-
|
||||
I created two different budget lines
|
||||
-
|
||||
Modifying a crossovered.budget record
|
||||
-
|
||||
!record {model: crossovered.budget, id: crossovered_budget_budget0}:
|
||||
crossovered_budget_line:
|
||||
- analytic_account_id: account.analytic_consultancy
|
||||
date_from: '2011-01-01'
|
||||
date_to: '2011-12-31'
|
||||
general_budget_id: account_budget.account_budget_post_purchase0
|
||||
planned_amount: 10000.0
|
||||
- analytic_account_id: account.analytic_super_product_trainings
|
||||
date_from: '2011-09-01'
|
||||
date_to: '2011-09-30'
|
||||
general_budget_id: account_budget.account_budget_post_sales0
|
||||
planned_amount: 400000.0
|
||||
|
||||
-
|
||||
I check that Initially Budget is in "draft" state
|
||||
-
|
||||
!assert {model: crossovered.budget, id: crossovered_budget_budget0}:
|
||||
- state == 'draft'
|
||||
|
||||
-
|
||||
I pressed the confirm button to confirm the Budget
|
||||
-
|
||||
Performing a workflow action confirm on module crossovered.budget
|
||||
-
|
||||
!workflow {model: crossovered.budget, action: confirm, ref: crossovered_budget_budget0}
|
||||
-
|
||||
I check that budget is in "Confirmed" state
|
||||
-
|
||||
!assert {model: crossovered.budget, id: crossovered_budget_budget0}:
|
||||
- state == 'confirm'
|
||||
|
||||
-
|
||||
I pressed the validate button to validate the Budget
|
||||
-
|
||||
Performing a workflow action validate on module crossovered.budget
|
||||
-
|
||||
!workflow {model: crossovered.budget, action: validate, ref: crossovered_budget_budget0}
|
||||
-
|
||||
I check that budget is in "Validated" state
|
||||
-
|
||||
!assert {model: crossovered.budget, id: crossovered_budget_budget0}:
|
||||
- state == 'validate'
|
||||
|
||||
-
|
||||
I pressed the done button to done the Budget
|
||||
-
|
||||
Performing a workflow action done on module crossovered.budget
|
||||
-
|
||||
!workflow {model: crossovered.budget, action: done, ref: crossovered_budget_budget0}
|
||||
-
|
||||
I check that budget is in "done" state
|
||||
-
|
||||
!assert {model: crossovered.budget, id: crossovered_budget_budget0}:
|
||||
- state == 'done'
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
-
|
||||
In order to test Spread Wizard of account module I spread record with amount=1000
|
||||
-
|
||||
Creating a account.budget.spread record
|
||||
-
|
||||
!record {model: account.budget.spread, id: account_budget_spread_0}:
|
||||
amount: 1000.0
|
||||
fiscalyear: account.data_fiscalyear
|
||||
|
||||
|
||||
-
|
||||
Performing an osv_memory action check_spread on module account.budget.spread
|
||||
-
|
||||
!python {model: account.budget.spread}: |
|
||||
self.check_spread(cr, uid, [ref("account_budget_spread_0")], {"lang": 'en_US',
|
||||
"active_model": "account.budget.post", "active_ids": [ref("account_budget.account_budget_post_sales0")],
|
||||
"tz": False, "active_id": ref("account_budget.account_budget_post_sales0"),
|
||||
})
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
<form string="Select Dates Period">
|
||||
<field name="fiscalyear"/>
|
||||
<field name="amount"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
|
|
|
@ -19,6 +19,5 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -21,21 +21,20 @@
|
|||
|
||||
|
||||
{
|
||||
'name': 'Board for Purchase Management',
|
||||
'version': '1.0',
|
||||
'category': 'Board/Purchase',
|
||||
'description': """
|
||||
This module implements a dashboard for purchase management that includes:
|
||||
* Current Purchase Orders
|
||||
* Draft Purchase Orders
|
||||
* Graph for quantity and amount per month
|
||||
"name" : "Account Cancel",
|
||||
"version" : "1.1",
|
||||
"depends" : ["account"],
|
||||
"author" : "Tiny",
|
||||
"category": 'Generic Modules/Accounting',
|
||||
"description": """
|
||||
Module Add Allow cancelling entries field on form view of account journal if it set to true it allows user to cancel entries & invoices.
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'depends': [ 'purchase','board',
|
||||
],
|
||||
'update_xml': ['board_purchase_view.xml'],
|
||||
'website': 'http://www.openerp.com',
|
||||
'init_xml': [],
|
||||
'update_xml': ['account_cancel_view.xml' ],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_account_journal_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account.journal.form</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page[@string='General Information']/group/field[@name='centralisation']" position="after">
|
||||
<field name="update_posted"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -33,10 +33,12 @@ codawiz_form = """<?xml version="1.0"?>
|
|||
<separator colspan="4" string="Select your bank journal :" />
|
||||
<field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
|
||||
<newline />
|
||||
<field name="def_payable" /> <field name="def_receivable" />
|
||||
<field name="def_payable" />
|
||||
<newline />
|
||||
<field name="def_receivable" />
|
||||
<newline />
|
||||
<field name="awaiting_account" />
|
||||
<separator string="Clic on 'New' to select your file :" colspan="4"/>
|
||||
<separator string="Click on 'New' to select your file :" colspan="4"/>
|
||||
<field name="coda"/>
|
||||
</form>
|
||||
"""
|
||||
|
@ -254,7 +256,7 @@ def _coda_parsing(self, cr, uid, data, context):
|
|||
std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
|
||||
%(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
|
||||
bkst_list.append(bk_st_id)
|
||||
|
||||
|
||||
except osv.except_osv, e:
|
||||
cr.rollback()
|
||||
nb_err+=1
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
-
|
||||
In order to test account followup module in OpenERP I create a FollowUp structure
|
||||
-
|
||||
!record {model: account_followup.followup, id: account_followup_followup_testfollowups0}:
|
||||
description: First letter after 15 net days, 30 net days and 45 days end of month levels.
|
||||
followup_line:
|
||||
- delay: 15
|
||||
name: 'level 0: 15 days'
|
||||
sequence: 0
|
||||
start: days
|
||||
description: Dear %(partner_name)s,\n\nException made if there was a mistake
|
||||
of ours, it seems that the following amount staid unpaid. Please, take appropriate
|
||||
measures in order to carry out this payment in the next 1 days.\n\nWould your
|
||||
payment have been carried out after this mail was sent, please consider the
|
||||
present one as void. Do not hesitate to contact our accounting department at
|
||||
(+32).10.68.94.39.\n\nBest Regards,\n
|
||||
- delay: 30
|
||||
name: 'level1: 30 days'
|
||||
sequence: 1
|
||||
start: days
|
||||
description: Dear %(partner_name)s,\n\nException made if there was a mistake
|
||||
of ours, it seems that the following amount staid unpaid. Please, take appropriate
|
||||
measures in order to carry out this payment in the next 2 days.\n\nWould your
|
||||
payment have been carried out after this mail was sent, please consider the
|
||||
present one as void. Do not hesitate to contact our accounting department at
|
||||
(+32).10.68.94.39.\n\nBest Regards,\n
|
||||
- delay: 45
|
||||
name: 'level 2: 45 days'
|
||||
sequence: 2
|
||||
start: days
|
||||
description: Dear %(partner_name)s,\n\nException made if there was a mistake
|
||||
of ours, it seems that the following amount staid unpaid. Please, take appropriate
|
||||
measures in order to carry out this payment in the next 3 days.\n\nWould your
|
||||
payment have been carried out after this mail was sent, please consider the
|
||||
present one as void. Do not hesitate to contact our accounting department at
|
||||
(+32).10.68.94.39.\n\nBest Regards,
|
||||
name: My followups
|
||||
|
||||
-
|
||||
I create an invoice
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_followup}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
invoice_line:
|
||||
- account_id: account.a_sale
|
||||
name: '[PC1] Basic PC'
|
||||
price_unit: 450.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
reference_type: none
|
||||
|
||||
|
||||
-
|
||||
I change the state of the invoice using create button
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_followup}
|
||||
|
||||
-
|
||||
I create a send followup record
|
||||
-
|
||||
!record {model: account.followup.print, id: account_followup_print_0}:
|
||||
date: '2010-06-08'
|
||||
followup_id: account_followup_followup_testfollowups0
|
||||
|
||||
|
||||
-
|
||||
I Select Followup and clicked on Continue Button
|
||||
-
|
||||
!python {model: account.followup.print}: |
|
||||
self.do_continue(cr, uid, [ref("account_followup_print_0")], {"lang": 'en_US',
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account_followup.account_followup_print_menu")],
|
||||
"tz": False, "active_id": ref("account_followup.account_followup_print_menu"),
|
||||
})
|
||||
|
||||
|
||||
-
|
||||
I select partners whom I want to send followups
|
||||
-
|
||||
!record {model: account.followup.print.all, id: account_followup_print_all_0}:
|
||||
email_body: 'Date : %(date)s\n\nDear %(partner_name)s,\n\nPlease find in attachment
|
||||
a reminder of all your unpaid invoices, for a total amount due of:\n\n%(followup_amount).2f
|
||||
%(company_currency)s\n\nThanks,\n--\n%(user_signature)s\n%(company_name)s'
|
||||
email_subject: Invoices Reminder
|
||||
partner_ids:
|
||||
- base.res_partner_desertic_hispafuentes
|
||||
partner_lang: 1
|
||||
|
||||
|
||||
-
|
||||
I clicked on Print Follow Ups to print Followups reports
|
||||
-
|
||||
!python {model: account.followup.print.all}: |
|
||||
self.do_print(cr, uid, [ref("account_followup_print_all_0")], {"lang": 'en_US',
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account_followup.account_followup_print_menu")],
|
||||
"tz": False, "date": "2010-06-08", "followup_id": ref("account_followup_followup_testfollowups0"), "active_id": ref("account_followup.account_followup_print_menu"),
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -23,11 +23,10 @@
|
|||
# Init Sales
|
||||
#----------------------------------------------------------
|
||||
|
||||
import payment
|
||||
import account_payment
|
||||
import wizard
|
||||
import account_move_line
|
||||
import account_invoice
|
||||
import report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -41,14 +41,14 @@
|
|||
'wizard/account_payment_pay_view.xml',
|
||||
'wizard/account_payment_populate_statement_view.xml',
|
||||
'wizard/account_payment_create_order_view.xml',
|
||||
'payment_view.xml',
|
||||
'payment_workflow.xml',
|
||||
'payment_sequence.xml',
|
||||
'account_payment_view.xml',
|
||||
'account_payment_workflow.xml',
|
||||
'account_payment_sequence.xml',
|
||||
'account_invoice_view.xml',
|
||||
'payment_report.xml',
|
||||
|
||||
'account_payment_report.xml',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': ['test/account_payment.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0061703998541',
|
||||
|
|
|
@ -18,13 +18,10 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields
|
||||
from osv import osv
|
||||
import time
|
||||
import netsvc
|
||||
import pooler
|
||||
|
||||
from osv import osv, fields
|
||||
import netsvc
|
||||
|
||||
class payment_type(osv.osv):
|
||||
_name= 'payment.type'
|
||||
|
@ -36,11 +33,10 @@ class payment_type(osv.osv):
|
|||
'bank_type_payment_type_rel',
|
||||
'pay_type_id', 'bank_type_id',
|
||||
'Suitable bank types')
|
||||
}
|
||||
}
|
||||
|
||||
payment_type()
|
||||
|
||||
|
||||
class payment_mode(osv.osv):
|
||||
_name= 'payment.mode'
|
||||
_description= 'Payment Mode'
|
||||
|
@ -68,13 +64,12 @@ class payment_mode(osv.osv):
|
|||
|
||||
payment_mode()
|
||||
|
||||
|
||||
class payment_order(osv.osv):
|
||||
_name = 'payment.order'
|
||||
_description = 'Payment Order'
|
||||
_rec_name = 'reference'
|
||||
|
||||
def get_wizard(self,type):
|
||||
def get_wizard(self, type):
|
||||
logger = netsvc.Logger()
|
||||
logger.notifyChannel("warning", netsvc.LOG_WARNING,
|
||||
"No wizard found for the payment type '%s'." % type)
|
||||
|
@ -145,7 +140,6 @@ class payment_order(osv.osv):
|
|||
|
||||
payment_order()
|
||||
|
||||
|
||||
class payment_line(osv.osv):
|
||||
_name = 'payment.line'
|
||||
_description = 'Payment Line'
|
|
@ -0,0 +1,145 @@
|
|||
-
|
||||
In order to test account_payment in OpenERP I create a new record Type
|
||||
-
|
||||
-
|
||||
Creating a payment.type record
|
||||
-
|
||||
!record {model: payment.type, id: payment_type_t0}:
|
||||
code: T0
|
||||
name: TestType
|
||||
|
||||
-
|
||||
I created a new Bank Record
|
||||
-
|
||||
Creating a res.partner.bank record
|
||||
-
|
||||
!record {model: res.partner.bank, id: res_partner_bank_0}:
|
||||
acc_number: '0001'
|
||||
partner_id: base.res_partner_9
|
||||
sequence: 0.0
|
||||
state: bank
|
||||
|
||||
-
|
||||
I created a new Payment Mode
|
||||
-
|
||||
Creating a payment.mode record
|
||||
-
|
||||
!record {model: payment.mode, id: payment_mode_m0}:
|
||||
bank_id: res_partner_bank_0
|
||||
journal: account.bank_journal
|
||||
name: TestMode
|
||||
type: payment_type_t0
|
||||
|
||||
-
|
||||
I created a Supplier Invoice
|
||||
-
|
||||
Creating a account.invoice record
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_payment}:
|
||||
account_id: account.a_pay
|
||||
address_contact_id: base.res_partner_address_tang
|
||||
address_invoice_id: base.res_partner_address_tang
|
||||
check_total: 300.0
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
invoice_line:
|
||||
- account_id: account.a_expense
|
||||
name: '[PC1] Basic PC'
|
||||
price_unit: 300.0
|
||||
product_id: product.product_product_pc1
|
||||
quantity: 1.0
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.expenses_journal
|
||||
partner_id: base.res_partner_asus
|
||||
reference_type: none
|
||||
type: in_invoice
|
||||
|
||||
-
|
||||
I make the supplier invoice in Open state
|
||||
-
|
||||
Performing a workflow action invoice_open on module account.invoice
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_payment}
|
||||
|
||||
-
|
||||
I create a new payment order
|
||||
-
|
||||
Creating a payment.order record
|
||||
-
|
||||
!record {model: payment.order, id: payment_order_0}:
|
||||
date_prefered: due
|
||||
mode: payment_mode_m0
|
||||
reference: 2010/006
|
||||
user_id: base.user_root
|
||||
|
||||
|
||||
-
|
||||
Creating a payment.order.create record
|
||||
-
|
||||
!record {model: payment.order.create, id: payment_order_create_0}:
|
||||
duedate: '2010-06-04'
|
||||
|
||||
-
|
||||
I searched the entries using "Payment Create Order" wizard
|
||||
-
|
||||
Performing an osv_memory action search_entries on module payment.order.create
|
||||
-
|
||||
!python {model: payment.order.create}: |
|
||||
self.search_entries(cr, uid, [ref("payment_order_create_0")], {"lang": "en_US",
|
||||
"active_model": "payment.order", "active_ids": [ref("payment_order_0")],
|
||||
"tz": False, "active_id": ref("payment_order_0"), })
|
||||
-
|
||||
I check that Initially Payment order is in "draft" state
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I pressed the confirm payment button to confirm the payment
|
||||
-
|
||||
Performing a workflow action open on module payment.order
|
||||
-
|
||||
!workflow {model: payment.order, action: open, ref: payment_order_0}
|
||||
-
|
||||
I check that Payment order is in "Confirmed" state
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_0}:
|
||||
- state == 'open'
|
||||
-
|
||||
I paid the payment using "Make Payments" Button
|
||||
-
|
||||
Creating a account.payment.make.payment record
|
||||
-
|
||||
!record {model: account.payment.make.payment, id: account_payment_make_payment_0}:
|
||||
{}
|
||||
|
||||
-
|
||||
Performing an osv_memory action launch_wizard on module account.payment.make.payment
|
||||
-
|
||||
!python {model: account.payment.make.payment}: |
|
||||
self.launch_wizard(cr, uid, [ref("account_payment_make_payment_0")], {"lang":
|
||||
"en_US", "active_model": "payment.order", "active_ids": [ref("payment_order_0")], "tz":
|
||||
False, "active_id": ref("payment_order_0"), })
|
||||
|
||||
-
|
||||
I check that Payment order is in "Done" state
|
||||
-
|
||||
!assert {model: payment.order, id: payment_order_0}:
|
||||
- state == 'done'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -58,16 +58,16 @@ class payment_order_create(osv.osv_memory):
|
|||
def create_payment(self, cr, uid, ids, context=None):
|
||||
order_obj = self.pool.get('payment.order')
|
||||
line_obj = self.pool.get('account.move.line')
|
||||
|
||||
data = self.read(cr, uid, ids, [], context)[0]
|
||||
line_ids= data['entries']
|
||||
payment_obj = self.pool.get('payment.line')
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
line_ids = data['entries']
|
||||
if not line_ids: return {}
|
||||
|
||||
payment = order_obj.browse(cr, uid, data['active_id'],
|
||||
context=context)
|
||||
payment = order_obj.browse(cr, uid, context['active_id'], context=context)
|
||||
t = payment.mode and payment.mode.type.id or None
|
||||
line2bank = pool.get('account.move.line').line2bank(cr, uid,
|
||||
line_ids, t, context)
|
||||
line2bank = line_obj.line2bank(cr, uid, line_ids, t, context)
|
||||
|
||||
## Finally populate the current payment with new lines:
|
||||
for line in line_obj.browse(cr, uid, line_ids, context=context):
|
||||
|
@ -78,7 +78,7 @@ class payment_order_create(osv.osv_memory):
|
|||
date_to_pay = line.date_maturity
|
||||
elif payment.date_prefered == 'fixed':
|
||||
date_to_pay = payment.date_planned
|
||||
pool.get('payment.line').create(cr, uid,{
|
||||
payment_obj.create(cr, uid,{
|
||||
'move_line_id': line.id,
|
||||
'amount_currency': line.amount_to_pay,
|
||||
'bank_id': line2bank.get(line.id),
|
||||
|
@ -88,13 +88,14 @@ class payment_order_create(osv.osv_memory):
|
|||
'date': date_to_pay,
|
||||
'currency': line.invoice and line.invoice.currency_id.id or False,
|
||||
}, context=context)
|
||||
return {}
|
||||
return {'nodestroy':True,}
|
||||
|
||||
def search_entries(self, cr, uid, ids, context=None):
|
||||
order_obj = self.pool.get('payment.order')
|
||||
line_obj = self.pool.get('account.move.line')
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [], context=context)[0]
|
||||
search_due_date = data['duedate']
|
||||
payment = order_obj.browse(cr, uid, context['active_id'], context=context)
|
||||
|
@ -109,8 +110,7 @@ class payment_order_create(osv.osv_memory):
|
|||
context.update({'line_ids': line_ids})
|
||||
model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_create_payment_order_lines')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
return {
|
||||
'name': ('Entrie Lines'),
|
||||
return {'name': ('Entrie Lines'),
|
||||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
|
|
|
@ -18,16 +18,13 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import time
|
||||
from osv import fields, osv
|
||||
|
||||
class account_payment_make_payment(osv.osv_memory):
|
||||
_name = 'account.payment.make.payment'
|
||||
_description = 'Account make payment'
|
||||
_columns = {
|
||||
}
|
||||
|
||||
def launch_wizard(self, cr, uid, ids, context):
|
||||
def launch_wizard(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Search for a wizard to launch according to the type.
|
||||
If type is manual. just confirm the order.
|
||||
|
@ -35,8 +32,8 @@ class account_payment_make_payment(osv.osv_memory):
|
|||
obj_payment_order = self.pool.get('payment.order')
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
obj_act = self.pool.get('ir.actions.act_window')
|
||||
order= obj_payment_order.browse(cr,uid,context['active_id'],context)
|
||||
t= order.mode and order.mode.type.code or 'manual'
|
||||
order= obj_payment_order.browse(cr, uid, context['active_id'], context)
|
||||
t = order.mode and order.mode.type.code or 'manual'
|
||||
if t == 'manual' :
|
||||
obj_payment_order.set_done(cr,uid,context['active_id'],context)
|
||||
return {}
|
||||
|
@ -49,12 +46,10 @@ class account_payment_make_payment(osv.osv_memory):
|
|||
module, wizard= gw
|
||||
result = mod_obj._get_id(cr, uid, module, wizard)
|
||||
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
|
||||
result = act_obj.read(cr, uid, [id])[0]
|
||||
return act_obj.read(cr, uid, [id])[0]
|
||||
#result['context'] = str({'fiscalyear': data['form']['fiscalyear']})
|
||||
return result
|
||||
|
||||
|
||||
account_payment_make_payment()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -7,12 +7,14 @@
|
|||
<field name="model">account.payment.make.payment</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Make Payment">
|
||||
<label string ="Are you sure you want to make payment?" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="launch_wizard" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
<form string="Make Payment">
|
||||
<group height="100" width="320">
|
||||
<separator string="Are you sure you want to make payment?"/>
|
||||
<newline/>
|
||||
<group colspan="2" col="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="launch_wizard" string="Yes" type="object" icon="gtk-ok" default_focus="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
'description': """Financial and accounting reporting
|
||||
Fiscal statements
|
||||
Indicators
|
||||
Add a dashboards for accountant that include Indicators reporting.
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
|
@ -39,6 +40,7 @@
|
|||
'account_wizard.xml',
|
||||
'wizard/account_report_print_indicators_view.xml',
|
||||
'wizard/account_report_print_indicators_with_pdf_view.xml',
|
||||
'board_account_report_view.xml',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="board_account_report_form" model="ir.ui.view">
|
||||
<field name="name">board.account.report.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="inherit_id" ref="account.board_account_form"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/hpaned/child2" position="inside">
|
||||
<button colspan="4" icon="terp-purchase" name="%(account_report.action_account_report_tree_view_indicator)d" string="My indicators" type="action"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -186,7 +186,7 @@
|
|||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(abs(a['balance'])) ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -196,7 +196,7 @@
|
|||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_dr()) ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(sum_dr()) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -224,7 +224,7 @@
|
|||
<para style="terp_default_9">[[ a['code'] ]]<font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(abs(a['balance'])) ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -234,7 +234,7 @@
|
|||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_cr()) ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(sum_cr()) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -197,7 +197,7 @@
|
|||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(abs(a['balance'])) ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font><font>[[ a['code1'] ]]</font></para>
|
||||
|
@ -206,7 +206,7 @@
|
|||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level1']-1) ]]</font><font>[[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name1'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(abs(a['balance1'])) ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(abs(a['balance1'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -216,13 +216,13 @@
|
|||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(abs(a.balance)) ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(abs(a.balance)) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -214,7 +214,7 @@
|
|||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or '' ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -224,7 +224,7 @@
|
|||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -256,7 +256,7 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(abs(a.balance)) ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(abs(a.balance)) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -269,7 +269,7 @@
|
|||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or '' ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -279,7 +279,7 @@
|
|||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -214,7 +214,7 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(abs(a['balance'])) ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
|
@ -227,7 +227,7 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(abs(a['balance1'])) ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(abs(a['balance1'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -240,7 +240,7 @@
|
|||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or '' ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9"></para>
|
||||
|
@ -249,7 +249,7 @@
|
|||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or '' ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -260,13 +260,13 @@
|
|||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -35,6 +35,7 @@ This module implement the modification on the invoice form.
|
|||
'init_xml': [],
|
||||
'update_xml': ['account_tax_include_view.xml'],
|
||||
'demo_xml': [],
|
||||
'test': ['test/account_tax_include.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0070514190381',
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
-
|
||||
Creating a tax record
|
||||
-
|
||||
!record {model: account.tax, id: account_tax_a0}:
|
||||
amount: 0.10000000000000001
|
||||
applicable_type: 'true'
|
||||
company_id: base.main_company
|
||||
description: a
|
||||
name: a
|
||||
sequence: 1
|
||||
type: percent
|
||||
type_tax_use: all
|
||||
|
||||
-
|
||||
Creating a account invoice record with tax excluded
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_tax_exclude}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
invoice_line:
|
||||
- account_id: account.a_sale
|
||||
name: '[PC1] Basic PC'
|
||||
price_unit: 100.0
|
||||
quantity: 1.0
|
||||
invoice_line_tax_id:
|
||||
- account_tax_a0
|
||||
product_id: product.product_product_pc1
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
price_type: tax_excluded
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
Performing an osv_memory action button_reset_taxes on module account.invoice
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
self.button_reset_taxes(cr, uid, [ref("account_invoice_tax_exclude")], {"lang": "en_US", "tz": False,
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_invoice_tree1")],
|
||||
"type": "out_invoice", "active_id": ref("account.menu_action_invoice_tree1"),
|
||||
})
|
||||
-
|
||||
Check if tax is excluded in invoice
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_tax_exclude, severity: error, string: price type is tax excluded}:
|
||||
- state == "draft"
|
||||
- amount_untaxed == 100.0
|
||||
- amount_tax == 10.0
|
||||
- amount_total == 110.0
|
||||
|
||||
-
|
||||
Creating a account invoice record with tax include
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_tax_include}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
invoice_line:
|
||||
- account_id: account.a_sale
|
||||
name: '[PC1] Basic PC'
|
||||
price_unit: 100.0
|
||||
quantity: 1.0
|
||||
invoice_line_tax_id:
|
||||
- account_tax_a0
|
||||
product_id: product.product_product_pc1
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
price_type: tax_included
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
Performing an osv_memory action button_reset_taxes on module account.invoice
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
self.button_reset_taxes(cr, uid, [ref("account_invoice_tax_include")], {"lang": "en_US", "tz": False,
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_invoice_tree1")],
|
||||
"type": "out_invoice", "active_id": ref("account.menu_action_invoice_tree1"),
|
||||
})
|
||||
-
|
||||
Check if tax is included in invoice
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_tax_include, severity: error, string: price type is tax included}:
|
||||
- state == "draft"
|
||||
- amount_untaxed == 90.91
|
||||
- amount_tax == 9.09
|
||||
- amount_total == 100.00
|
|
@ -37,7 +37,7 @@
|
|||
"category" : "Generic Modules/Accounting",
|
||||
"website" : "http://tinyerp.com",
|
||||
"depends" : [
|
||||
"base",
|
||||
"base",
|
||||
"account"
|
||||
],
|
||||
"init_xml" : [
|
||||
|
@ -54,8 +54,12 @@
|
|||
"voucher_view.xml",
|
||||
"voucher_wizard.xml",
|
||||
"wizard/account_voucher_open_view.xml",
|
||||
|
||||
|
||||
],
|
||||
"test" : [
|
||||
"test/account_voucher.yml",
|
||||
],
|
||||
|
||||
'certificate': '0037580727101',
|
||||
"active": False,
|
||||
"installable": True,
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
|
||||
-
|
||||
In order to check account voucher module in OpenERP I create a customer voucher
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
account_id: account.cash
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
journal_id: account.bank_journal
|
||||
name: Voucher for Axelor
|
||||
narration: Basic Pc
|
||||
payment_ids:
|
||||
- account_id: account.a_recv
|
||||
amount: 1000.0
|
||||
name: Voucher for Axelor
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
period_id: account.period_6
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
I check that Initially customer voucher is in the "Draft" state
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of voucher to "proforma" by clicking PRO-FORMA button
|
||||
-
|
||||
!workflow {model: account.voucher, action: open_voucher, ref: account_voucher_voucherforaxelor0}
|
||||
-
|
||||
I check that the voucher state is now "proforma"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'proforma'
|
||||
-
|
||||
I create voucher by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
|
||||
-
|
||||
I check that the voucher state is "Waiting for re-checking"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'recheck'
|
||||
-
|
||||
I clicked on Validate Button
|
||||
-
|
||||
!workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucherforaxelor0}
|
||||
-
|
||||
I check that the voucher state is "posted"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'posted'
|
||||
|
||||
-
|
||||
I check that Moves get created for this voucher
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_voucher_voucherforaxelor0"))
|
||||
assert(acc_id.move_id)
|
||||
|
||||
|
||||
-
|
||||
Now I create a Vendor Voucher
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
account_id: account.cash
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
journal_id: account.bank_journal
|
||||
name: Voucher Axelor
|
||||
narration: Basic PC
|
||||
payment_ids:
|
||||
- account_id: account.cash
|
||||
amount: 1000.0
|
||||
name: Voucher Axelor
|
||||
period_id: account.period_6
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
I check that Initially vendor voucher is in the "Draft" state
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of voucher to "proforma" by clicking PRO-FORMA button
|
||||
-
|
||||
!workflow {model: account.voucher, action: open_voucher, ref: account_voucher_voucheraxelor0}
|
||||
-
|
||||
I check that the voucher state is now "proforma"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'proforma'
|
||||
-
|
||||
I create voucher by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucheraxelor0}
|
||||
-
|
||||
I check that the voucher state is "Waiting for re-checking"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'recheck'
|
||||
-
|
||||
I clicked on Validate Button
|
||||
-
|
||||
!workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucheraxelor0}
|
||||
-
|
||||
I check that the voucher state is "posted"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'posted'
|
||||
|
||||
-
|
||||
I check that moves get created for this voucher
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_voucher_voucheraxelor0"))
|
||||
assert(acc_id.move_id)
|
|
@ -108,18 +108,29 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Receipt Vouchers -->
|
||||
<!-- Receipt Vouchers -->
|
||||
<record model="ir.actions.act_window" id="action_receipt_vou_voucher_list">
|
||||
<field name="name">Voucher Entries</field>
|
||||
<field name="name">Customer Vouchers</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<!-- <field name="domain">[('type','like','rec_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'rec_voucher'}</field>-->
|
||||
<field name="domain">[('journal_id.type','=','sale')]</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_receipt_vou_voucher_list"
|
||||
action="action_receipt_vou_voucher_list" parent="account.menu_finance_entries" sequence="8"/>
|
||||
action="action_receipt_vou_voucher_list" parent="account.menu_finance_receivables" sequence="8"/>
|
||||
|
||||
<!-- Purchase Vouchers -->
|
||||
<record model="ir.actions.act_window" id="action_pay_vou_voucher_list">
|
||||
<field name="name">Vendor Vouchers</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('journal_id.type','=','purchase')]</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_pay_vou_voucher_list"
|
||||
action="action_pay_vou_voucher_list" parent="account.menu_finance_payables" sequence="8"/>
|
||||
|
||||
<!-- <record model="ir.actions.act_window" id="action_receipt_cashreceipt_voucher_list">-->
|
||||
<!-- <field name="name">Cash Receipt</field>-->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
{
|
||||
|
@ -23,24 +23,29 @@
|
|||
"version" : "1.0",
|
||||
"author" : 'Tiny & Axelor',
|
||||
"description": """This module includes :
|
||||
* It reconcile the invoice (supplier, customer) while paying through
|
||||
* It reconcile the invoice (supplier, customer) while paying through
|
||||
Accounting Vouchers
|
||||
""",
|
||||
"category" : "Generic Modules/Indian Accounting",
|
||||
"website" : "http://tinyerpindia.com",
|
||||
"depends" : [
|
||||
"base",
|
||||
"base",
|
||||
"account",
|
||||
"account_voucher",
|
||||
],
|
||||
"init_xml" : [
|
||||
],
|
||||
|
||||
|
||||
"demo_xml" : [],
|
||||
"update_xml" : [
|
||||
"account_voucher_payment_view.xml",
|
||||
"account_voucher_payment_wizard.xml"
|
||||
],
|
||||
"test" : [
|
||||
# "test/account_voucher.yml",
|
||||
"test/account_voucher_payment.yml",
|
||||
],
|
||||
|
||||
"active": False,
|
||||
"installable": True,
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -35,9 +35,9 @@ class account_voucher(osv.osv):
|
|||
_columns = {
|
||||
'voucher_line_ids':fields.one2many('account.voucher.line', 'voucher_id', 'Voucher Lines', readonly=False, states={'proforma':[('readonly',True)]}),
|
||||
}
|
||||
|
||||
|
||||
def action_move_line_create(self, cr, uid, ids, *args):
|
||||
|
||||
|
||||
for inv in self.browse(cr, uid, ids):
|
||||
if inv.move_id:
|
||||
continue
|
||||
|
@ -55,12 +55,12 @@ class account_voucher(osv.osv):
|
|||
ref = inv.reference
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, inv.number)
|
||||
|
||||
|
||||
date = inv.date
|
||||
total_currency = 0
|
||||
for i in iml:
|
||||
partner_id=i['partner_id']
|
||||
acc_id = i['account_id']
|
||||
acc_id = i['account_id']
|
||||
if inv.currency_id.id != company_currency:
|
||||
i['currency_id'] = inv.currency_id.id
|
||||
i['amount_currency'] = i['amount']
|
||||
|
@ -97,19 +97,19 @@ class account_voucher(osv.osv):
|
|||
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x,date, context={})) ,iml)
|
||||
an_journal_id=inv.journal_id.analytic_journal_id.id
|
||||
journal_id = inv.journal_id.id
|
||||
|
||||
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, journal_id)
|
||||
if journal.sequence_id:
|
||||
name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id)
|
||||
|
||||
move = {
|
||||
'name': name,
|
||||
'journal_id': journal_id,
|
||||
'name': name,
|
||||
'journal_id': journal_id,
|
||||
'voucher_type':inv.type,
|
||||
'narration' : inv.narration,
|
||||
'data':date
|
||||
}
|
||||
|
||||
|
||||
if inv.period_id:
|
||||
move['period_id'] = inv.period_id.id
|
||||
for i in line:
|
||||
|
@ -128,7 +128,7 @@ class account_voucher(osv.osv):
|
|||
'journal_id':journal_id ,
|
||||
'period_id':inv.period_id.id,
|
||||
'partner_id': False,
|
||||
'ref': ref,
|
||||
'ref': ref,
|
||||
'date': date
|
||||
}
|
||||
if inv.type in ('rec_voucher', 'bank_rec_voucher', 'journal_pur_voucher', 'journal_voucher'):
|
||||
|
@ -144,15 +144,15 @@ class account_voucher(osv.osv):
|
|||
'voucher_invoice' : iml and iml[0]['invoice'] and iml[0]['invoice'].id or False,
|
||||
'debit':False,
|
||||
'credit':False,
|
||||
'move_id':move_id,
|
||||
'move_id':move_id,
|
||||
'account_id':line.account_id.id or False,
|
||||
'journal_id':journal_id ,
|
||||
'period_id':inv.period_id.id,
|
||||
'partner_id':line.partner_id.id or False,
|
||||
'ref':ref,
|
||||
'ref':ref,
|
||||
'date':date
|
||||
}
|
||||
|
||||
|
||||
if line.type == 'dr':
|
||||
move_line['debit'] = line.amount or False
|
||||
amount=line.amount
|
||||
|
@ -161,7 +161,7 @@ class account_voucher(osv.osv):
|
|||
amount=line.amount * (-1)
|
||||
ml_id=self.pool.get('account.move.line').create(cr, uid, move_line)
|
||||
id_mapping_dict[line.id] = ml_id
|
||||
|
||||
|
||||
total = 0.0
|
||||
mline = self.pool.get('account.move.line')
|
||||
if line.invoice_id.id:
|
||||
|
@ -180,7 +180,7 @@ class account_voucher(osv.osv):
|
|||
line.name=inv.narration
|
||||
else:
|
||||
line.name=line.name
|
||||
|
||||
|
||||
if line.account_analytic_id:
|
||||
an_line = {
|
||||
'name':line.name,
|
||||
|
@ -197,22 +197,22 @@ class account_voucher(osv.osv):
|
|||
self.pool.get('account.move.line').reconcile_partial(cr, uid, mline_ids, 'manual', context={})
|
||||
self.write(cr, uid, [inv.id], {'move_id': move_id})
|
||||
obj=self.pool.get('account.move').browse(cr, uid, move_id)
|
||||
|
||||
|
||||
for line in obj.line_id :
|
||||
cr.execute('insert into voucher_id (account_id,rel_account_move) values (%d, %d)',(int(ids[0]),int(line.id)))
|
||||
|
||||
|
||||
return True
|
||||
|
||||
account_voucher()
|
||||
|
||||
class account_voucher_line(osv.osv):
|
||||
_inherit = 'account.voucher.line'
|
||||
|
||||
|
||||
def default_get(self, cr, uid, fields, context={}):
|
||||
data = super(account_voucher_line, self).default_get(cr, uid, fields, context)
|
||||
self.voucher_context = context
|
||||
return data
|
||||
|
||||
|
||||
_columns = {
|
||||
'invoice_id' : fields.many2one('account.invoice','Invoice'),
|
||||
}
|
||||
|
@ -220,8 +220,8 @@ class account_voucher_line(osv.osv):
|
|||
def move_line_get_item(self, cr, uid, line, context={}):
|
||||
res = super(account_voucher_line, self).move_line_get_item(cr, uid, line, context)
|
||||
res['invoice'] = line.invoice_id or False
|
||||
return res
|
||||
|
||||
return res
|
||||
|
||||
def onchange_invoice_id(self, cr, uid, ids, invoice_id, context={}):
|
||||
lines = []
|
||||
if 'lines' in self.voucher_context:
|
||||
|
@ -233,27 +233,27 @@ class account_voucher_line(osv.osv):
|
|||
residual = invoice_obj.residual
|
||||
same_invoice_amounts = [x['amount'] for x in lines if x['invoice_id']==invoice_id]
|
||||
residual -= sum(same_invoice_amounts)
|
||||
return {'value' : {'amount':residual}}
|
||||
|
||||
return {'value' : {'amount':residual}}
|
||||
|
||||
def onchange_line_account(self, cr, uid, ids, account_id, type, type1):
|
||||
if not account_id:
|
||||
return {'value' : {'account_id' : False, 'type' : False ,'amount':False}}
|
||||
obj = self.pool.get('account.account')
|
||||
acc_id = False
|
||||
|
||||
|
||||
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
|
||||
acc_id = obj.browse(cr, uid, account_id)
|
||||
balance = acc_id.credit
|
||||
type = 'cr'
|
||||
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
|
||||
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
|
||||
acc_id = obj.browse(cr, uid, account_id)
|
||||
balance = acc_id.debit
|
||||
type = 'dr'
|
||||
elif type1 in ('journal_sale_vou') :
|
||||
elif type1 in ('journal_sale_vou') :
|
||||
acc_id = obj.browse(cr, uid, account_id)
|
||||
balance = acc_id.credit
|
||||
type = 'dr'
|
||||
elif type1 in ('journal_pur_voucher') :
|
||||
elif type1 in ('journal_pur_voucher') :
|
||||
acc_id = obj.browse(cr, uid, account_id)
|
||||
balance = acc_id.debit
|
||||
type = 'cr'
|
||||
|
@ -265,7 +265,7 @@ account_voucher_line()
|
|||
|
||||
class account_invoice(osv.osv):
|
||||
_inherit = "account.invoice"
|
||||
|
||||
|
||||
def action_cancel(self, cr, uid, ids, *args):
|
||||
res = super(account_invoice, self).action_cancel(cr, uid, ids, *args)
|
||||
invoices = self.read(cr, uid, ids, ['move_id'])
|
||||
|
@ -276,7 +276,7 @@ class account_invoice(osv.osv):
|
|||
move_ids = move_db.search(cr, uid, [])
|
||||
move_obj = move_db.browse(cr, uid, move_ids)
|
||||
return res
|
||||
|
||||
|
||||
account_invoice()
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -32,11 +32,11 @@ _info_form = '''<?xml version="1.0"?>
|
|||
def _trans_unrec(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
voucher = pool.get('account.voucher').browse(cr, uid, data.get('id'))
|
||||
recs = None
|
||||
recs = []
|
||||
for line in voucher.move_ids:
|
||||
if line.reconcile_id:
|
||||
recs = [line.reconcile_id.id]
|
||||
|
||||
|
||||
for rec in recs:
|
||||
pool.get('account.move.reconcile').unlink(cr, uid, rec)
|
||||
return {}
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
-
|
||||
In order to test account_voucher_payment module in OpenERP I create an invoice and paid it through voucher
|
||||
-
|
||||
I create a customer invoice record
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
invoice_line:
|
||||
- account_id: account.a_sale
|
||||
name: '[PC1] Basic PC'
|
||||
price_unit: 450.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
I check that Initially customer invoice is in the "Draft" state
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of invoice to "Proforma2" by clicking PRO-FORMA button
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_proforma2, ref: account_invoice_voucher_payment}
|
||||
-
|
||||
I check that the invoice state is now "Proforma2"
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
- state == 'proforma2'
|
||||
-
|
||||
I create invoice by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_voucher_payment}
|
||||
-
|
||||
I check that the invoice state is "Open"
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
- state == 'open'
|
||||
|
||||
-
|
||||
I create a voucher record for above invoice
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
account_id: account.cash
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
journal_id: account.bank_journal
|
||||
name: Voucher for Axelor
|
||||
narration: Basic Pc
|
||||
payment_ids:
|
||||
- account_id: account.a_recv
|
||||
amount: 450.0
|
||||
name: Voucher for Axelor
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
invoice_id: account_invoice_voucher_payment
|
||||
type: cr
|
||||
period_id: account.period_6
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
I check that Initially customer voucher is in the "Draft" state
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of voucher to "proforma" by clicking PRO-FORMA button
|
||||
-
|
||||
!workflow {model: account.voucher, action: open_voucher, ref: account_voucher_voucherforaxelor1}
|
||||
-
|
||||
I check that the voucher state is now "proforma"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
- state == 'proforma'
|
||||
-
|
||||
I create voucher by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor1}
|
||||
-
|
||||
I check that the voucher state is "Waiting for re-checking"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
- state == 'recheck'
|
||||
-
|
||||
I clicked on Validate Button
|
||||
-
|
||||
!workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucherforaxelor1}
|
||||
-
|
||||
I check that the voucher state is "posted"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
- state == 'posted'
|
||||
|
||||
-
|
||||
I check that Moves get created for this voucher
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_voucher_voucherforaxelor1"))
|
||||
assert(acc_id.move_id)
|
||||
|
||||
-
|
||||
I check that the invoice state is now Done
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
- state == 'paid'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -32,6 +32,11 @@
|
|||
It completely manages an auction such as managing bids,
|
||||
keeping track of the sold articles along with the paid
|
||||
and unpaid objects including delivery of the articles.
|
||||
Dashboards for auction that includes:
|
||||
* My Latest Objects (list)
|
||||
* My Latest Deposits (list)
|
||||
* Objects Statistics (list)
|
||||
* My Objects By Day (list)
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'depends': ['base', 'account', 'hr_attendance'],
|
||||
|
@ -54,13 +59,15 @@
|
|||
# 'wizard/auction_aie_send_result_view.xml',
|
||||
'wizard/auction_lots_buyer_map_view.xml',
|
||||
# 'wizard/auction_lots_numerotate_view.xml',
|
||||
|
||||
|
||||
'auction_view.xml',
|
||||
'auction_report.xml',
|
||||
'auction_wizard.xml'
|
||||
'auction_wizard.xml',
|
||||
'board_auction_view.xml',
|
||||
'board_auction_manager_view.xml',
|
||||
|
||||
],
|
||||
'demo_xml': ['auction_demo.xml'],
|
||||
# 'test' : ['test/auction.yml','test/auction_wizard.yml'],
|
||||
'demo_xml': ['auction_demo.xml','board_auction_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0039333102717',
|
||||
|
|
|
@ -69,13 +69,11 @@
|
|||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_auction_manager_form1"/>
|
||||
</record>
|
||||
<menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
|
||||
<menuitem name="Auction Manager" id="board_menu_auction_manager" parent="base.dashboard" />
|
||||
<menuitem
|
||||
name="Auction Manager"
|
||||
action="open_board_auction_manager"
|
||||
sequence="1"
|
||||
id="menu_board_auction_manager" parent="board_menu_auction_manager"/>
|
||||
id="menu_board_auction_manager" icon="terp-graph" parent="menu_board_auction"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -59,12 +59,12 @@
|
|||
<field name="view_id" ref="board_auction_manager_form"/>
|
||||
</record>
|
||||
<menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
|
||||
<menuitem name="Auction Member" id="board_menu_auction_member" parent="base.dashboard" />
|
||||
<menuitem name="Auction" id="menu_board_auction" parent="base.dashboard" />
|
||||
<menuitem
|
||||
name="Auction Member"
|
||||
action="open_board_auction"
|
||||
sequence="1"
|
||||
id="menu_board_auction" parent="board_menu_auction_member" />
|
||||
sequence="2"
|
||||
id="board_menu_auction_member" icon="terp-graph" parent="menu_board_auction" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,24 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Board for accountant',
|
||||
'version': '1.0',
|
||||
'category': 'Board/Accounting',
|
||||
'description': """
|
||||
This module creates a dashboards for accountants that includes:
|
||||
* List of analytic accounts to close
|
||||
* List of uninvoiced quotations
|
||||
* List of invoices to confirm
|
||||
* Graph of costs to invoice
|
||||
* Graph of aged receivables
|
||||
* Graph of aged incomes
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'depends': [
|
||||
'account',
|
||||
'hr_timesheet_invoice',
|
||||
'board',
|
||||
'account_report'
|
||||
],
|
||||
'update_xml': ['board_account_view.xml'],
|
||||
'demo_xml': ['board_account_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0076016921229',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -1,95 +0,0 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_account
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-02-03 06:25+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Analytic accounts to close"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Draft invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.actions.act_window,name:board_account.open_board_account
|
||||
#: model:ir.ui.menu,name:board_account.menu_board_account
|
||||
msgid "Accounting Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.actions.act_window,name:board_account.action_aged_receivable
|
||||
msgid "Receivable Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_account.act_my_account
|
||||
msgid "Accounts to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_account.action_account_analytic_line_to_invoice
|
||||
msgid "Costs to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Aged receivables"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.module.module,shortdesc:board_account.module_meta_information
|
||||
msgid "Board for accountant"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.actions.act_window,name:board_account.action_aged_income
|
||||
msgid "Income Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "My indicators"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.ui.menu,name:board_account.next_id_68
|
||||
msgid "Accounting"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Account Board"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Aged income"
|
||||
msgstr ""
|
|
@ -1,95 +0,0 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_account
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-02-03 21:27+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Analytic accounts to close"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Draft invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Невалиден XML за преглед на архитектурата"
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.actions.act_window,name:board_account.open_board_account
|
||||
#: model:ir.ui.menu,name:board_account.menu_board_account
|
||||
msgid "Accounting Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.actions.act_window,name:board_account.action_aged_receivable
|
||||
msgid "Receivable Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_account.act_my_account
|
||||
msgid "Accounts to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_account.action_account_analytic_line_to_invoice
|
||||
msgid "Costs to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Aged receivables"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.module.module,shortdesc:board_account.module_meta_information
|
||||
msgid "Board for accountant"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.actions.act_window,name:board_account.action_aged_income
|
||||
msgid "Income Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "My indicators"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.ui.menu,name:board_account.next_id_68
|
||||
msgid "Accounting"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Account Board"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Aged income"
|
||||
msgstr ""
|
|
@ -1,95 +0,0 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_account
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01:51+0000\n"
|
||||
"PO-Revision-Date: 2009-08-28 16:01:51+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Analytic accounts to close"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Draft invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.actions.act_window,name:board_account.open_board_account
|
||||
#: model:ir.ui.menu,name:board_account.menu_board_account
|
||||
msgid "Accounting Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.actions.act_window,name:board_account.action_aged_receivable
|
||||
msgid "Receivable Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_account.act_my_account
|
||||
msgid "Accounts to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_account.action_account_analytic_line_to_invoice
|
||||
msgid "Costs to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Aged receivables"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.module.module,shortdesc:board_account.module_meta_information
|
||||
msgid "Board for accountant"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.actions.act_window,name:board_account.action_aged_income
|
||||
msgid "Income Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "My indicators"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: model:ir.ui.menu,name:board_account.next_id_68
|
||||
msgid "Accounting"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Account Board"
|
||||
msgstr ""
|
||||
|
||||
#. module: board_account
|
||||
#: view:board.board:0
|
||||
msgid "Aged income"
|
||||
msgstr ""
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue