[MERGE] Sync with trunk.

bzr revid: tde@openerp.com-20121211092156-hg62weec6a3yifsf
This commit is contained in:
Thibault Delavallée 2012-12-11 10:21:56 +01:00
commit bf40c23e00
4035 changed files with 351455 additions and 234131 deletions

View File

@ -141,7 +141,7 @@ for a particular financial year and for preparation of vouchers there is a modul
'project/analytic_account_demo.xml',
'demo/account_minimal.xml',
'demo/account_invoice_demo.xml',
# 'account_unit_test.xml',
'account_unit_test.xml',
],
'test': [
'test/account_customer_invoice.yml',

View File

@ -75,8 +75,8 @@ class account_payment_term(osv.osv):
amount = value
result = []
obj_precision = self.pool.get('decimal.precision')
prec = obj_precision.precision_get(cr, uid, 'Account')
for line in pt.line_ids:
prec = obj_precision.precision_get(cr, uid, 'Account')
if line.value == 'fixed':
amt = round(line.value_amount, prec)
elif line.value == 'procent':
@ -92,19 +92,20 @@ class account_payment_term(osv.osv):
next_date += relativedelta(day=line.days2, months=1)
result.append( (next_date.strftime('%Y-%m-%d'), amt) )
amount -= amt
return result
account_payment_term()
amount = reduce(lambda x,y: x+y[1], result, 0.0)
dist = round(value-amount, prec)
if dist:
result.append( (time.strftime('%Y-%m-%d'), dist) )
return result
class account_payment_term_line(osv.osv):
_name = "account.payment.term.line"
_description = "Payment Term Line"
_columns = {
'name': fields.char('Line Name', size=32, required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the payment term lines from the lowest sequences to the higher ones"),
'value': fields.selection([('procent', 'Percent'),
('balance', 'Balance'),
('fixed', 'Fixed Amount')], 'Valuation',
('fixed', 'Fixed Amount')], 'Computation',
required=True, help="""Select here the kind of valuation related to this payment term line. Note that you should have your last line with the type 'Balance' to ensure that the whole amount will be treated."""),
'value_amount': fields.float('Amount To Pay', digits_compute=dp.get_precision('Payment Term'), help="For percent enter a ratio between 0-1."),
@ -115,10 +116,10 @@ class account_payment_term_line(osv.osv):
}
_defaults = {
'value': 'balance',
'sequence': 5,
'days': 30,
'days2': 0,
}
_order = "sequence"
_order = "value desc,days"
def _check_percent(self, cr, uid, ids, context=None):
obj = self.browse(cr, uid, ids[0], context=context)
@ -1082,7 +1083,7 @@ class account_journal_period(osv.osv):
'journal_id': fields.many2one('account.journal', 'Journal', required=True, ondelete="cascade"),
'period_id': fields.many2one('account.period', 'Period', required=True, ondelete="cascade"),
'icon': fields.function(_icon_get, string='Icon', type='char', size=32),
'active': fields.boolean('Active', required=True, help="If the active field is set to False, it will allow you to hide the journal period without removing it."),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the journal period without removing it."),
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'Status', required=True, readonly=True,
help='When journal period is created. The status is \'Draft\'. If a report is printed it comes to \'Printed\' status. When all transactions are done, it comes in \'Done\' status.'),
'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'),
@ -1374,9 +1375,9 @@ class account_move(osv.osv):
if 'line_id' in vals:
c = context.copy()
c['novalidate'] = True
c['period_id'] = vals['period_id']
c['period_id'] = vals['period_id'] if 'period_id' in vals else self._get_period(cr, uid, context)
c['journal_id'] = vals['journal_id']
c['date'] = vals['date']
if 'date' in vals: c['date'] = vals['date']
result = super(account_move, self).create(cr, uid, vals, c)
self.validate(cr, uid, [result], context)
else:
@ -2304,8 +2305,13 @@ class account_model(osv.osv):
if not line.partner_id:
raise osv.except_osv(_('Error!'), _("Maturity date of entry line generated by model line '%s' of model '%s' is based on partner payment term!" \
"\nPlease define partner on it!")%(line.name, model.name))
if line.partner_id.property_payment_term:
payment_term_id = False
if model.journal_id.type in ('purchase', 'purchase_refund') and line.partner_id.property_supplier_payment_term:
payment_term_id = line.partner_id.property_supplier_payment_term.id
elif line.partner_id.property_payment_term:
payment_term_id = line.partner_id.property_payment_term.id
if payment_term_id:
pterm_list = pt_obj.compute(cr, uid, payment_term_id, value=1, date_ref=date_maturity)
if pterm_list:
pterm_list = [l[0] for l in pterm_list]

View File

