bzr revid: fp@tinyerp.com-20080829113235-86amecull2qhmmr3
This commit is contained in:
Fabien Pinckaers 2008-08-29 13:32:35 +02:00
commit f213efffad
7 changed files with 39 additions and 35 deletions

View File

@ -112,12 +112,12 @@
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="Supplier invoice">
<notebook>
<field domain="[('type', '=', 'purchase')]" name="journal_id" select="2"/>
<field name="type" readonly="1" select="2"/>
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank)" select="1"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<notebook colspan="4">
<page string="Invoice">
<field domain="[('type', '=', 'purchase')]" name="journal_id" select="2"/>
<field name="type" readonly="1" select="2"/>
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank)" select="1"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id"/>
<field name="date_due" select="1"/>
<field domain="[('partner_id', '=', partner_id)]" name="partner_bank" on_change="onchange_partner_bank(partner_bank)" select="2"/>
@ -196,12 +196,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Invoice">
<notebook>
<field name="journal_id" select="2"/>
<field name="type" readonly="1" select="2"/>
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term)" select="1"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<notebook colspan="4">
<page string="Invoice">
<field name="journal_id" select="2"/>
<field name="type" readonly="1" select="2"/>
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term)" select="1"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id"/>
<field name="payment_term" on_change="onchange_payment_term_date_invoice(payment_term, date_invoice)"/>
<field name="name" select="2"/>

View File

@ -266,7 +266,6 @@ class account_move_line(osv.osv):
'analytic_lines': fields.one2many('account.analytic.line', 'move_id', 'Analytic lines'),
'centralisation': fields.selection([('normal','Normal'),('credit','Credit Centralisation'),('debit','Debit Centralisation')], 'Centralisation', size=6),
'balance': fields.function(_balance, method=True, string='Balance'),
'active': fields.boolean('Active'),
'state': fields.selection([('draft','Draft'), ('valid','Valid')], 'Status', readonly=True),
'tax_code_id': fields.many2one('account.tax.code', 'Tax Account'),
'tax_amount': fields.float('Tax/Base Amount', digits=(16,2), select=True),

View File

@ -242,12 +242,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Journal">
<notebook>
<field name="name" select="1"/>
<field name="active" select="1"/>
<field name="code" select="1"/>
<field name="type"/>
<notebook colspan="4">
<page string="General Information">
<field name="name" select="1"/>
<field name="active" select="1"/>
<field name="code" select="1"/>
<field name="type"/>
<field name="view_id"/>
<field name="sequence_id"/>
<field name="default_debit_account_id"/>
@ -554,14 +554,16 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Tax">
<notebook>
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="company_id"/>
<field name="description" select="1"/>
<field name="active" select="2"/>
<field name="tax_group" select="1"/>
<field name="type"/>
</group>
<notebook colspan="4">
<page string="Tax Definition">
<field name="name" select="1"/>
<field name="company_id"/>
<field name="description" select="1"/>
<field name="tax_group" select="1"/>
<field name="active" select="2"/>
<field name="type"/>
<field name="applicable_type"/>
<field name="amount" select="2" attrs="{'readonly':[('type','=','none'),('type','=','code')]}"/>
<field groups="base.group_extended" name="include_base_amount"/>

View File

@ -44,12 +44,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Analytic account">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="parent_id" on_change="on_change_parent(parent_id)"/>
<field name="company_id" select="2"/>
<field name="type" select="2"/>
<field name="partner_id" select="1"/>
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="parent_id" on_change="on_change_parent(parent_id)"/>
<field name="company_id" select="2"/>
<field name="type" select="2"/>
<field name="partner_id" select="1"/>
</group>
<notebook colspan="4">
<page string="Account Data">
<field name="date_start"/>

View File

@ -73,7 +73,7 @@ _reconcile_fields = {
'type': 'many2many',
'relation': 'account.account',
'domain': [('reconcile','=',1)],
'required': True
'help': 'If no account is specified, the reconciliation will be made using every accounts that can be reconcilied',
},
'writeoff_acc_id': {
'string': 'Account',
@ -226,8 +226,8 @@ def _reconcile(self, cr, uid, data, context):
max_amount = form.get('max_amount', 0.0)
power = form['power']
reconciled = unreconciled = 0
if not form['account_ids']:
return {'reconciled':0, 'unreconciled':[0]}
if not form['account_ids'][0][2]:
form['account_ids'][0][2] = pooler.get_pool(cr.dbname).get('account.account').search(cr, uid, [('reconcile','=',True)])
for account_id in form['account_ids'][0][2]:
# reconcile automatically all transactions from partners whose balance is 0
@ -264,6 +264,7 @@ def _reconcile(self, cr, uid, data, context):
"WHERE account_id=%d " \
"AND reconcile_id IS NULL " \
"AND state <> 'draft' " \
"AND partner_id IS NOT NULL " \
"GROUP BY partner_id " \
"HAVING count(*)>1",
(account_id,))

View File

@ -129,7 +129,7 @@
<field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field name="amount"/>
<field name="general_account_id"/>
<field name="journal_id"/>
<!-- <field name="journal_id"/>-->
<field invisible="1" name="user_id" required="1"/>
</tree>
</field>

View File

@ -20,7 +20,7 @@ form = """<?xml version="1.0"?>
fields = {
'fyear': {'string': 'Fiscal Year', 'type': 'many2one', 'relation': 'account.fiscalyear', 'required': True,},
'mand_id':{'string':'MandataireId','type':'char','size':'30','required': True,},
'limit_amount':{'string':'Limit Amount','type':'int','required': True, },
'limit_amount':{'string':'Limit Amount','type':'integer','required': True, },
'test_xml': {'string':'Test XML file', 'type':'boolean', },
}
msg_form = """<?xml version="1.0"?>
@ -46,7 +46,7 @@ class wizard_vat(wizard.interface):
seq_controlref = pooler.get_pool(cr.dbname).get('ir.sequence').get(cr, uid,'controlref')
seq_declarantnum = pooler.get_pool(cr.dbname).get('ir.sequence').get(cr, uid,'declarantnum')
obj_cmpny = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid).company_id
company_vat = obj_cmpny.partner_id.vat
company_vat = obj_cmpny.partner_id.vat
if not company_vat: #if not vat_company:
raise wizard.except_wizard('Data Insufficient','No VAT Number Associated with Main Company!')