[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
bzr revid: mtr@mtr-20100618055549-peueqkwyp3mdxmqp
This commit is contained in:
@@ -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,6 +34,10 @@
|
||||
Budgets
|
||||
Customer and Supplier Invoices
|
||||
Bank statements
|
||||
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
|
||||
@@ -100,9 +104,9 @@ module named account_voucherss
|
||||
'project/wizard/account_analytic_chart_view.xml',
|
||||
'product_view.xml',
|
||||
'account_assert_test.xml',
|
||||
# 'process/statement_process.xml',
|
||||
# 'process/customer_invoice_process.xml',
|
||||
# 'process/supplier_invoice_process.xml',
|
||||
'process/statement_process.xml',
|
||||
'process/customer_invoice_process.xml',
|
||||
'process/supplier_invoice_process.xml',
|
||||
'sequence_view.xml',
|
||||
'company_view.xml',
|
||||
'account_installer.xml',
|
||||
@@ -111,7 +115,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,6 +125,7 @@ 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',
|
||||
|
||||
+42
-15
@@ -509,8 +509,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)
|
||||
@@ -557,42 +562,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 cancel the entries related to this journal or want to cancel 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 associated with a 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
|
||||
@@ -618,6 +627,16 @@ 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):
|
||||
@@ -711,7 +730,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',
|
||||
@@ -784,6 +803,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):
|
||||
@@ -809,7 +836,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={}):
|
||||
|
||||
@@ -19,26 +19,26 @@
|
||||
position="attributes">
|
||||
<attribute name="string">You can enhance OpenERP's basic accounting support with a few additional OpenERP applications.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>23</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<group colspan="4" height="450" width="600">
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<group colspan="4" height="450" width="600">
|
||||
<field name="charts"/>
|
||||
<group colspan="4">
|
||||
<separator col="4" colspan="4" string="Configure Fiscal Year"/>
|
||||
<separator col="4" colspan="4" string="Configure Fiscal Year"/>
|
||||
<field name="date_start" on_change="on_change_start_date(date_start)"/>
|
||||
<field name="date_stop"/>
|
||||
<field name="period" colspan="4"/>
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
|
||||
<separator col="4" colspan="4" string="Bank and Cost Account"/>
|
||||
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
|
||||
<form string="">
|
||||
<separator col="4" colspan="4" string="Bank and Cost Account"/>
|
||||
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
|
||||
<form string="">
|
||||
<field name="acc_name"/>
|
||||
<field name="account_type"/>
|
||||
<field name="currency_id" widget="selection"/>
|
||||
@@ -51,15 +51,15 @@
|
||||
</field>
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
|
||||
<field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
|
||||
<field name="purchase_tax" colspan="2" />
|
||||
<field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
|
||||
<field name="purchase_tax" colspan="2" />
|
||||
</group>
|
||||
<group colspan="4" groups="base.group_extended">
|
||||
<separator col="4" colspan="4" string="Install Extra Account Module"/>
|
||||
<field name="account_analytic_plans"/>
|
||||
<field name="account_payment"/>
|
||||
<field name="account_followup"/>
|
||||
<field name="account_asset"/>
|
||||
<separator col="4" colspan="4" string="Install Extra Account Module"/>
|
||||
<field name="account_analytic_plans"/>
|
||||
<field name="account_payment"/>
|
||||
<field name="account_followup"/>
|
||||
<field name="account_asset"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
@@ -88,12 +88,12 @@
|
||||
<field name="name">account_installer_action_replace</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@string='Launch']" position="replace">
|
||||
<button name="%(action_account_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@string='Launch']" position="replace">
|
||||
<button name="%(action_account_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
</field>
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="gtk-apply"/>
|
||||
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="terp-stock_format-scientific"/>
|
||||
<field name="amount_untaxed"/>
|
||||
<label string="" colspan="2"/>
|
||||
<field name="amount_tax"/>
|
||||
@@ -202,12 +202,12 @@
|
||||
<field name="state"/>
|
||||
<field name="residual"/>
|
||||
<group col="3" colspan="4">
|
||||
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-apply"/>
|
||||
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="terp-camera_test"/>
|
||||
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="terp-gtk-stop"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="stock_effects-object-colorize"/>
|
||||
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="gtk-execute"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="terp-dolar"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
@@ -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"/>
|
||||
@@ -256,7 +257,7 @@
|
||||
<field name="number"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
|
||||
<button name="%(action_account_change_currency)d" type="action" icon="gtk-apply" string="Change Currency"/>
|
||||
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change Currency"/>
|
||||
<newline/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank,company_id)" groups="base.group_user"/>
|
||||
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
|
||||
@@ -286,7 +287,7 @@
|
||||
</field>
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" groups="base.group_user" icon="gtk-apply"/>
|
||||
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" groups="base.group_user" icon="terp-stock_format-scientific"/>
|
||||
<field name="amount_untaxed"/>
|
||||
<label string="" colspan="2"/>
|
||||
<field name="amount_tax"/>
|
||||
@@ -295,11 +296,11 @@
|
||||
<field name="state"/>
|
||||
<field name="residual"/>
|
||||
<group col="4" colspan="4" groups="base.group_user">
|
||||
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="gtk-print"/>
|
||||
<button name="invoice_open" states="draft,proforma2" string="Create" icon="gtk-execute"/>
|
||||
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-check"/>
|
||||
<button name="invoice_open" states="draft,proforma2" string="Create" icon="terp-document-new"/>
|
||||
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="gtk-execute"/>
|
||||
</group>
|
||||
@@ -487,20 +488,5 @@
|
||||
|
||||
<act_window domain="[('partner_id', '=', partner_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_invoice_account_move_unreconciled" name="Unreconciled Receivables & Payables" res_model="account.move.line" src_model="account.invoice"/>
|
||||
|
||||
<!-- Partners inherited form -->
|
||||
|
||||
<record id="view_invoice_partner_info_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.invoice.info.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Account Info">
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -498,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
|
||||
@@ -569,11 +577,21 @@ 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 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!'))
|
||||
@@ -587,6 +605,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
|
||||
@@ -597,13 +616,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'),
|
||||
@@ -836,7 +864,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):
|
||||
@@ -848,8 +876,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)
|
||||
|
||||
@@ -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)"/>
|
||||
@@ -407,9 +408,9 @@
|
||||
<group col="7" colspan="4">
|
||||
<field name="state"/>
|
||||
<field name="balance_end"/>
|
||||
<button name="button_dummy" states="draft" string="Compute" icon="gtk-execute"/>
|
||||
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
|
||||
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
|
||||
<button name="button_dummy" states="draft" string="Compute" icon="terp-stock_format-scientific"/>
|
||||
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
|
||||
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="terp-gtk-stop"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -465,7 +466,7 @@
|
||||
<field name="total_entry"/>
|
||||
<field name="total_new"/>
|
||||
<field name="total_balance"/>
|
||||
<button colspan="2" name="dummy" string="Compute" icon="gtk-execute"/>
|
||||
<button colspan="2" name="dummy" string="Compute" icon="terp-stock_format-scientific"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -956,8 +957,8 @@
|
||||
<field name="narration" colspan="4" nolabel="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<group col="2" colspan="2">
|
||||
<button name="button_validate" states="draft" string="Validate" type="object" icon="gtk-execute"/>
|
||||
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
|
||||
<button name="button_validate" states="draft" string="Validate" type="object" icon="terp-camera_test"/>
|
||||
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="terp-gtk-stop"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other Information">
|
||||
@@ -1017,11 +1018,11 @@
|
||||
<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"/>-->
|
||||
<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>
|
||||
@@ -1032,7 +1033,7 @@
|
||||
<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">Journal Items</field>
|
||||
<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>
|
||||
@@ -1044,7 +1045,7 @@
|
||||
<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">Transaction Journals</field>
|
||||
<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>
|
||||
@@ -1098,7 +1099,7 @@
|
||||
<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 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"/>
|
||||
<!-- <wizard id="wizard_account_chart" menu="False" model="account.account" name="account.chart" string="Chart of Accounts"/>
|
||||
@@ -1152,9 +1153,9 @@
|
||||
<group col="7" colspan="4">
|
||||
<field name="state"/>
|
||||
<field name="balance_end"/>
|
||||
<button name="button_dummy" states="draft" string="Compute" icon="gtk-execute"/>
|
||||
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
|
||||
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
|
||||
<button name="button_dummy" states="draft" string="Compute" icon="terp-stock_format-scientific"/>
|
||||
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
|
||||
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="terp-gtk-stop"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -1166,20 +1167,20 @@
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" ref="view_bank_statement_reconcile_form"/>
|
||||
</record>
|
||||
<!-- <menuitem-->
|
||||
<!-- id="next_id_30"-->
|
||||
<!-- name="Bank Reconciliation"-->
|
||||
<!-- parent="account.menu_finance_periodical_processing"-->
|
||||
<!-- groups="group_account_user"/>-->
|
||||
<menuitem
|
||||
id="next_id_30"
|
||||
name="Bank Reconciliation"
|
||||
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"/>-->
|
||||
<!-- <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" />-->
|
||||
<menuitem action="action_account_bank_reconcile_tree"
|
||||
id="menu_action_account_bank_reconcile_check_tree"
|
||||
parent="account.next_id_30" />
|
||||
|
||||
|
||||
<act_window
|
||||
@@ -1430,7 +1431,7 @@
|
||||
<field name="period_type"/>
|
||||
<field name="model_id"/>
|
||||
<group col="2" colspan="2">
|
||||
<button name="compute" states="draft,running" string="Compute" type="object" icon="gtk-execute"/>
|
||||
<button name="compute" states="draft,running" string="Compute" type="object" icon="terp-stock_format-scientific"/>
|
||||
<button name="remove_line" states="running" string="Remove Lines" type="object" icon="gtk-remove"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Subscription Lines"/>
|
||||
@@ -1554,7 +1555,7 @@
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable'])]" id="act_account_partner_account_move_all" name="Receivables & Payables" res_model="account.move.line" src_model="res.partner"/>
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="All Account Entries" res_model="account.move.line" src_model="res.partner"/>
|
||||
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="All Account Entries" res_model="account.move.line" src_model="res.partner"/>
|
||||
|
||||
<record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
|
||||
<field name="name">Account Add wizard</field>
|
||||
@@ -1577,7 +1578,7 @@
|
||||
res_model="account.addtmpl.wizard"
|
||||
context="{'tmpl_ids': active_id}"
|
||||
src_model="account.account.template"
|
||||
view_type="form" view_mode="form"/>
|
||||
view_type="form" view_mode="form"/>
|
||||
|
||||
<!-- Account Templates -->
|
||||
<menuitem
|
||||
@@ -1820,17 +1821,17 @@
|
||||
<attribute name="string">Generate Chart of Accounts from a Chart Template</attribute>
|
||||
</form>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string"
|
||||
<attribute name="string"
|
||||
>Generate Chart of Accounts from a Chart Template</attribute>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>
|
||||
<attribute name="width">150</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>15</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>
|
||||
<attribute name="width">150</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>15</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<field name="company_id" widget="selection"
|
||||
/>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<!--
|
||||
Administrator shortcut
|
||||
Demo user startup menu
|
||||
+1
-23
@@ -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"/>
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-03 20:09+0000\n"
|
||||
"PO-Revision-Date: 2010-06-09 15:10+0000\n"
|
||||
"Last-Translator: Ferdinand @ ChriCar <Unknown>\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-06-04 03:45+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -4904,7 +4904,7 @@ msgstr "Details Finanzkonto"
|
||||
#. module: account
|
||||
#: rml:account.overdue:0
|
||||
msgid "VAT:"
|
||||
msgstr "USt.:"
|
||||
msgstr "UID:"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.analytic.account.cost_ledger:0
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-04 16:42+0000\n"
|
||||
"PO-Revision-Date: 2010-06-15 07:00+0000\n"
|
||||
"Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.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-06-09 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-18 03:32+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -1176,7 +1176,7 @@ msgstr ""
|
||||
#. module: account
|
||||
#: field:account.payment.term,line_ids:0
|
||||
msgid "Terms"
|
||||
msgstr "Periodi"
|
||||
msgstr "Condizioni"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.vat.declaration:0
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.6\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-05-29 11:45+0000\n"
|
||||
"Last-Translator: digitalsatori <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-06-09 16:41+0000\n"
|
||||
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.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-05-30 03:44+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -712,7 +712,7 @@ msgstr "客户欠款金额合计"
|
||||
#. module: account
|
||||
#: view:account.move.line:0
|
||||
msgid "St."
|
||||
msgstr ""
|
||||
msgstr "结单编码"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_tax_code_line_open
|
||||
|
||||
@@ -923,13 +923,13 @@ class account_invoice(osv.osv):
|
||||
account_move_obj = self.pool.get('account.move')
|
||||
invoices = self.read(cr, uid, ids, ['move_id', 'payment_ids'])
|
||||
for i in invoices:
|
||||
if i['move_id']:
|
||||
if i['move_id']:
|
||||
account_move_obj.button_cancel(cr, uid, [i['move_id'][0]])
|
||||
# delete the move this invoice was pointing to
|
||||
# Note that the corresponding move_lines and move_reconciles
|
||||
# will be automatically deleted too
|
||||
account_move_obj.unlink(cr, uid, [i['move_id'][0]])
|
||||
if i['payment_ids']:
|
||||
if i['payment_ids']:
|
||||
account_move_line_obj = self.pool.get('account.move.line')
|
||||
pay_ids = account_move_line_obj.browse(cr, uid , i['payment_ids'])
|
||||
for move_line in pay_ids:
|
||||
|
||||
@@ -89,7 +89,7 @@ class res_partner(osv.osv):
|
||||
_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)
|
||||
query = self.pool.get('account.move.line')._query_get(cr, 1, context=context)
|
||||
cr.execute("""select
|
||||
l.partner_id, a.type, sum(l.debit-l.credit)
|
||||
from
|
||||
|
||||
@@ -118,7 +118,6 @@
|
||||
<field name="acc_number"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
@@ -126,21 +125,14 @@
|
||||
|
||||
<!-- Partners info tab view-->
|
||||
|
||||
<record id="view_account_partner_info_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.account.info.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook[last()]" position="after">
|
||||
<notebook colspan="4">
|
||||
<page string="Project">
|
||||
<field name="contract_ids" colspan="4" nolabel="1" />
|
||||
</page>
|
||||
</notebook>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
id="action_analytic_open"
|
||||
name="Analytic Accounts"
|
||||
res_model="account.analytic.account"
|
||||
domain="[('partner_id','=',active_id)]"
|
||||
src_model="res.partner"
|
||||
view_type="form"
|
||||
view_mode="tree,form,graph,calendar"/>
|
||||
|
||||
</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"/>
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -312,23 +312,23 @@
|
||||
<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_entries"/>
|
||||
<record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<!-- <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>
|
||||
</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">
|
||||
<!-- <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>
|
||||
</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"/>-->
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Open Entries" name="action_open_window" type="object"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="action_open_window" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -30,7 +30,7 @@ import invoice
|
||||
import overdue
|
||||
import aged_trial_balance
|
||||
import tax_report
|
||||
import account_tax_code
|
||||
#import account_tax_code
|
||||
import account_balance_landscape
|
||||
import compare_account_balance
|
||||
import account_invoice_report
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Product UOM" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<filter string="Account Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<filter string="Period" icon="terp-go-month" context="{'group_by':'period_id'}"/>
|
||||
<filter string="Period of Move Line" icon="terp-go-month" context="{'group_by':'period_id2'}"/>
|
||||
<newline/>
|
||||
<filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -44,77 +48,77 @@
|
||||
</record>
|
||||
|
||||
<record id="account_move_line_comp_rule" model="ir.rule">
|
||||
<field name="name">Entry lines</field>
|
||||
<field name="name">Entry lines</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_move_line"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="journal_period_comp_rule" model="ir.rule">
|
||||
<field name="name">Journal Period</field>
|
||||
<field name="name">Journal Period</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_journal_period"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="journal_comp_rule" model="ir.rule">
|
||||
<field name="name">Journal multi-company</field>
|
||||
<field name="name">Journal multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_journal"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="analytic_journal_comp_rule" model="ir.rule">
|
||||
<field name="name">Analytic journal multi-company</field>
|
||||
<field name="name">Analytic journal multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_analytic_journal"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="analytic_journal_comp_rule_false" model="ir.rule">
|
||||
<field name="name">Analytic journal multi-company</field>
|
||||
<field name="name">Analytic journal multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_analytic_journal"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="period_comp_rule" model="ir.rule">
|
||||
<field name="name">Period multi-company</field>
|
||||
<field name="name">Period multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_period"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_year_comp_rule" model="ir.rule">
|
||||
<field name="name">Fiscal year multi-company</field>
|
||||
<field name="name">Fiscal year multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_fiscalyear"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="account_comp_rule" model="ir.rule">
|
||||
<field name="name">Account multi-company</field>
|
||||
<field name="name">Account multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_account"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="tax_comp_rule" model="ir.rule">
|
||||
<field name="name">Tax multi-company</field>
|
||||
<field name="name">Tax multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_tax"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="tax_code_comp_rule" model="ir.rule">
|
||||
<field name="name">Tax code multi-company</field>
|
||||
<field name="name">Tax code multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_tax_code"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="invoice_comp_rule" model="ir.rule">
|
||||
<field name="name">Invoice multi-company</field>
|
||||
<field name="name">Invoice multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_invoice"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_product_product_account_user","product.product.account.user","product.model_product_product","group_account_user",1,0,0,0
|
||||
"access_account_payment_term","account.payment.term","model_account_payment_term","account.group_account_user",1,0,0,0
|
||||
"access_account_payment_term_line","account.payment.term.line","model_account_payment_term_line","account.group_account_user",1,0,0,0
|
||||
"access_account_account_type","account.account.type","model_account_account_type","account.group_account_user",1,0,0,0
|
||||
@@ -69,7 +70,6 @@
|
||||
"access_account_add_tmpl_wizard_system_manager","account.addtmpl.wizard system manager","model_account_addtmpl_wizard","base.group_system",1,1,1,1
|
||||
"access_account_invoice_user","account.invoice user","model_account_invoice","base.group_user",1,0,0,0
|
||||
"access_account_invoice_user","account.invoice.line user","model_account_invoice_line","base.group_user",1,0,0,0
|
||||
"access_account_invoice_user","account.invoice.tax user","model_account_invoice_tax","base.group_user",1,0,0,0
|
||||
"access_account_payment_term_partner_manager","account.payment.term partner manager","model_account_payment_term","base.group_user",1,0,0,0
|
||||
"access_account_payment_term_line_partner_manager","account.payment.term.line partner manager","model_account_payment_term_line","base.group_user",1,0,0,0
|
||||
"access_account_account_product_manager","account.account product manager","model_account_account","product.group_product_manager",1,0,0,0
|
||||
@@ -85,7 +85,7 @@
|
||||
"access_account_fiscal_position_account_template","account.fiscal.position.account.template","model_account_fiscal_position_account_template","account.group_account_manager",1,1,1,1
|
||||
"access_account_sequence_fiscal_year","account.sequence.fiscalyear","model_account_sequence_fiscalyear","account.group_account_user",1,1,1,1
|
||||
"access_account_sequence_fiscal_year_user","account.sequence.fiscalyear user","model_account_sequence_fiscalyear","base.group_user",1,0,0,0
|
||||
"access_account_installer","account.installer","model_account_installer","base.group_user",1,0,0,0
|
||||
"access_account_installer","account.installer","model_account_installer","base.group_system",1,1,1,1
|
||||
"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_account_manager",1,0,0,0
|
||||
"access_temp_range","temp.range","model_temp_range","account.group_account_manager",1,0,0,0
|
||||
"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_account_manager",1,0,0,0
|
||||
|
||||
|
@@ -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={}):
|
||||
@@ -134,7 +135,6 @@ class account_automatic_reconcile(osv.osv_memory):
|
||||
return (reconciled, len(credits)+len(debits))
|
||||
|
||||
def reconcile(self, cr, uid, ids, context=None):
|
||||
service = netsvc.LocalService("object_proxy")
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
if context is None:
|
||||
@@ -146,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(
|
||||
@@ -168,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)' % ','.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]
|
||||
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 {
|
||||
|
||||
@@ -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="gtk-ok"/>
|
||||
<button name="reconcile" string="Reconcile" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -56,7 +64,7 @@
|
||||
<field name="unreconciled"/>
|
||||
<group colspan="4" col="6">
|
||||
<separator colspan="6"/>
|
||||
<button special="cancel" string="Ok" icon="gtk-ok" default_focus="1"/>
|
||||
<button special="cancel" string="Ok" icon="terp-dialog-close" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -64,4 +72,3 @@
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-print"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<separator colspan="4"/>
|
||||
<group colspan="2" col="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="change_currency" string="Change Currency" type="object" icon="gtk-go-forward"/>
|
||||
<button name="change_currency" string="Change Currency" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
<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" />
|
||||
<button icon="gtk-open" string="Open Charts"
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Charts"
|
||||
name="account_chart_open_window" type="object" />
|
||||
</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>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_invoice_confirm_view" model="ir.ui.view">
|
||||
<record id="account_invoice_confirm_view" model="ir.ui.view">
|
||||
<field name="name">account.invoice.confirm.form</field>
|
||||
<field name="model">account.invoice.confirm</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Confirm Draft Invoices">
|
||||
<separator string="Confirm Draft Invoices" colspan="4"/>
|
||||
<form string="Confirm Draft Invoices">
|
||||
<separator string="Confirm Draft Invoices" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Close"/>
|
||||
<button icon="gtk-execute" string="Confirm Invoices" name="invoice_confirm" type="object" default_focus="1"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Close"/>
|
||||
<button icon="terp-camera_test" string="Confirm Invoices" name="invoice_confirm" type="object" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_account_invoice_confirm" model="ir.actions.act_window">
|
||||
<record id="action_account_invoice_confirm" model="ir.actions.act_window">
|
||||
<field name="name">Confirm Draft Invoices</field>
|
||||
<field name="res_model">account.invoice.confirm</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -25,7 +25,7 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="action_account_invoice_confirm_values">
|
||||
<record model="ir.values" id="action_account_invoice_confirm_values">
|
||||
<field name="model_id" ref="account.model_account_invoice" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Confirm Draft Invoices</field>
|
||||
@@ -33,24 +33,24 @@
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_confirm'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.invoice</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="account_invoice_cancel_view" model="ir.ui.view">
|
||||
<record id="account_invoice_cancel_view" model="ir.ui.view">
|
||||
<field name="name">account.invoice.cancel.form</field>
|
||||
<field name="model">account.invoice.cancel</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Cancel Selected Invoices">
|
||||
<separator string="Cancel Selected Invoices" colspan="4"/>
|
||||
<form string="Cancel Selected Invoices">
|
||||
<separator string="Cancel Selected Invoices" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Close"/>
|
||||
<button icon="gtk-execute" string="Cancel Invoices" name="invoice_cancel" type="object" default_focus="1"/>
|
||||
<button icon="terp-dialog-close" special="cancel" string="Close"/>
|
||||
<button icon="terp-gtk-stop" string="Cancel Invoices" name="invoice_cancel" type="object" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_account_invoice_cancel" model="ir.actions.act_window">
|
||||
<record id="action_account_invoice_cancel" model="ir.actions.act_window">
|
||||
<field name="name">Cancel Selected Invoices</field>
|
||||
<field name="res_model">account.invoice.cancel</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -59,7 +59,7 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="action_account_invoice_cancel_values">
|
||||
<record model="ir.values" id="action_account_invoice_cancel_values">
|
||||
<field name="model_id" ref="account.model_account_invoice" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Cancel Selected Invoices</field>
|
||||
@@ -67,7 +67,7 @@
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_cancel'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.invoice</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
<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="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-open" string="Open Entries" name="action_open_window" type="object"/>
|
||||
<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"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-open" string="Open for bank reconciliation" name="action_open_window" type="object"/>
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open for bank reconciliation" name="action_open_window" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-open" string="Open Journal" name="action_open_window" type="object"/>
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Journal" name="action_open_window" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
<button icon="gtk-open"
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel" />
|
||||
<button icon="terp-gtk-go-back-rtl"
|
||||
string="Open for Reconciliation" name="action_open_window"
|
||||
type="object" />
|
||||
</group>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<label string="Are you sure you want to open Account move line entries!" colspan="4"/>
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-open" string="Open Entries" name="open_window" type="object" default_focus="1"/>
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="open_window" type="object" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
<button icon="gtk-open"
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel" />
|
||||
<button icon="terp-gtk-go-back-rtl"
|
||||
string="Open For Unreconciliation" name="action_open_window"
|
||||
type="object" />
|
||||
</group>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-open" string="Open" name="remove_entries" type="object"/>
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open" name="remove_entries" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button special="cancel" string="Cancel" icon="terp-gtk-stop"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-close" string="Close Period" name="data_save" type="object"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Close Period" name="data_save" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-ok" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1"/>
|
||||
<button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -99,7 +99,7 @@
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-ok" string="Reconcile" name="trans_rec_reconcile" type="object" default_focus="1"/>
|
||||
<button icon="gtk-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile" type="object" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Go" name="search_invoices" type="object"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Go" name="search_invoices" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -41,21 +41,22 @@
|
||||
<field name="model">account.move.line</field>
|
||||
</record>
|
||||
|
||||
<!-- <menuitem action="action_view_account_use_model" name="Create Entries From Models"-->
|
||||
<!-- parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>-->
|
||||
<menuitem action="action_view_account_use_model" name="Create Entries From Models"
|
||||
parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>
|
||||
|
||||
<record id="view_account_use_model_open_entry" model="ir.ui.view">
|
||||
<field name="name">account.use.model.open.entry.form</field>
|
||||
<field name="model">account.use.model</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Use Model">
|
||||
<group height="80" width="260">
|
||||
<separator string = "Entry Lines Created." colspan="4"/>
|
||||
<button icon="gtk-ok" special="cancel" string="Ok"/>
|
||||
<button icon="gtk-execute" string="Open" name="open_moves" type="object" default_focus='1'/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Use Model">
|
||||
<group colspan="4" col="6">
|
||||
<label string = "Entry Lines Created." colspan="2"/>
|
||||
<newline/>
|
||||
<button icon="gtk-ok" special="cancel" string="Ok"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open" name="open_moves" type="object" default_focus='1'/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -64,13 +65,14 @@
|
||||
<field name="model">account.use.model</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Use Model">
|
||||
<group height="90" width="310">
|
||||
<separator string = "Are you sure you want to create entries?" colspan="4"/>
|
||||
<button icon="gtk-ok" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Ok" name="create_entries" type="object" default_focus='1'/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Use Model">
|
||||
<group colspan="4" col="6">
|
||||
<label string = "Are you sure you want to create entries?" colspan="2"/>
|
||||
<newline/>
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Ok" name="create_entries" type="object" default_focus='1'/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<label string="All draft account entries in this journal and period will be validated. It means you won't be able to modify their accouting fields." colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-open" string="Validate" name="validate_move" type="object"/>
|
||||
<button icon="terp-camera_test" string="Validate" name="validate_move" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
|
||||
<menuitem id="next_id_71" name="Financial Project Management" parent="base.menu_main_pm" groups="account.group_account_invoice" sequence="20"/>
|
||||
<menuitem id="menu_invoicing" name="Billing" parent="next_id_71" sequence="20"/>
|
||||
<!-- <menuitem id="next_id_71" name="Financial Project Management" parent="base.menu_main_pm" groups="account.group_account_invoice" sequence="20"/>-->
|
||||
<menuitem id="menu_invoicing" name="Billing" parent="base.menu_main_pm" sequence="4"/>
|
||||
|
||||
<record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
|
||||
<field name="name">All Uninvoiced Entries</field>
|
||||
@@ -23,7 +23,7 @@
|
||||
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
<menuitem name="Analytic Accounts" action="action_account_analytic_all" id="menu_action_account_analytic_all" parent="next_id_71"/>
|
||||
<!-- <menuitem name="Analytic Accounts" action="action_account_analytic_all" id="menu_action_account_analytic_all" parent="next_id_71"/>-->
|
||||
|
||||
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
|
||||
<field name="name">Overpassed Accounts</field>
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-09 03:21+0000\n"
|
||||
"PO-Revision-Date: 2010-06-09 03:36+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: Greek <el@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_balance
|
||||
@@ -117,6 +117,25 @@ msgid ""
|
||||
" 5. You have an option to print the desired report in Landscape format.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"Το κομμάτι Ισολογισμών είναι ένα επιπρόσθετο λειτουργικό κομμάτι στο κομμάτι "
|
||||
"της Οικονομικής Διαχείρισης\n"
|
||||
"\n"
|
||||
" Αυτό το κομμάτι σου δίνει διάφορες επιλογές για εκτύπωση ισολογισμών.\n"
|
||||
"\n"
|
||||
" 1. Μπορείς να συγκρίνεις τους ισολογισμούς διαφόρων ετών.\n"
|
||||
"\n"
|
||||
" 2. Μπορείς να ορίσεις την απόλυτη ή επί τοις εκατό σύγκριση μεταξύ δύο "
|
||||
"ετών.\n"
|
||||
"\n"
|
||||
" 3. Μπορείς να ορίσεις το ισολογισμό αναφοράς για την επί τοις εκατό "
|
||||
"σύγκριση συγκεκριμένων ετών.\n"
|
||||
"\n"
|
||||
" 4. Μπορείς να επιλέξεις περιόδους ως πραγματική ημερομηνία ή περιόδους "
|
||||
"ως ημέρα δημιουργίας.\n"
|
||||
"\n"
|
||||
" 5. Έχεις δυνατότητα να εκτυπώσεις την επιθυμητή αναφορά σε μορφή "
|
||||
"Landscape.\n"
|
||||
" "
|
||||
|
||||
#. module: account_balance
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
@@ -149,7 +168,7 @@ msgstr "Σύνολο:"
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Account Balance -"
|
||||
msgstr ""
|
||||
msgstr "Ισολογισμός"
|
||||
|
||||
#. module: account_balance
|
||||
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
|
||||
|
||||
@@ -32,13 +32,12 @@ class account_budget_spread(osv.osv_memory):
|
||||
}
|
||||
|
||||
def check_spread(self, cr, uid, ids, context=None):
|
||||
service = netsvc.LocalService("object_proxy")
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
res = service.execute(cr.dbname, uid, 'account.budget.post', 'spread', context['active_ids'], data['fiscalyear'], data['amount'])
|
||||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
res = self.pool.get('account.budget.post').spread(cr, uid, context['active_ids'], data.fiscalyear.id, data.amount)
|
||||
return {}
|
||||
|
||||
account_budget_spread()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -19,6 +19,5 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -21,23 +21,20 @@
|
||||
|
||||
|
||||
{
|
||||
'name': 'Dashboard for sales',
|
||||
'version': '1.0',
|
||||
'category': 'Board/Sales & Purchase',
|
||||
'description': """
|
||||
This module implements a dashboard for salesman that includes:
|
||||
* Your open quotations
|
||||
* Top 10 sales of the month
|
||||
* Cases statistics
|
||||
* Graph of sales by product
|
||||
* Graph of cases of the 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': ['board', 'sale'],
|
||||
'update_xml': ['board_sale_view.xml'],
|
||||
'demo_xml': ['board_sale_demo.xml'],
|
||||
'website': 'http://www.openerp.com',
|
||||
'init_xml': [],
|
||||
'update_xml': ['account_cancel_view.xml' ],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0046503501021',
|
||||
|
||||
}
|
||||
# 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>
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_coda
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_coda
|
||||
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_followup
|
||||
|
||||
@@ -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"),
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_invoice_layout
|
||||
|
||||
@@ -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,11 +41,11 @@
|
||||
'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'],
|
||||
|
||||
@@ -18,29 +18,25 @@
|
||||
# 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'
|
||||
_description= 'Payment Type'
|
||||
_columns= {
|
||||
'name': fields.char('Name', size=64, required=True,help='Payment Type'),
|
||||
'code': fields.char('Code', size=64, required=True,help='Specifies the Code for Payment Type'),
|
||||
'name': fields.char('Name', size=64, required=True, help='Payment Type'),
|
||||
'code': fields.char('Code', size=64, required=True, help='Specifies the Code for Payment Type'),
|
||||
'suitable_bank_types': fields.many2many('res.partner.bank.type',
|
||||
'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'
|
||||
@@ -66,16 +62,14 @@ class payment_mode(osv.osv):
|
||||
where pm.id = %s """, [payment_code])
|
||||
return [x[0] for x in cr.fetchall()]
|
||||
|
||||
|
||||
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)
|
||||
@@ -146,7 +140,6 @@ class payment_order(osv.osv):
|
||||
|
||||
payment_order()
|
||||
|
||||
|
||||
class payment_line(osv.osv):
|
||||
_name = 'payment.line'
|
||||
_description = 'Payment Line'
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-09-08 15:11+0000\n"
|
||||
"Last-Translator: Makis Nicolaou <mark.nicolaou@gmail.com>\n"
|
||||
"PO-Revision-Date: 2010-06-09 06:03+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: Greek <el@li.org>\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:11+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_payment
|
||||
@@ -40,7 +40,7 @@ msgstr "Επιλέξτε την Κατάσταση Πληρωμής που θα
|
||||
#. module: account_payment
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: account_payment
|
||||
#: view:payment.line:0
|
||||
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_payment
|
||||
|
||||
@@ -110,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:
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Make Payment">
|
||||
<group height="80" width="320">
|
||||
<group height="100" width="320">
|
||||
<separator string="Are you sure you want to make payment?"/>
|
||||
<newline/>
|
||||
<group colspan="2" col="4">
|
||||
|
||||
@@ -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>
|
||||
@@ -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',
|
||||
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_tax_include
|
||||
|
||||
@@ -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)
|
||||
+10
-5
@@ -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 {}
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_voucher_payment
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_voucher_payment
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_voucher_payment
|
||||
|
||||
@@ -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,12 +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'],
|
||||
'demo_xml': ['auction_demo.xml','board_auction_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0039333102717',
|
||||
|
||||
+1
-3
@@ -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>
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: auction
|
||||
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-09 03:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-11 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: auction
|
||||
|
||||
@@ -27,8 +27,7 @@ class auction_invoice(report_int):
|
||||
report_int.__init__(self, name)
|
||||
|
||||
def create(self,cr, uid, ids, datas, context):
|
||||
service = netsvc.LocalService("object_proxy")
|
||||
lots = service.execute(cr.dbname,uid, 'auction.lots', 'read', ids, ['ach_inv_id'])
|
||||
lots = self.pool.get('auction.lots').read(cr,uid, ids, ['ach_inv_id'], context=context)
|
||||
|
||||
invoices = {}
|
||||
for l in lots:
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
-
|
||||
In order to test the auction module in the Open-ERP I start the process by creating a product.
|
||||
-
|
||||
I create a new product furniture.
|
||||
-
|
||||
!record {model: product.product, id: product_product_furniture0}:
|
||||
categ_id: product.cat1
|
||||
cost_method: standard
|
||||
mes_type: fixed
|
||||
name: Furniture
|
||||
procure_method: make_to_stock
|
||||
standard_price: 1.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
volume: 0.0
|
||||
warranty: 0.0
|
||||
weight: 0.0
|
||||
weight_net: 0.0
|
||||
-
|
||||
I create a new artist for an object.
|
||||
-
|
||||
!record {model: auction.artists, id: auction_artists_vincentvangogh0}:
|
||||
birth_death_dates: 1853-1900
|
||||
name: Vincent van Gogh
|
||||
-
|
||||
Now I want to associate an object with the auction so for that I create an auction "Antique furniture exhibition"
|
||||
-
|
||||
!record {model: auction.dates, id: auction_dates_antiquefurnitureexhibition0}:
|
||||
acc_expense: account.a_pay
|
||||
acc_income: account.a_recv
|
||||
account_analytic_id: account.analytic_root
|
||||
auction1: '2010-05-20'
|
||||
auction2: '2010-05-21'
|
||||
expo1: '2010-05-18'
|
||||
expo2: '2010-05-19'
|
||||
journal_id: account.expenses_journal
|
||||
journal_seller_id: account.sales_journal
|
||||
name: Antique furniture exhibition
|
||||
-
|
||||
An object is being deposited for an auction,I create a seller's deposit record.
|
||||
-
|
||||
!record {model: auction.deposit, id: auction_deposit_ad0}:
|
||||
date_dep: '2010-05-18'
|
||||
method: keep
|
||||
name: AD/006
|
||||
partner_id: base.res_partner_4
|
||||
-
|
||||
I create a new object wooden-chair which is to be auctioned.
|
||||
-
|
||||
!record {model: auction.lots, id: auction_lots_woodenchair0}:
|
||||
ach_uid: base.res_partner_2
|
||||
artist_id: auction_artists_vincentvangogh0
|
||||
auction_id: auction_dates_antiquefurnitureexhibition0
|
||||
bord_vnd_id: auction_deposit_ad0
|
||||
lot_est1: 3000.0
|
||||
lot_est2: 5000.0
|
||||
lot_num: 1
|
||||
name: wooden-chair
|
||||
name2: antique wooden chair
|
||||
obj_num: 1
|
||||
obj_price: 4000.0
|
||||
obj_ret: 5000.0
|
||||
product_id: 'product_product_furniture0'
|
||||
state: draft
|
||||
vnd_lim: 5000.0
|
||||
-
|
||||
I create a bid for an object "wooden-chair" which is to be auctioned in Antique furniture exhibition.
|
||||
-
|
||||
!record {model: auction.bid, id: auction_bid_bid0}:
|
||||
auction_id: auction_dates_antiquefurnitureexhibition0
|
||||
contact_tel: (+32)2 211 34 83
|
||||
name: bid/001
|
||||
partner_id: auction.partner_record1
|
||||
-
|
||||
I create a bid line.
|
||||
-
|
||||
!record {model: auction.bid_line, id: auction_bid_line_0}:
|
||||
auction: Antique furniture exhibition
|
||||
bid_id: auction_bid_bid0
|
||||
lot_id: auction.auction_lots_woodenchair0
|
||||
price: 3500.0
|
||||
-
|
||||
I create another bid for an object "wooden-chair" bided by a different partner
|
||||
-
|
||||
!record {model: auction.bid, id: auction_bid_bid1}:
|
||||
auction_id: auction_dates_antiquefurnitureexhibition0
|
||||
name: bid/002
|
||||
partner_id: base.res_partner_2
|
||||
-
|
||||
I create a bid line.
|
||||
-
|
||||
!record {model: auction.bid_line, id: auction_bid_line_1}:
|
||||
auction: Antique furniture exhibition
|
||||
bid_id: 'auction_bid_bid1'
|
||||
call: 1
|
||||
lot_id: auction.auction_lots_woodenchair0
|
||||
price: 4000.0
|
||||
-
|
||||
I check that buyer price and seller price gets bind with the value
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.buyer_price,auc_id.seller_price), _('Buyer price and seller price are not available!')
|
||||
-
|
||||
I check that a record gets created in the Seller's Summary.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
auc_deposit_obj=self.pool.get('auction.deposit')
|
||||
rep_sell_obj = self.pool.get('report.seller.auction')
|
||||
ids =rep_sell_obj.search(cr, uid, [('auction', '=', auc_id.auction_id.id),('seller', '=',auc_id.bord_vnd_id.partner_id.id)])
|
||||
assert ids, _('No record found!')
|
||||
-
|
||||
I check that a record gets created in the Seller's Revenues.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
auc_deposit_obj=self.pool.get('auction.deposit')
|
||||
rep_sell_obj = self.pool.get('report.seller.auction2')
|
||||
ids =rep_sell_obj.search(cr, uid, [('auction', '=', auc_id.auction_id.id),('seller', '=',auc_id.bord_vnd_id.partner_id.id)])
|
||||
assert ids, _('No record found!')
|
||||
-
|
||||
I check that a record gets created in the Buyer's Summary.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id1=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
rep_buy_obj1 = self.pool.get('report.buyer.auction')
|
||||
ids1=rep_buy_obj1.search(cr, uid, [('auction', '=', auc_id1.auction_id.id),('buyer', '=',auc_id1.ach_uid.id)])
|
||||
assert ids1, _('No record found!')
|
||||
-
|
||||
I check that a record gets created in the Buyer's Revenue.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id1=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
rep_buy_obj1 = self.pool.get('report.buyer.auction2')
|
||||
ids1=rep_buy_obj1.search(cr, uid, [('auction', '=', auc_id1.auction_id.id),('buyer', '=',auc_id1.ach_uid.id)])
|
||||
assert ids1, _('No record found!')
|
||||
-
|
||||
I check that a record gets created in the Auction's Summary.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id2=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
rep_auc_obj1 = self.pool.get('report.auction.view')
|
||||
ids2=rep_auc_obj1.search(cr, uid, [('auction_id', '=', auc_id2.auction_id.id)])
|
||||
assert ids2, _('No record found!')
|
||||
-
|
||||
I check that a record gets created in the Auction's Revenues.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id3=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
rep_auc_obj1 = self.pool.get('report.auction.view2')
|
||||
ids3=rep_auc_obj1.search(cr, uid, [('auction', '=', auc_id3.auction_id.id)])
|
||||
assert ids3, _('No record found!')
|
||||
-
|
||||
An object has been sold,so I click on the "Sold" button.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
self.button_bought(cr, uid, [ref("auction_lots_woodenchair0")], {"lang": "en_US", "tz":
|
||||
False, "active_model": "ir.ui.menu", "active_ids": [ref("auction.auction_lots_woodenchair0")],
|
||||
"active_id": ref("auction.auction_lots_woodenchair0")})
|
||||
-
|
||||
I check that the order which was initially in the draft state has transit to sold state.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.state == 'sold'), _('State not changed!')
|
||||
-
|
||||
Then I click on the Taken Away button.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
self.button_taken_away(cr, uid, [ref("auction_lots_woodenchair0")], {"lang":
|
||||
"en_US", "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("auction.auction_all_objects_menu")],
|
||||
"active_id": ref("auction.auction_all_objects_menu")})
|
||||
-
|
||||
I check that the order which was initially in the sold state has transit to taken away state.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.state == 'taken_away'), _('State not changed!')
|
||||
-
|
||||
I click on the "Close + Create all invoices" button
|
||||
-
|
||||
!python {model: auction.dates}: |
|
||||
self.close(cr, uid, [ref("auction.auction_dates_antiquefurnitureexhibition0")],
|
||||
{"lang": "en_US", "tz": False, "active_model": "ir.ui.menu", "active_ids":
|
||||
[ref("auction.menu_auction_dates_next1")], "active_id": ref("auction.menu_auction_dates_next1")})
|
||||
-
|
||||
I check that a record gets created in the "Supplier Invoices".
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.sel_inv_id), _('Seller Invoice has not been created!')
|
||||
@@ -0,0 +1,248 @@
|
||||
-
|
||||
In order to test the wizards of auction module I create a new record.
|
||||
-
|
||||
I start the process by creating a new product Paintings.
|
||||
-
|
||||
!record {model: product.product, id: product_product_paintings0}:
|
||||
categ_id: product.cat1
|
||||
cost_method: standard
|
||||
mes_type: fixed
|
||||
name: Paintings
|
||||
procure_method: make_to_stock
|
||||
standard_price: 1.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
volume: 0.0
|
||||
warranty: 0.0
|
||||
weight: 0.0
|
||||
weight_net: 0.0
|
||||
-
|
||||
I create a new artist-Picasso's record.
|
||||
-
|
||||
!record {model: auction.artists, id: auction_artists_picasso0}:
|
||||
birth_death_dates: 1881-1973
|
||||
name: Picasso
|
||||
-
|
||||
Now I want to associate an object with the auction so for that I create an auction "Picasso's painting exhibition"
|
||||
-
|
||||
!record {model: auction.dates, id: auction_dates_picassospaintingexhibition0}:
|
||||
acc_expense: account.a_pay
|
||||
acc_income: account.a_recv
|
||||
account_analytic_id: account.analytic_root
|
||||
auction1: '2010-05-24'
|
||||
auction2: '2010-05-25'
|
||||
expo1: '2010-05-21'
|
||||
expo2: '2010-05-22'
|
||||
journal_id: account.expenses_journal
|
||||
journal_seller_id: account.sales_journal
|
||||
name: Picasso's painting exhibition
|
||||
-
|
||||
An object is being deposited for an auction,I create a seller's deposit record.
|
||||
-
|
||||
!record {model: auction.deposit, id: auction_deposit_ad1}:
|
||||
date_dep: '2010-05-18'
|
||||
method: keep
|
||||
name: AD/007
|
||||
partner_id: base.res_partner_9
|
||||
-
|
||||
I create a new object painting which is to be auctioned.
|
||||
-
|
||||
!record {model: auction.lots, id: auction_lots_painting0}:
|
||||
ach_login: 'Mr.Chang'
|
||||
artist_id: auction.auction_artists_picasso0
|
||||
auction_id: auction_dates_picassospaintingexhibition0
|
||||
bord_vnd_id: auction_deposit_ad1
|
||||
lot_est1: 2000.0
|
||||
lot_est2: 4000.0
|
||||
lot_num: 2
|
||||
name: painting
|
||||
name2: picasso_painting
|
||||
obj_num: 2
|
||||
obj_price: 3500.0
|
||||
obj_ret: 4000.0
|
||||
product_id: auction.product_product_paintings0
|
||||
state: draft
|
||||
vnd_lim: 4000.0
|
||||
-
|
||||
I assign the buyer through "Map buyer user name to Partners" wizard.
|
||||
-
|
||||
!record {model: auction.lots.buyer_map, id: auction_lots_buyer_map_0}:
|
||||
ach_login: 'Mr.Chang'
|
||||
ach_uid: base.res_partner_3
|
||||
-
|
||||
I click on the "Update" button.
|
||||
-
|
||||
!python {model: auction.lots.buyer_map}: |
|
||||
auc_obj=self.pool.get('auction.lots')
|
||||
ids=self.browse(cr, uid, ref("auction_lots_painting0"))
|
||||
self.buyer_map_set(cr, uid, [ref("auction_lots_buyer_map_0")], {"lang": "en_US",
|
||||
"tz": False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
|
||||
"active_id": ref("auction_lots_painting0")})
|
||||
-
|
||||
I check that the buyer field gets bind with the value.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
|
||||
assert(auc_id.ach_uid), _('Buyer not assigned!')
|
||||
-
|
||||
I mark that a seller has been paid by using the "Mark as paid for seller" wizard.
|
||||
-
|
||||
!record {model: auction.payer.sel, id: auction_payer_sel_0}:
|
||||
{}
|
||||
-
|
||||
I click on the "Pay" button.
|
||||
-
|
||||
!python {model: auction.payer.sel}: |
|
||||
self.payer_sel(cr, uid, [ref("auction_payer_sel_0")], {"lang": "en_US", "tz":
|
||||
False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")], "active_id": ref("auction_lots_painting0")})
|
||||
-
|
||||
I check that the Seller paid field is set to True.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
|
||||
assert(auc_id.paid_vnd == True), _('Seller paid is not marked!')
|
||||
-
|
||||
I use the "Mark as taken away" wizard to indicate that an object is taken away.
|
||||
-
|
||||
!record {model: auction.lots.able, id: auction_lots_able_0}:
|
||||
{}
|
||||
-
|
||||
Then I click on the "Able Taken away" wizard.
|
||||
-
|
||||
!python {model: auction.lots.able}: |
|
||||
self.confirm_able(cr, uid, [ref("auction_lots_able_0")], {"lang":"en_US", "tz":
|
||||
False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
|
||||
"active_id": ref("auction_lots_painting0")})
|
||||
-
|
||||
I check that Taken away field is set to True.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
|
||||
assert(auc_id.ach_emp == True), _('Taken away is not marked!')
|
||||
-
|
||||
I use the "Unmark as taken away" wizard to unmark the Taken Away field.
|
||||
-
|
||||
!record {model: auction.lots.enable, id: auction_lots_enable_0}:
|
||||
confirm_en: 0.0
|
||||
-
|
||||
Then I click on the "Enable Taken away" button.
|
||||
-
|
||||
!python {model: auction.lots.enable}: |
|
||||
self.confirm_enable(cr, uid, [ref("auction_lots_enable_0")], {"lang": "en_US",
|
||||
"tz": False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
|
||||
"active_id": ref("auction_lots_painting0"),})
|
||||
-
|
||||
I check that Taken away field is set to False.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
|
||||
assert(auc_id.ach_emp == False), _('Taken away is marked!')
|
||||
-
|
||||
I create statement lines for an object's payment by using the "Pay objects of the buyer" wizard
|
||||
-
|
||||
I create a bank statement.
|
||||
-
|
||||
!record {model: account.bank.statement, id: account_bank_statement_st0}:
|
||||
balance_end_real: 0.0
|
||||
date: '2010-05-19'
|
||||
journal_id: account.bank_journal
|
||||
name: St. 05/19
|
||||
period_id: account.period_5
|
||||
state: draft
|
||||
-
|
||||
I create auction payment record.
|
||||
-
|
||||
!record {model: auction.pay.buy, id: auction_pay_buy_0}:
|
||||
amount: 2000.0
|
||||
amount2: 1000.0
|
||||
amount3: 1000.0
|
||||
buyer_id: base.res_partner_2
|
||||
statement_id1: account_bank_statement_st0
|
||||
statement_id2: account_bank_statement_st0
|
||||
statement_id3: account_bank_statement_st0
|
||||
total: 4000.0
|
||||
-
|
||||
Then I click "Pay" button.
|
||||
-
|
||||
!python {model: auction.pay.buy}: |
|
||||
self.pay_and_reconcile(cr, uid, [ref("auction_pay_buy_0")], {"lang": "en_US", "tz":
|
||||
False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
|
||||
"active_id": ref("auction_lots_painting0"),})
|
||||
-
|
||||
I check that a record gets created in the 'auction_statement_line_rel' table
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
cr.execute("select statement from auction_statement_line_rel,auction_lots where auction_lots.id=auction_statement_line_rel.auction_id AND auction_lots.name='painting'")
|
||||
ans=cr.fetchall()
|
||||
assert ans, _('statement_id not found!')
|
||||
-
|
||||
I create the seller's invoice by using the "Invoice Seller objects" wizard.
|
||||
-
|
||||
!record {model: auction.lots.make.invoice, id: auction_lots_make_invoice_0}:
|
||||
amount: 3500.0
|
||||
number: 2010/002
|
||||
objects: 1
|
||||
-
|
||||
Then I click on the "Create Invoices" button.
|
||||
-
|
||||
!python {model: auction.lots.make.invoice}: |
|
||||
self.makeInvoices(cr, uid, [ref("auction_lots_make_invoice_0")], {"lang": "en_US",
|
||||
"active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
|
||||
"tz": False, "active_id": ref("auction_lots_painting0"),})
|
||||
-
|
||||
I check that a "Seller Invoice" field gets bind with the value.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
|
||||
assert(auc_id.sel_inv_id), _('Seller Invoice has not been created!')
|
||||
-
|
||||
I create a buyer's invoice by using the "Invoice Buyer objects" wizard.
|
||||
-
|
||||
!record {model: auction.lots.make.invoice.buyer, id: auction_lots_make_invoice_buyer_0}:
|
||||
amount: 3500.0
|
||||
buyer_id: base.res_partner_3
|
||||
number: 2010/003
|
||||
objects: 1
|
||||
-
|
||||
Then I click on the "Create Invoices" button.
|
||||
-
|
||||
!python {model: auction.lots.make.invoice.buyer}: |
|
||||
self.makeInvoices(cr, uid, [ref("auction_lots_make_invoice_buyer_0")], {"lang":
|
||||
"en_US", "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
|
||||
"tz": False, "active_id": ref("auction_lots_painting0"), })
|
||||
-
|
||||
I check that a "Buyer Invoice" field gets bind with the value.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
|
||||
assert(auc_id.ach_inv_id), _('Seller Invoice has not been created!')
|
||||
-
|
||||
In order to change the auction for an object I use the "Change auction date" wizard.
|
||||
-
|
||||
!record {model: auction.lots.auction.move, id: auction_lots_auction_move_0}:
|
||||
auction_id: auction.auction_date_2
|
||||
-
|
||||
Then I click on the "Move to Auction date" button.
|
||||
-
|
||||
!python {model: auction.lots.auction.move}: |
|
||||
self.auction_move_set(cr, uid, [ref("auction_lots_auction_move_0")], {"lang":
|
||||
"en_US", "tz": False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
|
||||
"active_id": ref("auction_lots_painting0"), })
|
||||
-
|
||||
I check that a record gets created in the lot history.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
|
||||
auc_lot_his=self.pool.get('auction.lot.history')
|
||||
ids=auc_lot_his.search(cr, uid, [('lot_id', '=', auc_id.id)])
|
||||
assert ids, _('Auction history does not exists!')
|
||||
@@ -1,2 +1,3 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_base_action_rule","base.action.rule","model_base_action_rule",,1,1,1,1
|
||||
"access_base_action_rule","base.action.rule","model_base_action_rule",,1,0,0,0
|
||||
"access_base_action_rule_config","base.action.rule config","model_base_action_rule",base.group_system,1,0,0,0
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Attendee form view-->
|
||||
<!-- Attendee form view-->
|
||||
|
||||
<record id="base_calendar_attendee_form_view" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.form</field>
|
||||
@@ -10,12 +10,12 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Invitation details">
|
||||
<group col="6" colspan="4">
|
||||
<field name="email" string="Invitation To"/>
|
||||
<field name="cutype" string="Invitation type" />
|
||||
<group col="6" colspan="4">
|
||||
<field name="email" string="Invitation To"/>
|
||||
<field name="cutype" string="Invitation type" />
|
||||
<field name="rsvp" />
|
||||
<field name="role" string="Role" />
|
||||
<field name="sent_by_uid" string="Invitation From" />
|
||||
<field name="sent_by_uid" string="Invitation From" />
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Invitation">
|
||||
@@ -68,7 +68,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Attendee tree view-->
|
||||
<!-- Attendee tree view-->
|
||||
|
||||
<record id="base_calendar_attendee_tree_view" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.tree</field>
|
||||
@@ -87,7 +87,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Attendee search view-->
|
||||
<!-- Attendee search view-->
|
||||
|
||||
<record id="base_calendar_attendee_search_view" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.search</field>
|
||||
@@ -103,52 +103,52 @@
|
||||
separator="1" help="Declined Invitations" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="email" select='1'/>
|
||||
<field name="sent_by_uid" select="1" widget="selection"/>
|
||||
<field name="sent_by_uid" select="1"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="cutype" string="Invitation type" select="1"/>
|
||||
<field name="event_date" select="1"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':'cutype'}" />
|
||||
<filter string="Role" icon="terp-gtk-select-all"
|
||||
domain="[]" context="{'group_by':'role'}" />
|
||||
<filter string="Required Reply" icon="terp-mail-replied"
|
||||
domain="[]" context="{'group_by':'rsvp'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="User" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Contact" icon="terp-gtk-jump-to-ltr" domain="[]"
|
||||
context="{'group_by':'partner_address_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" help="Invitation Type"
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':'cutype'}" />
|
||||
<filter string="Role" icon="terp-gtk-select-all"
|
||||
domain="[]" context="{'group_by':'role'}" />
|
||||
<filter string="Required Reply" icon="terp-mail-replied"
|
||||
domain="[]" context="{'group_by':'rsvp'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="User" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Contact" icon="terp-gtk-jump-to-ltr" domain="[]"
|
||||
context="{'group_by':'partner_address_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':' state'}" />
|
||||
</group>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_view_attendee_form" model="ir.actions.act_window">
|
||||
<field name="name">Event Invitations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.attendee</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
|
||||
<field name="context">{'default_sent_by_uid': uid}</field>
|
||||
</record>
|
||||
<record id="action_view_attendee_form" model="ir.actions.act_window">
|
||||
<field name="name">Event Invitations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.attendee</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
|
||||
<field name="context">{'default_sent_by_uid': uid}</field>
|
||||
</record>
|
||||
|
||||
<!-- Calenadar's menu -->
|
||||
<!-- Calenadar's menu -->
|
||||
<menuitem id="base.menu_calendar_configuration" name="Calendar"
|
||||
parent="base.menu_config_address_book" sequence="15" />
|
||||
|
||||
<!-- Invitation menu -->
|
||||
<!-- Invitation menu -->
|
||||
|
||||
<menuitem id="menu_attendee_invitations"
|
||||
<menuitem id="menu_attendee_invitations"
|
||||
name="Event Invitations" parent="base.menu_calendar_configuration"
|
||||
sequence="10" action="action_view_attendee_form" />
|
||||
|
||||
<!-- ALARM FORM VIEW-->
|
||||
<!-- ALARM FORM VIEW-->
|
||||
|
||||
<record id="res_alarm_form_view" model="ir.ui.view">
|
||||
<record id="res_alarm_form_view" model="ir.ui.view">
|
||||
<field name="name">res.alarm.form</field>
|
||||
<field name="model">res.alarm</field>
|
||||
<field name="type">form</field>
|
||||
@@ -165,7 +165,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ALARM TREE VIEW-->
|
||||
<!-- ALARM TREE VIEW-->
|
||||
|
||||
<record id="res_alarm_tree_view" model="ir.ui.view">
|
||||
<field name="name">res.alarm.tree</field>
|
||||
@@ -189,198 +189,199 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- Menu for Alarms-->
|
||||
<!-- Menu for Alarms-->
|
||||
|
||||
<menuitem id="menu_crm_meeting_avail_alarm"
|
||||
groups="base.group_extended"
|
||||
action="base_calendar.action_res_alarm_view"
|
||||
parent="base.menu_calendar_configuration" />
|
||||
|
||||
<!-- Event Form View-->
|
||||
|
||||
<record model="ir.ui.view" id="event_form_view">
|
||||
<field name="name">Event Form</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Events">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" string="Summary"
|
||||
colspan="4" />
|
||||
<field name="allday" colspan="2" on_change="onchange_allday(allday)" />
|
||||
<newline/>
|
||||
<field name="date" string="Start Date" required="1" select="1"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)" attrs="{'invisible': [('allday', '=', True)]}"/>
|
||||
<field name="date_deadline" string="End Date" required="1"
|
||||
on_change="onchange_dates(date,False,date_deadline)" />
|
||||
<field name="location" />
|
||||
<field name="alarm_id" string="Reminder"
|
||||
widget="selection" />
|
||||
<group colspan="2" col="4" >
|
||||
<field name="rrule_type" string="Recurrency"
|
||||
colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
|
||||
<button string="Edit All"
|
||||
help="Edit all Ourrences of recurrent Meeting"
|
||||
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
|
||||
name="open_event" icon="gtk-edit"
|
||||
type="object" />
|
||||
</group>
|
||||
</group>
|
||||
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
|
||||
<separator string="Select data for Custom Rule" colspan="8"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="freq" />
|
||||
<field name="interval" />
|
||||
<field name="count" />
|
||||
<field name="end_date" />
|
||||
</group>
|
||||
<group col="14" colspan="4" name="Select weekdays"
|
||||
attrs="{'invisible' : [('freq','!=','weekly')]}">
|
||||
<field name="mo" colspan="1" />
|
||||
<field name="tu" colspan="1" />
|
||||
<field name="we" colspan="1" />
|
||||
<field name="th" colspan="1" />
|
||||
<field name="fr" colspan="1" />
|
||||
<field name="sa" colspan="1" />
|
||||
<field name="su" colspan="1" />
|
||||
<newline />
|
||||
</group>
|
||||
<group col="10" colspan="4"
|
||||
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
|
||||
<group col="2" colspan="1">
|
||||
<field name="select1" />
|
||||
</group>
|
||||
<group col="2" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','day')]}">
|
||||
<field name="day"
|
||||
attrs="{'required' : [('select1','=','date')]}" />
|
||||
</group>
|
||||
<group col="3" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','date')]}">
|
||||
<field name="byday" string="The"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
<field name="week_list" nolabel="1"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
</group>
|
||||
<group col="1" colspan="1"
|
||||
attrs="{'invisible' : [('freq','!=','yearly')]}">
|
||||
<field name="month_list" string="of"
|
||||
colspan="1"
|
||||
attrs="{'required' : [('freq','=','yearly')]}" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Event">
|
||||
<group col="6" colspan="4">
|
||||
<separator colspan="6" string="Visibility"/>
|
||||
<field name="user_id" string="Responsible User" />
|
||||
<field name="show_as" string="Show time as"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<field name="recurrent_id" invisible="1" />
|
||||
<field name="recurrent_uid" invisible="1" />
|
||||
</group>
|
||||
<separator string="Description" colspan="4" />
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
<separator colspan="4"/>
|
||||
</page>
|
||||
<page string="Invitation Detail">
|
||||
<button string="Invite People"
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
icon="terp-partner" type="action"
|
||||
context="{'model' : 'calendar.event', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="email" />
|
||||
<field name="role" width="200" select="1" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
<form string="Invitation details">
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="email" />
|
||||
<field name="rsvp" select="1" />
|
||||
<field name="cutype" select="1" />
|
||||
<field name="role" select="1" />
|
||||
<separator colspan="4" string="" />
|
||||
<group col="6" colspan="4">
|
||||
<field name="state" select="2" />
|
||||
<button name="do_tentative"
|
||||
states="needs-action,declined,accepted"
|
||||
string="Uncertain"
|
||||
type="object"
|
||||
icon="terp-crm" />
|
||||
<button name="do_accept"
|
||||
string="Accept"
|
||||
states="needs-action,tentative,declined"
|
||||
type="object"
|
||||
icon="gtk-apply" />
|
||||
<button name="do_decline"
|
||||
string="Decline"
|
||||
states="needs-action,tentative,accepted"
|
||||
type="object"
|
||||
icon="gtk-cancel" />
|
||||
<button
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
string="Delegate"
|
||||
type="action"
|
||||
icon="gtk-sort-descending"
|
||||
states="needs-action,tentative,declined,accepted"
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="event_form_view">
|
||||
<field name="name">Event Form</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Events">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" string="Summary"
|
||||
colspan="4" />
|
||||
<field name="allday" colspan="2" on_change="onchange_allday(allday)" />
|
||||
<newline/>
|
||||
<field name="date" string="Start Date" required="1" select="1"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)" attrs="{'invisible': [('allday', '=', True)]}"/>
|
||||
<field name="date_deadline" string="End Date" required="1"
|
||||
on_change="onchange_dates(date,False,date_deadline)" />
|
||||
<field name="location" />
|
||||
<field name="alarm_id" string="Reminder"
|
||||
widget="selection" />
|
||||
<group colspan="2" col="4" >
|
||||
<field name="rrule_type" string="Recurrency"
|
||||
colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
|
||||
<button string="Edit All"
|
||||
help="Edit all Ourrences of recurrent Meeting"
|
||||
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
|
||||
name="open_event" icon="gtk-edit"
|
||||
type="object" />
|
||||
</group>
|
||||
</group>
|
||||
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
|
||||
<separator string="Select data for Custom Rule" colspan="8"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="freq" />
|
||||
<field name="interval" />
|
||||
<field name="count" />
|
||||
<field name="end_date" />
|
||||
</group>
|
||||
<group col="14" colspan="4" name="Select weekdays"
|
||||
attrs="{'invisible' : [('freq','!=','weekly')]}">
|
||||
<field name="mo" colspan="1" />
|
||||
<field name="tu" colspan="1" />
|
||||
<field name="we" colspan="1" />
|
||||
<field name="th" colspan="1" />
|
||||
<field name="fr" colspan="1" />
|
||||
<field name="sa" colspan="1" />
|
||||
<field name="su" colspan="1" />
|
||||
<newline />
|
||||
</group>
|
||||
<group col="10" colspan="4"
|
||||
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
|
||||
<group col="2" colspan="1">
|
||||
<field name="select1" />
|
||||
</group>
|
||||
<group col="2" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','day')]}">
|
||||
<field name="day"
|
||||
attrs="{'required' : [('select1','=','date')]}" />
|
||||
</group>
|
||||
<group col="3" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','date')]}">
|
||||
<field name="byday" string="The"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
<field name="week_list" nolabel="1"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
</group>
|
||||
<group col="1" colspan="1"
|
||||
attrs="{'invisible' : [('freq','!=','yearly')]}">
|
||||
<field name="month_list" string="of"
|
||||
colspan="1"
|
||||
attrs="{'required' : [('freq','=','yearly')]}" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Event">
|
||||
<group col="6" colspan="4">
|
||||
<separator colspan="6" string="Visibility"/>
|
||||
<field name="user_id" string="Responsible User" />
|
||||
<field name="show_as" string="Show time as"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<field name="recurrent_id" invisible="1" />
|
||||
<field name="recurrent_uid" invisible="1" />
|
||||
</group>
|
||||
<separator string="Description" colspan="4" />
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
<separator colspan="4"/>
|
||||
</page>
|
||||
<page string="Invitation Detail">
|
||||
<button string="Invite People"
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
icon="terp-partner" type="action"
|
||||
context="{'model' : 'calendar.event', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="email" />
|
||||
<field name="role" width="200" select="1" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
<form string="Invitation details">
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="email" />
|
||||
<field name="rsvp" select="1" />
|
||||
<field name="cutype" select="1" />
|
||||
<field name="role" select="1" />
|
||||
<separator colspan="4" string="" />
|
||||
<group col="6" colspan="4">
|
||||
<field name="state" select="2" />
|
||||
<button name="do_tentative"
|
||||
states="needs-action,declined,accepted"
|
||||
string="Uncertain"
|
||||
type="object"
|
||||
icon="terp-crm" />
|
||||
<button name="do_accept"
|
||||
string="Accept"
|
||||
states="needs-action,tentative,declined"
|
||||
type="object"
|
||||
icon="gtk-apply" />
|
||||
<button name="do_decline"
|
||||
string="Decline"
|
||||
states="needs-action,tentative,accepted"
|
||||
type="object"
|
||||
icon="gtk-cancel" />
|
||||
<button
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
string="Delegate"
|
||||
type="action"
|
||||
icon="gtk-sort-descending"
|
||||
states="needs-action,tentative,declined,accepted"
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Event Tree View -->
|
||||
<!-- Event Tree View -->
|
||||
|
||||
<record model="ir.ui.view" id="event_tree_view">
|
||||
<field name="name">Event Tree</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Events">
|
||||
<field name="name" string="Subject" />
|
||||
<field name="date" string="Meeting Date" />
|
||||
<field name="location" />
|
||||
<field name="show_as" />
|
||||
<field name="class" string="Privacy" />
|
||||
<field name="user_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="event_tree_view">
|
||||
<field name="name">Event Tree</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Events">
|
||||
<field name="name" string="Subject" />
|
||||
<field name="date" string="Meeting Date" />
|
||||
<field name="location" />
|
||||
<field name="show_as" />
|
||||
<field name="class" string="Privacy" />
|
||||
<field name="user_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Event Calendar View -->
|
||||
<!-- Event Calendar View -->
|
||||
|
||||
<record model="ir.ui.view" id="event_calendar_view">
|
||||
<field name="name">Events Calendar</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Events" date_start="date" color="show_as" date_delay="duration">
|
||||
<field name="name"/>
|
||||
<field name="class"/>
|
||||
<field name="show_as"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="event_calendar_view">
|
||||
<field name="name">Events Calendar</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Events" date_start="date" color="show_as" date_delay="duration">
|
||||
<field name="name"/>
|
||||
<field name="class"/>
|
||||
<field name="show_as"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Event Search View-->
|
||||
<!-- Event Search View-->
|
||||
|
||||
<record id="view_calendar_event_filter" model="ir.ui.view">
|
||||
<field name="name">Calendar Events Search</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<record id="view_calendar_event_filter" model="ir.ui.view">
|
||||
<field name="name">Calendar Events Search</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Events">
|
||||
<group col="12" colspan="4">
|
||||
<filter icon="terp-go-today" string="My Events"
|
||||
@@ -390,42 +391,42 @@
|
||||
<field name="name" select="1" string="Summary"/>
|
||||
<field name="location" select="1" string="Location"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" select="1" widget="selection"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="show_as" select="1"/>
|
||||
<field name="class" select="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Availability" icon="terp-camera_test"
|
||||
domain="[]" context="{'group_by':'show_as'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
</group>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Availability" icon="terp-camera_test"
|
||||
domain="[]" context="{'group_by':'show_as'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Event action -->
|
||||
<!-- Event action -->
|
||||
|
||||
<record id="action_view_event" model="ir.actions.act_window">
|
||||
<field name="name">Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.event</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="search_view_id" ref="view_calendar_event_filter"/>
|
||||
</record>
|
||||
<record id="action_view_event" model="ir.actions.act_window">
|
||||
<field name="name">Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.event</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="search_view_id" ref="view_calendar_event_filter"/>
|
||||
</record>
|
||||
|
||||
<!-- Event menu -->
|
||||
<!-- Event menu -->
|
||||
|
||||
<menuitem id="menu_events"
|
||||
<menuitem id="menu_events"
|
||||
name="Events" parent="base.menu_calendar_configuration"
|
||||
sequence="5" action="action_view_event" />
|
||||
|
||||
|
||||
Executable → Regular
+8
-8
@@ -1,9 +1,9 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_calendar_attendee","calendar.attendee","model_calendar_attendee",,1,1,1,1
|
||||
"access_calendar_alarm","calendar.alarm","model_calendar_alarm",,1,1,1,1
|
||||
"access_res_alarm","res.alarm","model_res_alarm",,1,1,1,1
|
||||
"access_calendar_event_all","calendar.event","model_calendar_event",,1,1,1,1
|
||||
"access_calendar_todo","calendar.todo","model_calendar_todo",,1,1,1,1
|
||||
"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",,1,1,1,1
|
||||
"access_calendar_event_edit_all","calendar_event_edit_all","model_calendar_event_edit_all",,1,1,1,1
|
||||
"access_base_calendar_set_exrule","base.calendar.set.exrule","model_base_calendar_set_exrule",,1,1,1,1
|
||||
"access_calendar_attendee","calendar.attendee","model_calendar_attendee",base.group_user,1,1,1,1
|
||||
"access_calendar_alarm","calendar.alarm","model_calendar_alarm",base.group_user,1,1,1,1
|
||||
"access_res_alarm","res.alarm","model_res_alarm",base.group_user,1,1,1,1
|
||||
"access_calendar_event_all","calendar.event","model_calendar_event",base.group_user,1,1,1,1
|
||||
"access_calendar_todo","calendar.todo","model_calendar_todo",base.group_user,1,1,1,1
|
||||
"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",base.group_user,1,1,1,1
|
||||
"access_calendar_event_edit_all","calendar_event_edit_all","model_calendar_event_edit_all",base.group_user,1,1,1,1
|
||||
"access_base_calendar_set_exrule","base.calendar.set.exrule","model_base_calendar_set_exrule",base.group_user,1,1,1,1
|
||||
|
||||
|
@@ -122,6 +122,18 @@
|
||||
<field name="search_view_id" ref="view_partner_contact_search"/>
|
||||
</record>
|
||||
<menuitem name="Contacts" id="menu_partner_contact_form" action="action_partner_contact_form" parent = "base.menu_address_book" sequence="2"/>
|
||||
|
||||
<!--
|
||||
Contacts for Suppliers
|
||||
-->
|
||||
<menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Purchases"
|
||||
sequence="7"/>
|
||||
<menuitem id="base.menu_procurement_management_supplier" name="Address Book"
|
||||
parent="base.menu_purchase_root" sequence="3"/>
|
||||
<menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
|
||||
parent="base.menu_procurement_management_supplier" action="base.action_partner_supplier_form" sequence="1"/>
|
||||
<menuitem name="Contacts" id="menu_purchases_partner_contact_form" action="action_partner_contact_form"
|
||||
parent = "base.menu_procurement_management_supplier" sequence="2"/>
|
||||
|
||||
<!-- Views for Partners Form View -->
|
||||
|
||||
@@ -400,13 +412,5 @@
|
||||
src_model="res.partner.address"
|
||||
/>
|
||||
|
||||
<menuitem icon="terp-purchase" id="base.menu_purchase_root"
|
||||
name="Procurement Management" sequence="7" />
|
||||
<menuitem id="base.menu_procurement_management_supplier"
|
||||
name="Suppliers" parent="base.menu_purchase_root" sequence="3" />
|
||||
<menuitem name="Contacts" id="menu_partner_contact_supplier_form"
|
||||
action="action_partner_contact_form"
|
||||
parent="base.menu_procurement_management_supplier" sequence="2" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user