@ -80,8 +80,11 @@ class account_invoice(osv.osv):
def _reconciled(self, cr, uid, ids, name, args, context=None):
res = {}
for id in ids:
res[id] = self.test_paid(cr, uid, [id])
wf_service = netsvc.LocalService("workflow")
for inv in self.browse(cr, uid, ids, context=context):
res[inv.id] = self.test_paid(cr, uid, [inv.id])
if not res[inv.id] and inv.state == 'paid':
wf_service.trg_validate(uid, 'account.invoice', inv.id, 'open_test', cr)
return res
def _get_reference_type(self, cr, uid, context=None):
@ -217,7 +220,7 @@ class account_invoice(osv.osv):
'date_invoice': fields.date('Invoice Date', readonly=True, states={'draft':[('readonly',False)]}, select=True, help="Keep empty to use the current date"),
'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}, select=True,
help="If you use payment terms, the due date will be computed automatically at the generation "\
"of accounting entries. If you keep the payment term and the due date empty, it means direct payment. The payment term may compute several due dates, for example 50% now, 50% in one month."),
"of accounting entries. The payment term may compute several due dates, for example 50% now and 50% in one month, but if you want to force a due date, make sure that the payment term is not set on the invoice. If you keep the payment term and the due date empty, it means direct payment."),
'partner_id': fields.many2one('res.partner', 'Partner', change_default=True, readonly=True, required=True, states={'draft':[('readonly',False)]}),
'payment_term': fields.many2one('account.payment.term', 'Payment Term',readonly=True, states={'draft':[('readonly',False)]},
help="If you use payment terms, the due date will be computed automatically at the generation "\
@ -294,6 +297,18 @@ class account_invoice(osv.osv):
('number_uniq', 'unique(number, company_id, journal_id, type)', 'Invoice Number must be unique per Company!'),
]
def _find_partner(self, inv):
'''
Find the partner for which the accounting entries will be created
'''
#if the chosen partner is not a company and has a parent company, use the parent for the journal entries
#because you want to invoice 'Agrolait, accounting department' but the journal items are for 'Agrolait'
part = inv.partner_id
if part.parent_id and not part.is_company:
part = part.parent_id
return part
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
journal_obj = self.pool.get('account.journal')
if context is None:
@ -443,7 +458,6 @@ class account_invoice(osv.osv):
def onchange_partner_id(self, cr, uid, ids, type, partner_id,\
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
invoice_addr_id = False
partner_payment_term = False
acc_id = False
bank_id = False
@ -453,8 +467,6 @@ class account_invoice(osv.osv):
if partner_id:
opt.insert(0, ('id', partner_id))
res = self.pool.get('res.partner').address_get(cr, uid, [partner_id], ['invoice'])
invoice_addr_id = res['invoice']
p = self.pool.get('res.partner').browse(cr, uid, partner_id)
if company_id:
if (p.property_account_receivable.company_id and (p.property_account_receivable.company_id.id != company_id)) and (p.property_account_payable.company_id and (p.property_account_payable.company_id.id != company_id)):
@ -480,10 +492,11 @@ class account_invoice(osv.osv):
if type in ('out_invoice', 'out_refund'):
acc_id = p.property_account_receivable.id
partner_payment_term = p.property_payment_term and p.property_payment_term.id or False
else:
acc_id = p.property_account_payable.id
partner_payment_term = p.property_supplier_payment_term and p.property_supplier_payment_term.id or False
fiscal_position = p.property_account_position and p.property_account_position.id or False
partner_payment_term = p.property_payment_term and p.property_payment_term.id or False
if p.bank_ids:
bank_id = p.bank_ids[0].id
@ -524,11 +537,11 @@ class account_invoice(osv.osv):
return result
def onchange_payment_term_date_invoice(self, cr, uid, ids, payment_term_id, date_invoice):
res = {}
if not payment_term_id:
return res
res = {}
if not date_invoice:
date_invoice = time.strftime('%Y-%m-%d')
if not payment_term_id:
return {'value':{'date_due': date_invoice}} #To make sure the invoice has a due date when no payment term
pterm_list = self.pool.get('account.payment.term').compute(cr, uid, payment_term_id, value=1, date_ref=date_invoice)
if pterm_list:
pterm_list = [line[0] for line in pterm_list]
@ -959,11 +972,7 @@ class account_invoice(osv.osv):
date = inv.date_invoice or time.strftime('%Y-%m-%d')
#if the chosen partner is not a company and has a parent company, use the parent for the journal entries
#because you want to invoice 'Agrolait, accounting department' but the journal items are for 'Agrolait'
part = inv.partner_id
if part.parent_id and not part.is_company:
part = part.parent_id
part = self._find_partner(inv)
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x, part.id, date, context=ctx)),iml)
@ -1153,7 +1162,7 @@ class account_invoice(osv.osv):
return map(lambda x: (0,0,x), lines)
def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None):
invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id', 'company_id'])
invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id', 'company_id', 'user_id', 'fiscal_position'])
obj_invoice_line = self.pool.get('account.invoice.line')
obj_invoice_tax = self.pool.get('account.invoice.tax')
obj_journal = self.pool.get('account.journal')
@ -1202,7 +1211,8 @@ class account_invoice(osv.osv):
})
# take the id part of the tuple returned for many2one fields
for field in ('partner_id', 'company_id',
'account_id', 'currency_id', 'payment_term', 'journal_id'):
'account_id', 'currency_id', 'payment_term', 'journal_id',
'user_id', 'fiscal_position'):
invoice[field] = invoice[field] and invoice[field][0]
# create the new invoice
new_ids.append(self.create(cr, uid, invoice))
@ -1423,7 +1433,7 @@ class account_invoice_line(osv.osv):
res['arch'] = etree.tostring(doc)
return res
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
if context is None:
context = {}
company_id = company_id if company_id != None else context.get('company_id',False)
@ -1469,14 +1479,11 @@ class account_invoice_line(osv.osv):
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
result['name'] = res.partner_ref
domain = {}
result['uos_id'] = res.uom_id.id or uom or False
result['uos_id'] = uom_id or res.uom_id.id
if res.description:
result['name'] += '\n'+res.description
if result['uos_id']:
res2 = res.uom_id.category_id.id
if res2:
domain = {'uos_id':[('category_id','=',res2 )]}
domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]}
res_final = {'value':result, 'domain':domain}
@ -1492,10 +1499,10 @@ class account_invoice_line(osv.osv):
new_price = res_final['value']['price_unit'] * currency.rate
res_final['value']['price_unit'] = new_price
if uom:
uom = self.pool.get('product.uom').browse(cr, uid, uom, context=context)
if res.uom_id.category_id.id == uom.category_id.id:
new_price = res_final['value']['price_unit'] * uom.factor_inv
if result['uos_id'] != res.uom_id.id:
selected_uom = self.pool.get('product.uom_id').browse(cr, uid, result['uos_id'], context=context)
if res.uom_id.category_id.id == selected_uom.category_id.id:
new_price = res_final['value']['price_unit'] * uom_id.factor_inv
res_final['value']['price_unit'] = new_price
return res_final
@ -1507,8 +1514,6 @@ class account_invoice_line(osv.osv):
context.update({'company_id': company_id})
warning = {}
res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context)
if 'uos_id' in res['value']:
del res['value']['uos_id']
if not uom:
res['value']['price_unit'] = 0.0
if product and uom:

View File

@ -443,9 +443,9 @@ class account_move_line(osv.osv):
'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1),
'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile'),
'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref'),
'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')),
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount in Currency', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True,
@ -456,7 +456,7 @@ class account_move_line(osv.osv):
store = {
'account.move': (_get_move_lines, ['period_id'], 20)
}),
'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"),
'blocked': fields.boolean('No Follow-up', help="You can check this box to mark this journal item as a litigation with the associated partner"),
'partner_id': fields.many2one('res.partner', 'Partner', select=1, ondelete='restrict'),
'date_maturity': fields.date('Due date', select=True ,help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."),
'date': fields.related('move_id','date', string='Effective date', type='date', required=True, select=True,
@ -475,7 +475,8 @@ class account_move_line(osv.osv):
type='many2one', relation='account.invoice', fnct_search=_invoice_search),
'account_tax_id':fields.many2one('account.tax', 'Tax'),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company',
string='Company', store=True, readonly=True)
}
def _get_date(self, cr, uid, context=None):
@ -671,17 +672,24 @@ class account_move_line(osv.osv):
return {'value':val}
if not date:
date = datetime.now().strftime('%Y-%m-%d')
jt = False
if journal:
jt = journal_obj.browse(cr, uid, journal).type
part = partner_obj.browse(cr, uid, partner_id)
if part.property_payment_term:
res = payment_term_obj.compute(cr, uid, part.property_payment_term.id, 100, date)
payment_term_id = False
if jt and jt in ('purchase', 'purchase_refund') and part.property_supplier_payment_term:
payment_term_id = part.property_supplier_payment_term.id
elif jt and part.property_payment_term:
payment_term_id = part.property_payment_term.id
if payment_term_id:
res = payment_term_obj.compute(cr, uid, payment_term_id, 100, date)
if res:
val['date_maturity'] = res[0][0]
if not account_id:
id1 = part.property_account_payable.id
id2 = part.property_account_receivable.id
if journal:
jt = journal_obj.browse(cr, uid, journal).type
if jt:
if jt in ('sale', 'purchase_refund'):
val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id2)
elif jt in ('purchase', 'sale_refund'):
@ -848,7 +856,12 @@ class account_move_line(osv.osv):
if r[0][1] != None:
raise osv.except_osv(_('Error!'), _('Some entries are already reconciled.'))
if (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \
if context.get('fy_closing'):
# We don't want to generate any write-off when being called from the
# wizard used to close a fiscal year (and it doesn't give us any
# writeoff_acc_id).
pass
elif (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \
(account.currency_id and (not currency_obj.is_zero(cr, uid, account.currency_id, currency))):
if not writeoff_acc_id:
raise osv.except_osv(_('Warning!'), _('You have to provide an account for the write off/exchange difference entry.'))

View File

@ -1105,7 +1105,7 @@
<field name="invoice" invisible="1"/>
<field name="amount_currency" readonly="True" invisible="not context.get('currency',False)"/>
<field name="currency_id" readonly="True" invisible="not context.get('currency',False)" />
<field name="state" />
<field name="state" invisible="1"/>
<field name="company_id" invisible="1"/>
</tree>
</field>
@ -1207,12 +1207,6 @@
</p>
</field>
</record>
<menuitem
name="Journal Items to Reconcile"
action="action_account_manual_reconcile"
id="menu_manual_reconcile_bank"
sequence="20"
parent="account.menu_finance_bank_and_cash"/>
<menuitem
name="Manual Reconciliation"
action="action_account_manual_reconcile"
@ -1428,6 +1422,7 @@
context="{'search_default_journal_id': active_id, 'default_journal_id': active_id}"
res_model="account.move.line"
src_model="account.move"/>
<act_window
domain="[('reconcile_id', '=', active_id)]"
id="act_account_acount_move_line_reconcile_open"
@ -1554,10 +1549,8 @@
<field name="model">account.payment.term.line</field>
<field name="arch" type="xml">
<tree string="Payment Term">
<field name="sequence"/>
<field name="name"/>
<field name="value"/>
<field name="value_amount"/>
<field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/>
<field name="days"/>
<field name="days2"/>
</tree>
@ -1568,37 +1561,20 @@
<field name="model">account.payment.term.line</field>
<field name="arch" type="xml">
<form string="Payment Term" version="7.0">
<group>
<field name="name"/>
<field name="sequence"/>
</group>
<group>
<group string="Amount Computation">
<field name="value"/>
<field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/>
<field name="value"/>
<label for="value_amount" string="Amount To Pay" attrs="{'invisible':[('value','=','balance')]}"/>
<div attrs="{'invisible':[('value','=','balance')]}">
<field name="value_amount" class="oe_inline"/>
<label string="%%" class="oe_inline" attrs="{'invisible':['!',('value','=','procent')]}" />
</div>
</group>
<group string="Due Date Computation">
<field name="days"/>
<field name="days2"/>
</group>
</group>
<separator string="Example"/>
<label string="At 14 net days 2 percent, remaining amount at 30 days end of month."/>
<group>
<label string="Line 1:" colspan="2"/>
<label string=" Valuation: Percent"/>
<label string=" Number of Days: 14"/>
<label string=" Value amount: 0.02"/>
<label string=" Day of the Month: 0"/>
</group>
<group>
<label string="Line 2:" colspan="2"/>
<label string=" Valuation: Balance"/>
<label string=" Number of Days: 30"/>
<label string=" Value amount: n.a"/>
<label string=" Day of the Month= -1"/>
</group>
</form>
</field>
</record>
@ -1621,7 +1597,7 @@
<field name="name"/>
<field name="active"/>
</group>
<field name="note" placeholder="Note for the invoice..."/>
<field name="note" placeholder="Payment term explanation for the customer..."/>
<separator string="Computation"/>
<field name="line_ids"/>
</form>

View File

@ -10,17 +10,33 @@
<!--
Payment term
-->
<record id="account_payment_term" model="account.payment.term">
<field name="name">30 Days End of Month</field>
<field name="note">30 Days End of Month</field>
<record id="account_payment_term_immediate" model="account.payment.term">
<field name="name">Immediate Payment</field>
<field name="note">Immediate Payment</field>
</record>
<record id="account_payment_term_line" model="account.payment.term.line">
<field name="name">30 Days End of Month</field>
<record id="account_payment_term_line_immediate" model="account.payment.term.line">
<field name="name">Immediate Payment</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="-1" name="days2"/>
<field eval="account_payment_term" name="payment_id"/>
<field eval="0" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_immediate" name="payment_id"/>
</record>
<record id="account_payment_term_15days" model="account.payment.term">
<field name="name">15 Days</field>
<field name="note">15 Days</field>
</record>
<record id="account_payment_term_line_15days" model="account.payment.term.line">
<field name="name">15 Days</field>
<field name="value">balance</field>
<field eval="15" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_15days" name="payment_id"/>
</record>
<record forcecreate="True" id="decimal_payment" model="decimal.precision">
<field name="name">Payment Term</field>
<field name="digits">6</field>
@ -30,6 +46,7 @@
<field name="name">30 Net Days</field>
<field name="note">30 Net Days</field>
</record>
<record id="account_payment_term_line_net" model="account.payment.term.line">
<field name="name">30 Net Days</field>
<field name="value">balance</field>
@ -37,28 +54,7 @@
<field eval="0" name="days2"/>
<field eval="account_payment_term_net" name="payment_id"/>
</record>
<record id="account_payment_term_advance" model="account.payment.term">
<field name="name">30% Advance End 30 Days</field>
<field name="note">30% Advance End 30 Days</field>
</record>
<record id="account_payment_term_line_advance1" model="account.payment.term.line">
<field name="name">30% Advance</field>
<field name="value">procent</field>
<field eval="3" name="sequence"/>
<field eval="0.300000" name="value_amount"/>
<field eval="0" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<record id="account_payment_term_line_advance2" model="account.payment.term.line">
<field name="name">Remaining Balance</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="-1" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<!--
Account Journal Sequences
-->

View File

@ -127,9 +127,60 @@
<field eval="time.strftime('%Y')+'-12-31'" name="date_stop"/>
<field name="company_id" ref="base.main_company"/>
</record>
<!-- Payment Term -->
<record id="account_payment_term" model="account.payment.term">
<field name="name">30 Days End of Month</field>
<field name="note">30 Days End of Month</field>
</record>
<record id="account_payment_term_line" model="account.payment.term.line">
<field name="name">30 Days End of Month</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="-1" name="days2"/>
<field eval="account_payment_term" name="payment_id"/>
</record>
<record id="account_payment_term_advance" model="account.payment.term">
<field name="name">30% Advance End 30 Days</field>
<field name="note">30% Advance End 30 Days</field>
</record>
<record id="account_payment_term_line_advance1" model="account.payment.term.line">
<field name="name">30% Advance</field>
<field name="value">procent</field>
<field eval="3" name="sequence"/>
<field eval="0.300000" name="value_amount"/>
<field eval="0" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<record id="account_payment_term_line_advance2" model="account.payment.term.line">
<field name="name">Remaining Balance</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="-1" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<record id="base.user_demo" model="res.users">
<field name="groups_id" eval="[(4,ref('account.group_account_user'))]"/>
</record>
<!-- Add payment term on some demo partners -->
<record id="base.res_partner_2" model="res.partner">
<field name="property_payment_term" ref="account_payment_term_net"/>
</record>
<record id="base.res_partner_12" model="res.partner">
<field name="property_payment_term" ref="account_payment_term"/>
<field name="property_supplier_payment_term" ref="account_payment_term"/>
</record>
<record id="base.res_partner_4" model="res.partner">
<field name="property_supplier_payment_term" ref="account_payment_term_net"/>
</record>
<record id="base.res_partner_1" model="res.partner">
<field name="property_supplier_payment_term" ref="account_payment_term"/>
</record>
</data>
</openerp>

View File

@ -29,8 +29,9 @@
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="account_invoices"/>
<field name="report_name">Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p>Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},</p>
@ -49,7 +50,7 @@
% endif
</p>
% if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'):
% if object.company_id.paypal_account and object.type in ('out_invoice'):
<%
comp_name = quote(object.company_id.name)
inv_number = quote(object.number)
@ -73,7 +74,7 @@
<br/>
<br/>
<div style="width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;">
<h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #FFF;">
<h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;">
<strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3>
</div>
<div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -134,18 +134,23 @@ class res_partner(osv.osv):
return []
having_values = tuple(map(itemgetter(2), args))
where = ' AND '.join(
map(lambda x: '(SUM(debit-credit) %(operator)s %%s)' % {
map(lambda x: '(SUM(bal2) %(operator)s %%s)' % {
'operator':x[1]},args))
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
cr.execute(('SELECT partner_id FROM account_move_line l '\
'WHERE account_id IN '\
'(SELECT id FROM account_account '\
'WHERE type=%s AND active) '\
'AND reconcile_id IS NULL '\
'AND '+query+' '\
'AND partner_id IS NOT NULL '\
'GROUP BY partner_id HAVING '+where),
(type,) + having_values)
cr.execute(('SELECT pid AS partner_id, SUM(bal2) FROM ' \
'(SELECT CASE WHEN bal IS NOT NULL THEN bal ' \
'ELSE 0.0 END AS bal2, p.id as pid FROM ' \
'(SELECT (debit-credit) AS bal, partner_id ' \
'FROM account_move_line l ' \
'WHERE account_id IN ' \
'(SELECT id FROM account_account '\
'WHERE type=%s AND active) ' \
'AND reconcile_id IS NULL ' \
'AND '+query+') AS l ' \
'RIGHT JOIN res_partner p ' \
'ON p.id = partner_id ) AS pl ' \
'GROUP BY pid HAVING ' + where),
(type,) + having_values)
res = cr.fetchall()
if not res:
return [('id','=','0')]
@ -215,9 +220,16 @@ class res_partner(osv.osv):
'account.payment.term',
type='many2one',
relation='account.payment.term',
string ='Payment Term',
string ='Customer Payment Term',
view_load=True,
help="This payment term will be used instead of the default one for the current partner"),
help="This payment term will be used instead of the default one for sale orders and customer invoices"),
'property_supplier_payment_term': fields.property(
'account.payment.term',
type='many2one',
relation='account.payment.term',
string ='Supplier Payment Term',
view_load=True,
help="This payment term will be used instead of the default one for purchase orders and supplier invoices"),
'ref_companies': fields.one2many('res.company', 'partner_id',
'Companies that refers to partner'),
'last_reconciliation_date': fields.datetime('Latest Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the date of the last reconciliation made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 ways: either the last debit/credit entry was reconciled, either the user pressed the button "Fully Reconciled" in the manual reconciliation process')

View File

@ -89,6 +89,7 @@
</group>
<group>
<field name="property_account_payable" groups="account.group_account_invoice"/>
<field name="property_supplier_payment_term" widget="selection"/>
<field name="debit"/>
</group>
</group>

View File

@ -4,6 +4,7 @@
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">product.normal.form.inherit</field>
<field name="model">product.product</field>
<field name="priority">5</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<notebook position="inside">

View File

@ -10,10 +10,10 @@
<tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts">
<field name="complete_name"/>
<field name="code"/>
<field name="quantity"/>
<field name="date"/>
<field name="date_start" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="manager_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="state" invisible="1"/>
@ -33,6 +33,7 @@
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
<filter icon="terp-camera_test" string="Current" domain="[('state','=','open')]" help="Current Accounts"/>
<field name="partner_id"/>
<field name="manager_id"/>
<field name="user_id"/>
<group expand="0" string="Group By...">
<filter string="Associated Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>

View File

@ -56,7 +56,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
for report in self.pool.get('account.financial.report').browse(self.cr, self.uid, ids2, context=data['form']['used_context']):
vals = {
'name': report.name,
'balance': report.balance,
'balance': report.balance * report.sign,
'type': 'report',
'level': bool(report.style_overwrite) and report.style_overwrite or report.level,
'account_type': report.type =='sum' and 'view' or False, #used to underline the financial report balances

View File

@ -211,7 +211,7 @@
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ time.strftime('%Y-%m-%d') &gt; formatLang((line['date_maturity'])) and formatLang(line['debit'] - line['credit'], currency_obj = company.currency_id) ]]</para>
<para style="terp_default_Right_9">[[ (time.strftime('%Y-%m-%d') &gt; line['date_maturity']) and formatLang(line['debit'] - line['credit'], currency_obj = company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para>

View File

@ -48,6 +48,7 @@ class report_account_receivable(osv.osv):
_order = 'name desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_account_receivable')
cr.execute("""
create or replace view report_account_receivable as (
select
@ -183,6 +184,7 @@ class report_invoice_created(osv.osv):
_order = 'create_date'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_invoice_created')
cr.execute("""create or replace view report_invoice_created as (
select
inv.id as id, inv.name as name, inv.type as type,

View File

@ -36,7 +36,7 @@ class account_invoice_refund(osv.osv_memory):
'period': fields.many2one('account.period', 'Force period'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the credit note that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
'description': fields.char('Reason', size=128, required=True),
'filter_refund': fields.selection([('refund', 'Create a draft credit note'), ('cancel', 'Cancel: create credit note and reconcile'),('modify', 'Modify: create credit note, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Credit note base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
'filter_refund': fields.selection([('refund', 'Create a draft refund'), ('cancel', 'Cancel: create refund and reconcile'),('modify', 'Modify: create refund, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Refund base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
}
def _get_journal(self, cr, uid, context=None):

View File

@ -40,7 +40,7 @@
</group>
</group>
<footer>
<button string='Create Credit Note' name="invoice_refund" type="object" class="oe_highlight"/>
<button string='Create Refund' name="invoice_refund" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>

View File

@ -24,6 +24,7 @@ from lxml import etree
from osv import fields, osv
from tools.translate import _
from openerp.osv.orm import setup_modifiers
class account_common_report(osv.osv_memory):
_name = "account.common.report"
@ -67,16 +68,16 @@ class account_common_report(osv.osv_memory):
(_check_company_id, 'The fiscalyear, periods or chart of account chosen have to belong to the same company.', ['chart_account_id','fiscalyear_id','period_from','period_to']),
]
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if context is None:context = {}
res = super(account_common_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
if context.get('active_model', False) == 'account.account' and view_id:
if context.get('active_model', False) == 'account.account':
doc = etree.XML(res['arch'])
nodes = doc.xpath("//field[@name='chart_account_id']")
for node in nodes:
node.set('readonly', '1')
node.set('help', 'If you print the report from Account list/form view it will not consider Charts of account')
setup_modifiers(node, res['fields']['chart_account_id'])
res['arch'] = etree.tostring(doc)
return res
@ -121,8 +122,8 @@ class account_common_report(osv.osv_memory):
now = time.strftime('%Y-%m-%d')
company_id = False
ids = context.get('active_ids', [])
if ids:
company_id = self.browse(cr, uid, ids[0], context=context).company_id.id
if ids and context.get('active_model') == 'account.account':
company_id = self.pool.get('account.account').browse(cr, uid, ids[0], context=context).company_id.id
fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now), ('company_id', '=', company_id)], limit=1)
return fiscalyears and fiscalyears[0] or False

View File

@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-24 02:51+0000\n"
"PO-Revision-Date: 2011-01-18 21:27+0000\n"
"Last-Translator: bamuhrez <bamuhrez@gmail.com>\n"
"PO-Revision-Date: 2012-12-01 17:31+0000\n"
"Last-Translator: gehad shaat <gehad.shaath@gmail.com>\n"
"Language-Team: Arabic <ar@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: 2012-11-25 06:28+0000\n"
"X-Generator: Launchpad (build 16293)\n"
"X-Launchpad-Export-Date: 2012-12-02 04:38+0000\n"
"X-Generator: Launchpad (build 16319)\n"
#. module: account_accountant
#: model:ir.actions.client,name:account_accountant.action_client_account_menu
msgid "Open Accounting Menu"
msgstr ""
msgstr "افتح قائمة المحاسبة"
#~ msgid "Accountant"
#~ msgstr "محاسب"

View File

@ -8,20 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-24 02:51+0000\n"
"PO-Revision-Date: 2010-12-25 19:02+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\n"
"PO-Revision-Date: 2012-12-04 07:23+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"Language-Team: German <de@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: 2012-11-25 06:28+0000\n"
"X-Generator: Launchpad (build 16293)\n"
"X-Launchpad-Export-Date: 2012-12-05 05:20+0000\n"
"X-Generator: Launchpad (build 16335)\n"
#. module: account_accountant
#: model:ir.actions.client,name:account_accountant.action_client_account_menu
msgid "Open Accounting Menu"
msgstr ""
msgstr "Öffne Finanz Menü"
#~ msgid "Accountant"
#~ msgstr "Finanzbuchhaltung Administrator"

View File

@ -8,20 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-24 02:51+0000\n"
"PO-Revision-Date: 2010-12-26 08:18+0000\n"
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
"<jesteve@zikzakmedia.com>\n"
"PO-Revision-Date: 2012-12-05 19:57+0000\n"
"Last-Translator: Santi (Pexego) <santiago@pexego.es>\n"
"Language-Team: Spanish <es@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: 2012-11-25 06:28+0000\n"
"X-Generator: Launchpad (build 16293)\n"
"X-Launchpad-Export-Date: 2012-12-06 04:41+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_accountant
#: model:ir.actions.client,name:account_accountant.action_client_account_menu
msgid "Open Accounting Menu"
msgstr ""
msgstr "Abrir menú de contabilidad"
#~ msgid "Accountant"
#~ msgstr "Contable"

View File

@ -8,19 +8,20 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-24 02:51+0000\n"
"PO-Revision-Date: 2011-01-13 13:03+0000\n"
"Last-Translator: Jonathan Liuti <Unknown>\n"
"PO-Revision-Date: 2012-12-03 20:18+0000\n"
"Last-Translator: Frederic Clementi - Camptocamp.com "
"<frederic.clementi@camptocamp.com>\n"
"Language-Team: French <fr@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: 2012-11-25 06:28+0000\n"
"X-Generator: Launchpad (build 16293)\n"
"X-Launchpad-Export-Date: 2012-12-04 05:51+0000\n"
"X-Generator: Launchpad (build 16335)\n"
#. module: account_accountant
#: model:ir.actions.client,name:account_accountant.action_client_account_menu
msgid "Open Accounting Menu"
msgstr ""
msgstr "Ouvrez the menu Comptabilité"
#~ msgid "Accountant"
#~ msgstr "Comptable"

View File

@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-24 02:51+0000\n"
"PO-Revision-Date: 2011-01-17 00:02+0000\n"
"PO-Revision-Date: 2012-12-09 19:38+0000\n"
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
"Language-Team: Croatian <hr@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: 2012-11-25 06:28+0000\n"
"X-Generator: Launchpad (build 16293)\n"
"X-Launchpad-Export-Date: 2012-12-10 04:39+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_accountant
#: model:ir.actions.client,name:account_accountant.action_client_account_menu
msgid "Open Accounting Menu"
msgstr ""
msgstr "Otvori izbornik računovodstvo"
#~ msgid ""
#~ "\n"

View File

@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-24 02:51+0000\n"
"PO-Revision-Date: 2011-01-13 19:55+0000\n"
"Last-Translator: Emerson <Unknown>\n"
"PO-Revision-Date: 2012-12-10 13:15+0000\n"
"Last-Translator: Projetaty Soluções OpenSource <Unknown>\n"
"Language-Team: Brazilian Portuguese <pt_BR@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: 2012-11-25 06:28+0000\n"
"X-Generator: Launchpad (build 16293)\n"
"X-Launchpad-Export-Date: 2012-12-11 04:49+0000\n"
"X-Generator: Launchpad (build 16356)\n"
#. module: account_accountant
#: model:ir.actions.client,name:account_accountant.action_client_account_menu
msgid "Open Accounting Menu"
msgstr ""
msgstr "Menu Contabilidade em Aberto"
#~ msgid "Accountant"
#~ msgstr "Contador"

View File

@ -45,7 +45,7 @@ Adds menu to show relevant information to each manager.You can also view the rep
'css': [
'static/src/css/analytic.css'
],
'demo': [],
'demo': ['analytic_account_demo.xml'],
'installable': True,
'auto_install': False,
}

View File

@ -8,7 +8,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('invoice_id','=',False)]</field>
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="context">{'search_default_to_invoice': 1, 'search_default_sales': 1}</field>
<field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
<field name="help" type="html">
<p>
@ -30,22 +30,21 @@
<field name="date"/>
<filter icon="terp-camera_test" name="open" string="Open" domain="[('state','in',('open','draft'))]" help="Contracts in progress"/>
<filter icon="terp-gtk-media-pause" name="pending" string="Pending" domain="[('state','=','pending')]" help="Pending contracts to renew with your customer"/>
<separator/>
<filter icon="terp-go-today" string="To Renew" domain="['|', '&amp;', ('date', '!=', False), ('date', '&lt;=', time.strftime('%%Y-%%m-%%d')), ('is_overdue_quantity', '=', True)]" name="renew"
help="The contracts to be renewed because the deadline is passed or the working hours are higher than the allocated hours" />
<separator/>
<filter string="Contracts Having a Partner" help="A contract in OpenERP is an analytic account having a partner set on it." name="has_partner" domain="[('partner_id', '!=', False)]" icon="terp-partner" />
<filter string="Customer Contracts" help="A contract in OpenERP is an analytic account having a partner set on it." name="has_partner" domain="[('partner_id', '!=', False)]" icon="terp-partner" />
<separator/>
<filter string="Contracts not assigned" help="Contracts that are not assigned to an account manager." domain="[('user_id', '=', False)]" icon="terp-personal-" />
<filter string="Contracts not assigned" help="Contracts that are not assigned to an account manager." domain="[('manager_id', '=', False)]" icon="terp-personal-" />
<field name="partner_id"/>
<field name="user_id"/>
<field name="manager_id"/>
<group expand="0" string="Group By...">
<filter string="Status" icon="terp-personal" domain="[]" context="{'group_by':'state'}"/>
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Parent" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Start Date" icon="terp-go-month" domain="[]" context="{'group_by' : 'date_start'}" />
<filter string="End Date" icon="terp-go-month" domain="[]" context="{'group_by' : 'date'}" />
<filter string="Status" domain="[]" context="{'group_by':'state'}"/>
<filter string="Account Manager" domain="[]" context="{'group_by':'manager_id'}"/>
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Parent" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Start Date" domain="[]" context="{'group_by' : 'date_start'}" />
<filter string="End Date" domain="[]" context="{'group_by' : 'date'}" />
</group>
</search>
</field>
@ -57,7 +56,7 @@
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_user_id':uid, 'search_default_draft':1, 'search_default_pending':1, 'search_default_open':1, 'search_default_renew':1}</field>
<field name="context">{'search_default_manager_id':uid, 'search_default_pending':1, 'search_default_renew':1}</field>
<field name="domain">[('type','=','contract')]</field>
<field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
<field name="help" type="html">
@ -81,7 +80,7 @@
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'default_type':'contract', 'search_default_open':1, 'search_default_pending':1}</field>
<field name="context">{'default_type':'contract', 'search_default_open':1, 'search_default_pending':1, 'default_manager_id':uid}</field>
<field name="domain">[('type','=','contract')]</field>
<field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
<field name="help" type="html">

Some files were not shown because too many files have changed in this diff Show More