@@ -77,7 +77,10 @@ class account_payment_term_line(osv.osv):
|
||||
_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')], 'Value',required=True),
|
||||
'value': fields.selection([('procent', 'Percent'), ('balance', 'Balance'), ('fixed', 'Fixed Amount')], 'Value', required=True, help="""Example: 14 days 2%, 30 days net
|
||||
1. Line 1: percent 0.02 14 days
|
||||
2. Line 2: balance 30 days"""),
|
||||
|
||||
'value_amount': fields.float('Value Amount', help="For Value percent enter % ratio between 0-1."),
|
||||
'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \
|
||||
"If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),
|
||||
@@ -90,6 +93,17 @@ class account_payment_term_line(osv.osv):
|
||||
'days2': lambda *a: 0,
|
||||
}
|
||||
_order = "sequence"
|
||||
|
||||
def _check_percent(self, cr, uid, ids, context={}):
|
||||
obj = self.browse(cr, uid, ids[0])
|
||||
if obj.value == 'procent' and ( obj.value_amount < 0.0 or obj.value_amount > 1.0):
|
||||
return False
|
||||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_percent, _('Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% '), ['value_amount']),
|
||||
]
|
||||
|
||||
account_payment_term_line()
|
||||
|
||||
|
||||
@@ -892,7 +906,10 @@ class account_move(osv.osv):
|
||||
amount+= (line.debit - line.credit)
|
||||
return amount
|
||||
|
||||
def _centralise(self, cr, uid, move, mode):
|
||||
def _centralise(self, cr, uid, move, mode, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
if mode=='credit':
|
||||
account_id = move.journal_id.default_debit_account_id.id
|
||||
mode2 = 'debit'
|
||||
@@ -915,8 +932,9 @@ class account_move(osv.osv):
|
||||
if res:
|
||||
line_id = res[0]
|
||||
else:
|
||||
context.update({'journal_id': move.journal_id.id, 'period_id': move.period_id.id})
|
||||
line_id = self.pool.get('account.move.line').create(cr, uid, {
|
||||
'name': 'Centralisation '+mode,
|
||||
'name': _t(cr, None, 'selection', context.get('lang'), source=(mode.capitalize()+' Centralisation')) or (mode.capitalize()+' Centralisation'),
|
||||
'centralisation': mode,
|
||||
'account_id': account_id,
|
||||
'move_id': move.id,
|
||||
@@ -925,7 +943,7 @@ class account_move(osv.osv):
|
||||
'date': move.period_id.date_stop,
|
||||
'debit': 0.0,
|
||||
'credit': 0.0,
|
||||
}, {'journal_id': move.journal_id.id, 'period_id': move.period_id.id})
|
||||
}, context)
|
||||
|
||||
# find the first line of this move with the other mode
|
||||
# so that we can exclude it from our calculation
|
||||
@@ -1007,8 +1025,8 @@ class account_move(osv.osv):
|
||||
#
|
||||
continue
|
||||
if journal.centralisation:
|
||||
self._centralise(cr, uid, move, 'debit')
|
||||
self._centralise(cr, uid, move, 'credit')
|
||||
self._centralise(cr, uid, move, 'debit', context=context)
|
||||
self._centralise(cr, uid, move, 'credit', context=context)
|
||||
self.pool.get('account.move.line').write(cr, uid, line_draft_ids, {
|
||||
'state': 'valid'
|
||||
}, context, check=False)
|
||||
|
||||
@@ -170,7 +170,9 @@ class account_bank_statement(osv.osv):
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The account entries lines are not in valid state.'))
|
||||
|
||||
# for bank.statement.lines
|
||||
# In line we get reconcile_id on bank.ste.rec.
|
||||
# in bank stat.rec we get line_new_ids on bank.stat.rec.line
|
||||
for move in st.line_ids:
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
'journal_id': st.journal_id.id,
|
||||
@@ -209,7 +211,7 @@ class account_bank_statement(osv.osv):
|
||||
'period_id': st.period_id.id,
|
||||
'currency_id': st.currency.id,
|
||||
}
|
||||
|
||||
|
||||
amount = res_currency_obj.compute(cr, uid, st.currency.id,
|
||||
company_currency_id, move.amount, context=context,
|
||||
account=acc_cur)
|
||||
@@ -245,6 +247,7 @@ class account_bank_statement(osv.osv):
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
|
||||
}, context=context)
|
||||
|
||||
# Fill the secondary amount/currency
|
||||
@@ -491,11 +494,14 @@ class account_bank_statement_reconcile_line(osv.osv):
|
||||
_name = "account.bank.statement.reconcile.line"
|
||||
_description = "Statement reconcile line"
|
||||
_columns = {
|
||||
'name': fields.char('Description', size=64),
|
||||
'name': fields.char('Description', size=64, required=True),
|
||||
'account_id': fields.many2one('account.account', 'Account', required=True),
|
||||
'line_id': fields.many2one('account.bank.statement.reconcile', 'Reconcile'),
|
||||
'amount': fields.float('Amount', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda *a: 'Write-Off',
|
||||
}
|
||||
account_bank_statement_reconcile_line()
|
||||
|
||||
|
||||
@@ -568,7 +574,7 @@ class account_bank_statement_line(osv.osv):
|
||||
'account_id': fields.many2one('account.account','Account',
|
||||
required=True),
|
||||
'statement_id': fields.many2one('account.bank.statement', 'Statement',
|
||||
select=True, required=True),
|
||||
select=True, required=True, ondelete='cascade'),
|
||||
'reconcile_id': fields.many2one('account.bank.statement.reconcile',
|
||||
'Reconcile', states={'confirm':[('readonly',True)]}),
|
||||
'move_ids': fields.many2many('account.move',
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
<field name="date_invoice"/>
|
||||
<field name="period_id"/>
|
||||
<label align="0.0" colspan="2" string="(keep empty to use the current period)"/>
|
||||
<separator colspan="4" string="Additionnal Information"/>
|
||||
<separator colspan="4" string="Additional Information"/>
|
||||
<field colspan="4" name="comment" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Payments">
|
||||
@@ -401,6 +401,20 @@
|
||||
<field name="domain">[('type','=','out_refund')]</field>
|
||||
<field name="context">{'type':'out_refund'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_invoice_tree3_view1" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="act_window_id" ref="action_invoice_tree3"/>
|
||||
</record>
|
||||
|
||||
<record id="action_invoice_tree3_view2" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="invoice_form"/>
|
||||
<field name="act_window_id" ref="action_invoice_tree3"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_invoice_tree3" id="menu_action_invoice_tree3" parent="account.menu_finance_invoice"/>
|
||||
|
||||
<record id="action_invoice_tree3_new" model="ir.actions.act_window">
|
||||
|
||||
@@ -104,9 +104,10 @@ class account_move_line(osv.osv):
|
||||
|
||||
total_new=0.00
|
||||
for i in context['lines']:
|
||||
total_new +=(i[2]['debit'] or 0.00)- (i[2]['credit'] or 0.00)
|
||||
for item in i[2]:
|
||||
data[item]=i[2][item]
|
||||
if i[2]:
|
||||
total_new +=(i[2]['debit'] or 0.00)- (i[2]['credit'] or 0.00)
|
||||
for item in i[2]:
|
||||
data[item]=i[2][item]
|
||||
if context['journal']:
|
||||
journal_obj=self.pool.get('account.journal').browse(cr,uid,context['journal'])
|
||||
if journal_obj.type == 'purchase':
|
||||
@@ -616,6 +617,7 @@ class account_move_line(osv.osv):
|
||||
'debit':debit,
|
||||
'credit':credit,
|
||||
'account_id':writeoff_acc_id,
|
||||
'analytic_account_id': context.get('analytic_id', False),
|
||||
'date':date,
|
||||
'partner_id':partner_id
|
||||
})
|
||||
@@ -624,7 +626,7 @@ class account_move_line(osv.osv):
|
||||
writeoff_move_id = self.pool.get('account.move').create(cr, uid, {
|
||||
'period_id': writeoff_period_id,
|
||||
'journal_id': writeoff_journal_id,
|
||||
|
||||
'date':date,
|
||||
'state': 'draft',
|
||||
'line_id': writeoff_lines
|
||||
})
|
||||
@@ -869,7 +871,7 @@ class account_move_line(osv.osv):
|
||||
'amount': vals['debit'] or vals['credit'],
|
||||
'general_account_id': vals['account_id'],
|
||||
'journal_id': journal.analytic_journal_id.id,
|
||||
'ref': vals['ref'],
|
||||
'ref': vals.get('ref', False),
|
||||
})]
|
||||
#else:
|
||||
# raise osv.except_osv(_('No analytic journal !'), _('Please set an analytic journal on this financial journal !'))
|
||||
|
||||
@@ -1352,7 +1352,7 @@
|
||||
</record>
|
||||
|
||||
<record id="action_tax_code_line_open" model="ir.actions.act_window">
|
||||
<field name="name">account.move.line</field>
|
||||
<field name="name">Account Entry Lines</field>
|
||||
<field name="res_model">account.move.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
||||
+58
-11
@@ -103,15 +103,44 @@ class account_invoice(osv.osv):
|
||||
def _amount_residual(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
data_inv = self.browse(cr, uid, ids)
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
for inv in data_inv:
|
||||
paid_amt = 0.0
|
||||
to_pay = inv.amount_total
|
||||
debit = credit = 0.0
|
||||
context.update({'date':inv.date_invoice})
|
||||
context_unreconciled=context.copy()
|
||||
for lines in inv.move_lines:
|
||||
if lines.amount_currency and lines.currency_id:
|
||||
paid_amt += lines.amount_currency
|
||||
debit_tmp = lines.debit
|
||||
credit_tmp = lines.credit
|
||||
# If currency conversion needed
|
||||
if inv.company_id.currency_id.id <> inv.currency_id.id:
|
||||
# If invoice paid, compute currency amount according to invoice date
|
||||
# otherwise, take the line date
|
||||
if not inv.reconciled:
|
||||
context.update({'date':lines.date})
|
||||
context_unreconciled.update({'date':lines.date})
|
||||
# If amount currency setted, compute for debit and credit in company currency
|
||||
if lines.amount_currency < 0:
|
||||
credit_tmp=abs(cur_obj.compute(cr, uid, lines.currency_id.id, inv.company_id.currency_id.id, lines.amount_currency, round=False,context=context_unreconciled))
|
||||
elif lines.amount_currency > 0:
|
||||
debit_tmp=abs(cur_obj.compute(cr, uid, lines.currency_id.id, inv.company_id.currency_id.id, lines.amount_currency, round=False,context=context_unreconciled))
|
||||
# Then, recomput into invoice currency to avoid rounding trouble !
|
||||
debit += cur_obj.compute(cr, uid, inv.company_id.currency_id.id, inv.currency_id.id, debit_tmp, round=False,context=context)
|
||||
credit += cur_obj.compute(cr, uid, inv.company_id.currency_id.id, inv.currency_id.id, credit_tmp, round=False,context=context)
|
||||
else:
|
||||
paid_amt += lines.credit + lines.debit
|
||||
res[inv.id] = round(to_pay - abs(paid_amt),int(config['price_accuracy']))
|
||||
debit+=debit_tmp
|
||||
credit+=credit_tmp
|
||||
|
||||
if not inv.amount_total:
|
||||
result = 0.0
|
||||
elif inv.type in ('out_invoice','in_refund'):
|
||||
amount = credit-debit
|
||||
result = inv.amount_total - amount
|
||||
else:
|
||||
amount = debit-credit
|
||||
result = inv.amount_total - amount
|
||||
# Use is_zero function to avoid rounding trouble => should be fixed into ORM
|
||||
res[inv.id] = not self.pool.get('res.currency').is_zero(cr, uid, inv.company_id.currency_id,result) and result or 0.0
|
||||
|
||||
return res
|
||||
|
||||
def _get_lines(self, cr, uid, ids, name, arg, context=None):
|
||||
@@ -290,6 +319,7 @@ class account_invoice(osv.osv):
|
||||
self.pool.get('res.users').browse(cr, uid, uid,
|
||||
context=context).company_id.id,
|
||||
'reference_type': lambda *a: 'none',
|
||||
'check_total': lambda *a: 0.0,
|
||||
}
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
@@ -649,7 +679,7 @@ class account_invoice(osv.osv):
|
||||
for i in line:
|
||||
i[2]['period_id'] = period_id
|
||||
|
||||
move_id = self.pool.get('account.move').create(cr, uid, move)
|
||||
move_id = self.pool.get('account.move').create(cr, uid, move, context=context)
|
||||
new_move_name = self.pool.get('account.move').browse(cr, uid, move_id).name
|
||||
# make the invoice point to that move
|
||||
self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name})
|
||||
@@ -861,6 +891,16 @@ class account_invoice(osv.osv):
|
||||
date=context['date_p']
|
||||
else:
|
||||
date=time.strftime('%Y-%m-%d')
|
||||
|
||||
# Take the amount in currency and the currency of the payment
|
||||
if 'amount_currency' in context and context['amount_currency'] and 'currency_id' in context and context['currency_id']:
|
||||
amount_currency = context['amount_currency']
|
||||
currency_id = context['currency_id']
|
||||
else:
|
||||
amount_currency = False
|
||||
currency_id = False
|
||||
|
||||
# Pay attention to the sign for both debit/credit AND amount_currency
|
||||
l1 = {
|
||||
'debit': direction * pay_amount>0 and direction * pay_amount,
|
||||
'credit': direction * pay_amount<0 and - direction * pay_amount,
|
||||
@@ -868,6 +908,8 @@ class account_invoice(osv.osv):
|
||||
'partner_id': invoice.partner_id.id,
|
||||
'ref':invoice.number,
|
||||
'date': date,
|
||||
'currency_id':currency_id,
|
||||
'amount_currency':amount_currency and direction * amount_currency or 0.0,
|
||||
}
|
||||
l2 = {
|
||||
'debit': direction * pay_amount<0 and - direction * pay_amount,
|
||||
@@ -876,6 +918,8 @@ class account_invoice(osv.osv):
|
||||
'partner_id': invoice.partner_id.id,
|
||||
'ref':invoice.number,
|
||||
'date': date,
|
||||
'currency_id':currency_id,
|
||||
'amount_currency':amount_currency and - direction * amount_currency or 0.0,
|
||||
}
|
||||
|
||||
if not name:
|
||||
@@ -1110,24 +1154,27 @@ class account_invoice_tax(osv.osv):
|
||||
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
|
||||
'tax_amount': fields.float('Tax Code Amount', digits=(16,int(config['price_accuracy']))),
|
||||
}
|
||||
|
||||
def base_change(self, cr, uid, ids, base,currency_id=False,company_id=False,date_invoice=False):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
company_obj = self.pool.get('res.company')
|
||||
company_currency=False
|
||||
if company_id:
|
||||
company_currency=company_obj.browse(cr,uid,company_id).id
|
||||
company_currency = company_obj.read(cr,uid,[company_id],['currency_id'])[0]['currency_id'][0]
|
||||
if currency_id and company_currency:
|
||||
base=cur_obj.compute(cr, uid, currency_id, company_currency, base, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
|
||||
base = cur_obj.compute(cr, uid, currency_id, company_currency, base, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
|
||||
return {'value': {'base_amount':base}}
|
||||
|
||||
def amount_change(self, cr, uid, ids, amount,currency_id=False,company_id=False,date_invoice=False):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
company_obj = self.pool.get('res.company')
|
||||
company_currency=False
|
||||
if company_id:
|
||||
company_currency=company_obj.browse(cr,uid,company_id).id
|
||||
company_currency = company_obj.read(cr,uid,[company_id],['currency_id'])[0]['currency_id'][0]
|
||||
if currency_id and company_currency:
|
||||
amount=cur_obj.compute(cr, uid, currency_id, company_currency, amount, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
|
||||
amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
|
||||
return {'value': {'tax_amount':amount}}
|
||||
|
||||
_order = 'sequence'
|
||||
_defaults = {
|
||||
'manual': lambda *a: 1,
|
||||
|
||||
@@ -66,9 +66,16 @@ class account_analytic_account(osv.osv):
|
||||
return r
|
||||
|
||||
def _balance_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
res = {}
|
||||
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
|
||||
acc_set = ",".join(map(str, ids2))
|
||||
|
||||
for i in ids:
|
||||
res.setdefault(i,0.0)
|
||||
|
||||
if not acc_set:
|
||||
return res
|
||||
|
||||
where_date = ''
|
||||
if context.get('from_date',False):
|
||||
where_date += " AND l.date >= '" + context['from_date'] + "'"
|
||||
@@ -76,7 +83,7 @@ class account_analytic_account(osv.osv):
|
||||
where_date += " AND l.date <= '" + context['to_date'] + "'"
|
||||
|
||||
cr.execute("SELECT a.id, COALESCE(SUM(l.amount),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id %s) WHERE a.id IN (%s) GROUP BY a.id" % (where_date,acc_set))
|
||||
res = {}
|
||||
|
||||
for account_id, sum in cr.fetchall():
|
||||
res[account_id] = sum
|
||||
|
||||
@@ -86,10 +93,12 @@ class account_analytic_account(osv.osv):
|
||||
|
||||
res_currency= self.pool.get('res.currency')
|
||||
for id in ids:
|
||||
if id not in ids2:
|
||||
continue
|
||||
for child in self.search(cr, uid, [('parent_id', 'child_of', [id])]):
|
||||
if child <> id:
|
||||
res.setdefault(id, 0.0)
|
||||
if currency[child]<>currency[id] :
|
||||
if currency[child]<>currency[id]:
|
||||
res[id] += res_currency.compute(cr, uid, currency[child], currency[id], res.get(child, 0.0), context=context)
|
||||
else:
|
||||
res[id] += res.get(child, 0.0)
|
||||
@@ -97,15 +106,23 @@ class account_analytic_account(osv.osv):
|
||||
cur_obj = res_currency.browse(cr,uid,currency.values(),context)
|
||||
cur_obj = dict([(o.id, o) for o in cur_obj])
|
||||
for id in ids:
|
||||
res[id] = res_currency.round(cr,uid,cur_obj[currency[id]],res.get(id,0.0))
|
||||
if id in ids2:
|
||||
res[id] = res_currency.round(cr,uid,cur_obj[currency[id]],res.get(id,0.0))
|
||||
|
||||
return dict([(i, res[i]) for i in ids ])
|
||||
|
||||
def _quantity_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
#XXX must convert into one uom
|
||||
res = {}
|
||||
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
|
||||
acc_set = ",".join(map(str, ids2))
|
||||
|
||||
for i in ids:
|
||||
res.setdefault(i,0.0)
|
||||
|
||||
if not acc_set:
|
||||
return res
|
||||
|
||||
where_date = ''
|
||||
if context.get('from_date',False):
|
||||
where_date += " AND l.date >= '" + context['from_date'] + "'"
|
||||
@@ -116,11 +133,13 @@ class account_analytic_account(osv.osv):
|
||||
FROM account_analytic_account a \
|
||||
LEFT JOIN account_analytic_line l ON (a.id = l.account_id ' + where_date + ') \
|
||||
WHERE a.id IN ('+acc_set+') GROUP BY a.id')
|
||||
res = {}
|
||||
|
||||
for account_id, sum in cr.fetchall():
|
||||
res[account_id] = sum
|
||||
|
||||
for id in ids:
|
||||
if id not in ids2:
|
||||
continue
|
||||
for child in self.search(cr, uid, [('parent_id', 'child_of', [id])]):
|
||||
if child <> id:
|
||||
res.setdefault(id, 0.0)
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
|
||||
<record id="action_account_tree1" model="ir.actions.act_window">
|
||||
<field name="name"></field>
|
||||
<field name="name">Analytic Entries</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
||||
@@ -37,7 +37,7 @@ class journal_print(report_sxw.rml_parse):
|
||||
self.cr.execute('select sum(amount) from account_analytic_line where journal_id=%s', (journal_id,))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(journal_print, self).__init__(cr, uid, name, context)
|
||||
super(journal_print, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext = {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
|
||||
@@ -27,7 +27,7 @@ from report import report_sxw
|
||||
|
||||
class account_analytic_balance(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_analytic_balance, self).__init__(cr, uid, name, context)
|
||||
super(account_analytic_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'get_objects': self._get_objects,
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class account_analytic_analytic_check(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_analytic_analytic_check, self).__init__(cr, uid, name, context)
|
||||
super(account_analytic_analytic_check, self).__init__(cr, uid, name, context=context)
|
||||
self.sum_gen_deb = 0.0
|
||||
self.sum_gen_cred = 0.0
|
||||
self.sum_ana_deb = 0.0
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
#
|
||||
class account_analytic_journal(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_analytic_journal, self).__init__(cr, uid, name, context)
|
||||
super(account_analytic_journal, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self._lines,
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class account_analytic_cost_ledger(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_analytic_cost_ledger, self).__init__(cr, uid, name, context)
|
||||
super(account_analytic_cost_ledger, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines_g': self._lines_g,
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class account_inverted_analytic_balance(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_inverted_analytic_balance, self).__init__(cr, uid, name, context)
|
||||
super(account_inverted_analytic_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines_g': self._lines_g,
|
||||
|
||||
@@ -26,8 +26,7 @@ from report import report_sxw
|
||||
|
||||
class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_analytic_quantity_cost_ledger, self).__init__(cr, uid,
|
||||
name, context)
|
||||
super(account_analytic_quantity_cost_ledger, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines_g': self._lines_g,
|
||||
|
||||
@@ -30,7 +30,7 @@ from report import report_sxw
|
||||
class account_balance(report_sxw.rml_parse):
|
||||
_name = 'report.account.account.balance'
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_balance, self).__init__(cr, uid, name, context)
|
||||
super(account_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.sum_debit = 0.00
|
||||
self.sum_credit = 0.00
|
||||
self.date_lst = []
|
||||
|
||||
@@ -29,7 +29,7 @@ from report import report_sxw
|
||||
#
|
||||
class journal_print(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(journal_print, self).__init__(cr, uid, name, context)
|
||||
super(journal_print, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
@@ -26,40 +27,43 @@ import copy
|
||||
from report import report_sxw
|
||||
import re
|
||||
|
||||
def _get_country(record):
|
||||
if record.partner_id \
|
||||
and record.partner_id.address \
|
||||
and record.partner_id.address[0].country_id:
|
||||
return record.partner_id.address[0].country_id.code
|
||||
else:
|
||||
return ''
|
||||
|
||||
def _record_to_report_line(record):
|
||||
return {'date': record.date,
|
||||
'ref': record.ref,
|
||||
'acode': record.account_id.code,
|
||||
'name': record.name,
|
||||
'debit': record.debit,
|
||||
'credit': record.credit,
|
||||
'pname': record.partner_id and record.partner_id.name or '',
|
||||
'country': _get_country(record)
|
||||
}
|
||||
|
||||
class account_tax_code_report(rml_parse.rml_parse):
|
||||
#_name = 'report.account.tax.code.entries'
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_tax_code_report, self).__init__(cr, uid, name, context)
|
||||
super(account_tax_code_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_line':self.get_line,
|
||||
})
|
||||
|
||||
def get_line(self,obj):
|
||||
res = {}
|
||||
result = []
|
||||
line_ids = self.pool.get('account.move.line').search(self.cr,self.uid,[('tax_code_id','=',obj.id)])
|
||||
if line_ids:
|
||||
move_line_objs = self.pool.get('account.move.line').browse(self.cr,self.uid,line_ids)
|
||||
for line in move_line_objs:
|
||||
res['date'] = line.date
|
||||
res['ref'] = line.ref
|
||||
res['acode'] = line.account_id.code
|
||||
res['pname'] = ''
|
||||
res['country'] = ''
|
||||
def get_line(self, obj):
|
||||
line_ids = self.pool.get('account.move.line').search(self.cr, self.uid, [('tax_code_id','=',obj.id)])
|
||||
if not line_ids: return []
|
||||
|
||||
if line.partner_id:
|
||||
res['pname'] = line.partner_id.name
|
||||
if line.partner_id.address and line.partner_id.address[0].country_id:
|
||||
res['country'] = line.partner_id.address[0].country_id.code
|
||||
res['name'] = line.name
|
||||
res['debit'] = line.debit
|
||||
res['credit'] = line.credit
|
||||
result.append(res)
|
||||
return map(_record_to_report_line,
|
||||
self.pool.get('account.move.line')\
|
||||
.browse(self.cr, self.uid, line_ids))
|
||||
|
||||
return result
|
||||
|
||||
report_sxw.report_sxw('report.account.tax.code.entries', 'account.tax.code',
|
||||
'addons/account/report/account_tax_code.rml', parser=account_tax_code_report, header=False)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
class aged_trial_report(rml_parse.rml_parse):
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(aged_trial_report, self).__init__(cr, uid, name, context)
|
||||
super(aged_trial_report, self).__init__(cr, uid, name, context=context)
|
||||
self.line_query = ''
|
||||
self.total_account = []
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
#
|
||||
class journal_print(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(journal_print, self).__init__(cr, uid, name, context)
|
||||
super(journal_print, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
|
||||
@@ -29,7 +29,7 @@ from report import report_sxw
|
||||
#
|
||||
class journal_print(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(journal_print, self).__init__(cr, uid, name, context)
|
||||
super(journal_print, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
|
||||
@@ -53,7 +53,7 @@ class general_ledger(rml_parse.rml_parse):
|
||||
super(general_ledger, self).set_context(objects, data, new_ids, report_type)
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(general_ledger, self).__init__(cr, uid, name, context)
|
||||
super(general_ledger, self).__init__(cr, uid, name, context=context)
|
||||
self.date_borne = {}
|
||||
self.query = ""
|
||||
self.child_ids = ""
|
||||
|
||||
@@ -52,7 +52,7 @@ class general_ledger_landscape(rml_parse.rml_parse):
|
||||
super(general_ledger_landscape, self).set_context(objects, data, new_ids,report_type)
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(general_ledger_landscape, self).__init__(cr, uid, name, context)
|
||||
super(general_ledger_landscape, self).__init__(cr, uid, name, context=context)
|
||||
self.date_borne = {}
|
||||
self.query = ""
|
||||
self.child_ids = ""
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(1120.0,770.0)" title="Test" author="Martin Simon" allowSplitting="20" >
|
||||
<template pageSize="(1120.5,767.8)" title="Test" author="Martin Simon" allowSplitting="20" >
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="22.0" y1="31.0" width="1080" height="680"/>
|
||||
<pageGraphics>
|
||||
|
||||
@@ -25,7 +25,7 @@ from report import report_sxw
|
||||
|
||||
class account_invoice(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_invoice, self).__init__(cr, uid, name, context)
|
||||
super(account_invoice, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
})
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class partner_balance(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(partner_balance, self).__init__(cr, uid, name, context)
|
||||
super(partner_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.date_lst = []
|
||||
self.date_lst_string = ''
|
||||
self.account_ids = ''
|
||||
|
||||
@@ -32,7 +32,7 @@ import sys
|
||||
|
||||
class rml_parse(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(rml_parse, self).__init__(cr, uid, name, context=None)
|
||||
super(rml_parse, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'comma_me': self.comma_me,
|
||||
'format_date': self._get_and_change_date_format_for_swiss,
|
||||
|
||||
@@ -31,7 +31,7 @@ import re
|
||||
class tax_report(rml_parse.rml_parse):
|
||||
_name = 'report.account.vat.declaration'
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(tax_report, self).__init__(cr, uid, name, context)
|
||||
super(tax_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_period': self._get_period,
|
||||
|
||||
@@ -31,7 +31,7 @@ class third_party_ledger(rml_parse.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
self.date_lst = []
|
||||
self.date_lst_string = ''
|
||||
super(third_party_ledger, self).__init__(cr, uid, name, context)
|
||||
super(third_party_ledger, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
|
||||
@@ -2,176 +2,203 @@
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<header>
|
||||
<pageGraphics>
|
||||
<!--logo-->
|
||||
<!--<fill color="darkblue"/>-->
|
||||
<!--<stroke color="darkblue"/>-->
|
||||
|
||||
<!--TITLE COMPANY-->
|
||||
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
|
||||
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
|
||||
|
||||
<!--COL 1-->
|
||||
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
|
||||
<drawRightString x="20cm" y="28.1cm">Third Party Ledger [[ data['form']['result_selection'] == 'customer' and '/ Débiteur' ]] [[ data['form']['result_selection'] == 'supplier' and '/ Créancier' ]] [[ data['form']['result_selection'] == 'all' and '/ Créancier et Débiteur' ]]</drawRightString>
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
|
||||
</pageGraphics>
|
||||
</header>
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="tbl_heading">
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table2">
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
||||
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockLeftPadding length="0" start="1,0" stop="1,0"/>
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="0,-1"/>
|
||||
|
||||
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="2.0" leading="1" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="14.5" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="7.5" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="7.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" fontSize="7.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Balance" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
|
||||
<paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9c" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="total" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="14"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="date" fontName="Helvetica" fontSize="8.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P15" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica" fontSize="7.5" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P16" fontName="Helvetica" fontSize="8.0" leading="12" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_Bold_Right_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P2"><font color="white"></font></para>
|
||||
<para>[[ repeatIn(objects, 'p') ]] [[ setLang(p.partner_id.lang) ]]</para>
|
||||
<blockTable colWidths="50.0,30.0,42.0,220.0,69.0,72.0,63.0" repeatRows="1" style="tbl_heading">
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<td><para style="P12">JNRL</para></td>
|
||||
<td><para style="P12">Ref.</para></td>
|
||||
<td><para style="P12">Entry label</para></td>
|
||||
<td><para style="P16">Debit</para></td>
|
||||
<td><para style="P16">Credit</para></td>
|
||||
<td><para style="P16">Balance</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="337.0,69.0,72.0,63.0" style="Table3">
|
||||
<tr>
|
||||
<td><para style="Balance">Balance brought forward</para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_debit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_credit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="300.0,37.0,69.0,72.0,63.0" style="Table5">
|
||||
<tr>
|
||||
<td><para style="total">[[ p.ref ]] - [[ p.name ]]</para></td>
|
||||
<td><para style="total"></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data))) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_credit_partner(p,data))) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="45.0,30.0,262.0,0.0,69.0,72.0,63.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="P15"><font face="Helvetica">[[ repeatIn(lines(p,data), 'line') ]]</font>[[ formatLang(line['date'],date=True) ]]</para></td>
|
||||
<td><para style="P3">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P3">[[ line['ref'] ]] / [[ line['name'] ]]</para></td>
|
||||
<td><para style="P4"></para></td>
|
||||
<td><para style="P5">[[ formatLang((line['debit'])) ]]</para></td>
|
||||
<td><para style="P5">[[ formatLang((line['credit'])) ]]</para></td>
|
||||
<td><para style="P5">[[ formatLang((line['progress'])) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<blockTable colWidths="539.0" style="Table_header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Third Party Ledger</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P3">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
|
||||
<blockTable colWidths="65.0,28.0,45.0,175.0,77.0,75.0,74.0" style="Table_header_1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry Label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="314.0,77.0,75.0,74.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit(data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit(data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="314.0,77.0,75.0,74.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p,data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p,data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P1">[[ repeatIn(lines(p,data), 'line') ]]</para>
|
||||
<blockTable colWidths="65.0,28.0,45.0,175.0,77.0,75.0,74.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -2,176 +2,211 @@
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<header>
|
||||
<pageGraphics>
|
||||
<!--logo-->
|
||||
<!--<fill color="darkblue"/>-->
|
||||
<!--<stroke color="darkblue"/>-->
|
||||
|
||||
<!--TITLE COMPANY-->
|
||||
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
|
||||
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
|
||||
|
||||
<!--COL 1-->
|
||||
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
|
||||
<drawRightString x="20cm" y="28.1cm">Third Party Ledger [[ data['form']['result_selection'] == 'customer' and '/ Débiteur' ]] [[ data['form']['result_selection'] == 'supplier' and '/ Créancier' ]] [[ data['form']['result_selection'] == 'all' and '/ Créancier et Débiteur' ]]</drawRightString>
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
|
||||
</pageGraphics>
|
||||
</header>
|
||||
</pageTemplate>
|
||||
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_title">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="tbl_heading">
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table2">
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
||||
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockLeftPadding length="0" start="1,0" stop="1,0"/>
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="0,-1"/>
|
||||
|
||||
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="2.0" leading="1" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="14.5" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="7.5" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="7.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" fontSize="7.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Balance" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
|
||||
<paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9c" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="total" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="14"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="date" fontName="Helvetica" fontSize="8.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P15" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica" fontSize="7.5" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P16" fontName="Helvetica" fontSize="8.0" leading="12" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P2"><font color="white"></font></para>
|
||||
<blockTable colWidths="50.0,30.0,42.0,220.0,69.0,72.0,63.0" repeatRows="1" style="tbl_heading">
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<td><para style="P12">JNRL</para></td>
|
||||
<td><para style="P12">Ref.</para></td>
|
||||
<td><para style="P12">Entry label</para></td>
|
||||
<td><para style="P16">Debit</para></td>
|
||||
<td><para style="P16">Credit</para></td>
|
||||
<td><para style="P16">Balance</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="337.0,69.0,72.0,63.0" style="Table3">
|
||||
<tr>
|
||||
<td><para style="Balance">Balance brought forward</para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_debit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_credit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1">[[ repeatIn(objects, 'p') ]]</para>
|
||||
<blockTable colWidths="300.0,37.0,69.0,72.0,63.0" style="Table5">
|
||||
<tr>
|
||||
<td><para style="total">[[ p.ref ]] - [[ p.name ]]</para></td>
|
||||
<td><para style="total"></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data))) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_credit_partner(p,data))) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="45.0,30.0,262.0,0.0,69.0,72.0,63.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="P15"><font face="Helvetica">[[ repeatIn(lines(p,data), 'line') ]]</font>[[ formatLang(line['date'],date=True) ]]</para></td>
|
||||
<td><para style="P3">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P3">[[ line['ref'] ]] / [[ line['name'] ]]</para></td>
|
||||
<td><para style="P4"></para></td>
|
||||
<td><para style="P5">[[ formatLang((line['debit'])) ]]</para></td>
|
||||
<td><para style="P5">[[ formatLang((line['credit'])) ]]</para></td>
|
||||
<td><para style="P5">[[ formatLang((line['progress'])) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<blockTable colWidths="482.0" style="Table_title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Third Party Ledger</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0" style="Table_header_1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry Label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit(data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit(data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P4">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P1">[[ repeatIn(lines(p,data), 'line') ]]</para>
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">[[ line['ref'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
import wizard
|
||||
import pooler
|
||||
from tools.translate import _
|
||||
|
||||
form = '''<?xml version="1.0"?>
|
||||
<form string="Print Central Journal">
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
import wizard
|
||||
import pooler
|
||||
from tools.translate import _
|
||||
|
||||
form = '''<?xml version="1.0"?>
|
||||
<form string="Print General Journal">
|
||||
|
||||
@@ -25,6 +25,7 @@ import netsvc
|
||||
import pooler
|
||||
import time
|
||||
from tools.translate import _
|
||||
import tools
|
||||
|
||||
pay_form = '''<?xml version="1.0"?>
|
||||
<form string="Pay invoice">
|
||||
@@ -37,7 +38,7 @@ pay_form = '''<?xml version="1.0"?>
|
||||
</form>'''
|
||||
|
||||
pay_fields = {
|
||||
'amount': {'string': 'Amount paid', 'type':'float', 'required':True},
|
||||
'amount': {'string': 'Amount paid', 'type':'float', 'required':True, 'digits': (16,int(tools.config['price_accuracy']))},
|
||||
'name': {'string': 'Entry Name', 'type':'char', 'size': 64, 'required':True},
|
||||
'date': {'string': 'Payment date', 'type':'date', 'required':True, 'default':lambda *args: time.strftime('%Y-%m-%d')},
|
||||
'journal_id': {'string': 'Journal/Payment Mode', 'type': 'many2one', 'relation':'account.journal', 'required':True, 'domain':[('type','=','cash')]},
|
||||
@@ -53,18 +54,24 @@ def _pay_and_reconcile(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
cur_obj = pool.get('res.currency')
|
||||
amount = form['amount']
|
||||
context['analytic_id'] = form.get('analytic_id', False)
|
||||
|
||||
invoice = pool.get('account.invoice').browse(cr, uid, data['id'], context)
|
||||
journal = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context)
|
||||
# Compute the amount in company's currency, with the journal currency (which is equal to payment currency)
|
||||
# when it is needed : If payment currency (according to selected journal.currency) is <> from company currency
|
||||
if journal.currency and invoice.company_id.currency_id.id<>journal.currency.id:
|
||||
ctx = {'date':data['form']['date']}
|
||||
amount = cur_obj.compute(cr, uid, journal.currency.id, invoice.company_id.currency_id.id, amount, context=ctx)
|
||||
|
||||
currency_id = journal.currency.id
|
||||
# Put the paid amount in currency, and the currency, in the context if currency is different from company's currency
|
||||
context.update({'amount_currency':form['amount'],'currency_id':currency_id})
|
||||
|
||||
# Take the choosen date
|
||||
if form.has_key('comment'):
|
||||
context={'date_p':form['date'],'comment':form['comment']}
|
||||
context.update({'date_p':form['date'],'comment':form['comment']})
|
||||
else:
|
||||
context={'date_p':form['date'],'comment':False}
|
||||
context.update({'date_p':form['date'],'comment':False})
|
||||
|
||||
acc_id = journal.default_credit_account_id and journal.default_credit_account_id.id
|
||||
if not acc_id:
|
||||
@@ -78,31 +85,53 @@ def _wo_check(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
invoice = pool.get('account.invoice').browse(cr, uid, data['id'], context)
|
||||
journal = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context)
|
||||
if invoice.company_id.currency_id.id <> invoice.currency_id.id:
|
||||
return 'addendum'
|
||||
if journal.currency and (journal.currency.id <> invoice.currency_id.id):
|
||||
return 'addendum'
|
||||
if pool.get('res.currency').is_zero(cr, uid, invoice.currency_id,
|
||||
(data['form']['amount'] - invoice.amount_total)):
|
||||
cur_obj = pool.get('res.currency')
|
||||
# Here we need that:
|
||||
# The invoice total amount in company's currency <> paid amount in company currency
|
||||
# (according to the correct day rate, invoicing rate and payment rate are may be different)
|
||||
# => Ask to a write-off of the difference. This could happen even if both amount are equal,
|
||||
# because if the currency rate
|
||||
# Get the amount in company currency for the invoice (according to move lines)
|
||||
inv_amount_company_currency=invoice.move_id.amount
|
||||
# Get the current amount paid in company currency
|
||||
if journal.currency and invoice.company_id.currency_id.id<>journal.currency.id:
|
||||
ctx = {'date':data['form']['date']}
|
||||
amount_paid = cur_obj.compute(cr, uid, journal.currency.id, invoice.company_id.currency_id.id, data['form']['amount'], round=True, context=ctx)
|
||||
else:
|
||||
amount_paid = data['form']['amount']
|
||||
# Get the old payment if there are some
|
||||
if invoice.payment_ids:
|
||||
debit=credit=0.0
|
||||
for payment in invoice.payment_ids:
|
||||
debit+=payment.debit
|
||||
credit+=payment.credit
|
||||
amount_paid+=abs(debit-credit)
|
||||
|
||||
# Test if there is a difference according to currency rouding setting
|
||||
if pool.get('res.currency').is_zero(cr, uid, invoice.company_id.currency_id,
|
||||
(amount_paid - inv_amount_company_currency)):
|
||||
return 'reconcile'
|
||||
return 'addendum'
|
||||
|
||||
_transaction_add_form = '''<?xml version="1.0"?>
|
||||
<form string="Information addendum">
|
||||
<separator string="Write-Off Move" colspan="4"/>
|
||||
<field name="writeoff_acc_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="writeoff_journal_id"/>
|
||||
<field name="writeoff_acc_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="comment"/>
|
||||
<separator string="Analytic" colspan="4"/>
|
||||
<field name="analytic_id"/>
|
||||
</form>'''
|
||||
|
||||
_transaction_add_fields = {
|
||||
'writeoff_acc_id': {'string':'Write-Off account', 'type':'many2one', 'relation':'account.account', 'required':True},
|
||||
'writeoff_journal_id': {'string': 'Write-Off journal', 'type': 'many2one', 'relation':'account.journal', 'required':True},
|
||||
'comment': {'string': 'Entry Name', 'type':'char', 'size': 64, 'required':True},
|
||||
'comment': {'string': 'Comment', 'type':'char', 'size': 64 , 'required':True},
|
||||
'analytic_id': {'string':'Analytic Account', 'type': 'many2one', 'relation':'account.analytic.account'},
|
||||
}
|
||||
|
||||
def _get_value_addendum(self, cr, uid, data, context={}):
|
||||
return {}
|
||||
return {'comment': _('Write-Off')}
|
||||
|
||||
def _get_period(self, cr, uid, data, context={}):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
import wizard
|
||||
import pooler
|
||||
from tools.translate import _
|
||||
|
||||
form = '''<?xml version="1.0"?>
|
||||
<form string="Print Journal">
|
||||
|
||||
@@ -25,6 +25,8 @@ import netsvc
|
||||
import time
|
||||
import osv
|
||||
import pooler
|
||||
from datetime import datetime
|
||||
from tools.translate import _
|
||||
|
||||
_transaction_form = '''<?xml version="1.0"?>
|
||||
<form string="Reconciliation">
|
||||
@@ -70,8 +72,18 @@ def _trans_rec_reconcile(self, cr, uid, data, context=None):
|
||||
|
||||
form = data['form']
|
||||
account_id = form.get('writeoff_acc_id', False)
|
||||
period_id = form.get('period_id', False)
|
||||
context['date_p'] = form.get('date_p', False)
|
||||
date = False
|
||||
if context['date_p']:
|
||||
date = datetime.strptime(context['date_p'], '%Y-%m-%d')
|
||||
ids = pool.get('account.period').find(cr, uid, dt=date, context=context)
|
||||
period_id = False
|
||||
if len(ids):
|
||||
period_id = ids[0]
|
||||
|
||||
journal_id = form.get('journal_id', False)
|
||||
context['comment'] = form.get('comment', False)
|
||||
context['analytic_id'] = form.get('analytic_id', False)
|
||||
account_move_line_obj.reconcile(cr, uid, data['ids'], 'manual', account_id,
|
||||
period_id, journal_id, context=context)
|
||||
return {}
|
||||
@@ -85,23 +97,24 @@ _transaction_add_form = '''<?xml version="1.0"?>
|
||||
<form string="Information addendum">
|
||||
<separator string="Write-Off Move" colspan="4"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<field name="writeoff_acc_id" domain="[('type', '<>', 'view')]"/>
|
||||
<field name="date_p"/>
|
||||
<field name="comment"/>
|
||||
<separator string="Analytic" colspan="4"/>
|
||||
<field name="analytic_id"/>
|
||||
</form>'''
|
||||
|
||||
_transaction_add_fields = {
|
||||
'journal_id': {'string': 'Write-Off Journal', 'type': 'many2one', 'relation':'account.journal', 'required':True},
|
||||
'period_id': {'string': 'Write-Off Period', 'type': 'many2one', 'relation':'account.period', 'required':True},
|
||||
'writeoff_acc_id': {'string':'Write-Off account', 'type':'many2one', 'relation':'account.account', 'required':True},
|
||||
'date_p': {'string':'Date','type':'date'},
|
||||
'comment': {'string':'Comment','type':'char', 'size': 64, 'required':True},
|
||||
'analytic_id': {'string':'Analytic Account', 'type': 'many2one', 'relation':'account.analytic.account'},
|
||||
}
|
||||
|
||||
def _trans_rec_addendum(self, cr, uid, data, context={}):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
ids = pool.get('account.period').find(cr, uid, context=context)
|
||||
period_id = False
|
||||
if len(ids):
|
||||
period_id = ids[0]
|
||||
return {'period_id':period_id}
|
||||
date_p = time.strftime('%Y-%m-%d')
|
||||
return {'date_p':date_p, 'comment': _('Write-Off')}
|
||||
|
||||
|
||||
class wiz_reconcile(wizard.interface):
|
||||
|
||||
@@ -110,7 +110,9 @@ class wiz_refund(wizard.interface):
|
||||
# we compute due date
|
||||
#!!!due date = date inv date on formdate
|
||||
pool.get('account.invoice').write(cr, uid, [refund.id],{'date_due':date,'check_total':inv.check_total})
|
||||
|
||||
# to make the taxes calculated
|
||||
pool.get('account.invoice').button_compute(cr, uid, refund_id)
|
||||
|
||||
created_inv.append(refund_id[0])
|
||||
#if inv is paid we unreconcile
|
||||
if mode in ('cancel','modify'):
|
||||
@@ -152,10 +154,10 @@ class wiz_refund(wizard.interface):
|
||||
invoice = invoice[0]
|
||||
del invoice['id']
|
||||
invoice_lines = pool.get('account.invoice.line').read(cr, uid, invoice['invoice_line'])
|
||||
invoice_lines = pool.get('account.invoice')._refund_cleanup_lines(invoice_lines)
|
||||
invoice_lines = pool.get('account.invoice')._refund_cleanup_lines(cr, uid, invoice_lines)
|
||||
tax_lines = pool.get('account.invoice.tax').read(
|
||||
cr, uid, invoice['tax_line'])
|
||||
tax_lines = pool.get('account.invoice')._refund_cleanup_lines(tax_lines)
|
||||
tax_lines = pool.get('account.invoice')._refund_cleanup_lines(cr, uid, tax_lines)
|
||||
|
||||
invoice.update({
|
||||
'type': inv.type,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
import wizard
|
||||
import pooler
|
||||
import netsvc
|
||||
from tools.translate import _
|
||||
|
||||
form = '''<?xml version="1.0"?>
|
||||
<form string="Open Invoice">
|
||||
|
||||
@@ -371,10 +371,13 @@ class account_analytic_account(osv.osv):
|
||||
res = {}
|
||||
for id in ids:
|
||||
ids2 = self.search(cr, uid, [('parent_id', 'child_of', [id])])
|
||||
cr.execute('SELECT DISTINCT(month_id) FROM account_analytic_analysis_summary_month ' \
|
||||
'WHERE account_id in (' + ','.join([str(x) for x in ids2]) + ') ' \
|
||||
'AND unit_amount <> 0.0')
|
||||
res[id] = [int(id * 1000000 + int(x[0])) for x in cr.fetchall()]
|
||||
if ids2:
|
||||
cr.execute('SELECT DISTINCT(month_id) FROM account_analytic_analysis_summary_month ' \
|
||||
'WHERE account_id in (' + ','.join([str(x) for x in ids2]) + ') ' \
|
||||
'AND unit_amount <> 0.0')
|
||||
res[id] = [int(id * 1000000 + int(x[0])) for x in cr.fetchall()]
|
||||
else:
|
||||
res[id] = []
|
||||
return res
|
||||
|
||||
def _user(self, cr, uid, ids, name, arg, context=None):
|
||||
@@ -383,10 +386,13 @@ class account_analytic_account(osv.osv):
|
||||
max_user = cr.fetchone()[0]
|
||||
for id in ids:
|
||||
ids2 = self.search(cr, uid, [('parent_id', 'child_of', [id])])
|
||||
cr.execute('SELECT DISTINCT("user") FROM account_analytic_analysis_summary_user ' \
|
||||
'WHERE account_id in (' + ','.join([str(x) for x in ids2]) + ') ' \
|
||||
'AND unit_amount <> 0.0')
|
||||
res[id] = [int((id * max_user) + x[0]) for x in cr.fetchall()]
|
||||
if ids2:
|
||||
cr.execute('SELECT DISTINCT("user") FROM account_analytic_analysis_summary_user ' \
|
||||
'WHERE account_id in (' + ','.join([str(x) for x in ids2]) + ') ' \
|
||||
'AND unit_amount <> 0.0')
|
||||
res[id] = [int((id * max_user) + x[0]) for x in cr.fetchall()]
|
||||
else:
|
||||
res[id] = []
|
||||
return res
|
||||
|
||||
_columns ={
|
||||
@@ -608,7 +614,7 @@ class account_analytic_account_summary_month(osv.osv):
|
||||
for child_id in account_obj.search(cr, uid,
|
||||
[('parent_id', 'child_of', [int(str(int(obj_id))[:-6])])]):
|
||||
if child_id != int(str(int(obj_id))[:-6]):
|
||||
res[obj_id] += res.get(int(child_id * 1000000 + int(obj_id)), 0.0)
|
||||
res[obj_id] += res.get(int(child_id * 1000000 + int(str(int(obj_id))[-6:])), 0.0)
|
||||
for id in ids:
|
||||
res[id] = round(res.get(id, 0.0), 2)
|
||||
return res
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from xml import dom
|
||||
from lxml import etree
|
||||
|
||||
from mx import DateTime
|
||||
from mx.DateTime import now
|
||||
@@ -163,7 +163,7 @@ class account_analytic_plan_instance(osv.osv):
|
||||
<newline/>"""%(i,tools.to_xml(line.name),tools.to_xml(line.name),line.root_analytic_id and line.root_analytic_id.id or 0)
|
||||
i+=1
|
||||
res['arch'] += "</form>"
|
||||
doc = dom.minidom.parseString(res['arch'].encode('utf8'))
|
||||
doc = etree.fromstring(res['arch'].encode('utf8'))
|
||||
xarch, xfields = self._view_look_dom_arch(cr, uid, doc, view_id, context=context)
|
||||
res['arch'] = xarch
|
||||
res['fields'] = xfields
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class crossovered_analytic(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(crossovered_analytic, self).__init__(cr, uid, name, context)
|
||||
super(crossovered_analytic, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self._lines,
|
||||
|
||||
@@ -35,7 +35,7 @@ parents = {
|
||||
|
||||
class account_balance(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_balance, self).__init__(cr, uid, name, context)
|
||||
super(account_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.flag=1
|
||||
self.dr_total= 0.00
|
||||
self.cr_total= 0.00
|
||||
|
||||
@@ -36,7 +36,7 @@ parents = {
|
||||
|
||||
class account_balance_landscape(rml_parse.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_balance_landscape, self).__init__(cr, uid, name, context)
|
||||
super(account_balance_landscape, self).__init__(cr, uid, name, context=context)
|
||||
self.flag=1
|
||||
self.dr_total= 0.00
|
||||
self.cr_total= 0.00
|
||||
|
||||
@@ -32,7 +32,7 @@ import sys
|
||||
|
||||
class rml_parse(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(rml_parse, self).__init__(cr, uid, name, context=None)
|
||||
super(rml_parse, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'comma_me': self.comma_me,
|
||||
'format_date': self._get_and_change_date_format_for_swiss,
|
||||
|
||||
@@ -26,7 +26,7 @@ import datetime
|
||||
|
||||
class analytic_account_budget_report(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(analytic_account_budget_report, self).__init__(cr, uid, name, context)
|
||||
super(analytic_account_budget_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'funct': self.funct,
|
||||
'funct_total': self.funct_total,
|
||||
|
||||
@@ -27,7 +27,7 @@ import operator
|
||||
|
||||
class budget_report(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(budget_report, self).__init__(cr, uid, name, context)
|
||||
super(budget_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'lines': self.lines,
|
||||
'budget_total': self.budget_total,
|
||||
|
||||
@@ -29,7 +29,7 @@ import osv
|
||||
|
||||
class budget_report(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(budget_report, self).__init__(cr, uid, name, context)
|
||||
super(budget_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'funct': self.funct,
|
||||
'funct_total': self.funct_total,
|
||||
|
||||
@@ -47,6 +47,8 @@ class account_move_line(osv.osv):
|
||||
_name='account.move.line'
|
||||
|
||||
def check_date(self, cr, uid, vals, context=None, check=True):
|
||||
if not context:
|
||||
context = {}
|
||||
if 'date' in vals.keys():
|
||||
if 'journal_id' in vals and 'journal_id' not in context:
|
||||
journal_id = vals['journal_id']
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class report_rappel(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(report_rappel, self).__init__(cr, uid, name, context)
|
||||
super(report_rappel, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time' : time,
|
||||
'ids_to_objects': self._ids_to_objects,
|
||||
|
||||
@@ -162,7 +162,7 @@ class followup_all_print(wizard.interface):
|
||||
if (not dest) and adr.type=='default':
|
||||
if adr.email:
|
||||
dest = [adr.email]
|
||||
src = tools.config.options['smtp_user']
|
||||
src = tools.config.options['email_from']
|
||||
if not data['form']['partner_lang']:
|
||||
body = data['form']['email_body']
|
||||
else:
|
||||
|
||||
@@ -25,7 +25,7 @@ from report import report_sxw
|
||||
|
||||
class account_invoice_1(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_invoice_1, self).__init__(cr, uid, name, context)
|
||||
super(account_invoice_1, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'invoice_lines': self.invoice_lines,
|
||||
|
||||
@@ -1,263 +1,525 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="28.0" width="527" height="786"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,0" stop="5,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,0"/>
|
||||
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,2" stop="2,2"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4a" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7a" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P8b" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8a" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P9" fontName="Times-Italic" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica-Bold" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11a" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="12.0" leading="13" alignment="LEFT"/>
|
||||
<paraStyle name="P15" fontName="Helvetica" fontSize="12.0" leading="13" alignment="CENTER"/>
|
||||
<paraStyle name="P16" fontName="Helvetica" fontSize="14.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="P17" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="P18" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="P19" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
|
||||
<paraStyle name="P20" fontName="Helvetica" fontSize="6.0" leading="4" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P21" fontName="Helvetica-Bold" fontSize="8.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P22" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P23" fontName="Helvetica" fontSize="14.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" alignment="CENTER" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Contents1" fontName="Helvetica" alignment="RIGHT" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P1">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="P1">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
<blockTable colWidths="295.0,232.0" style="Tableau2">
|
||||
<tr>
|
||||
<td><para style="P8b"><font color="white"> </font></para></td>
|
||||
<td>
|
||||
<para style="Standard">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="P8b"><font color="white"> </font></para>
|
||||
<para style="Standard">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P8b">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<para style="P23">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P16"><font>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]]</font><font>[[ o.number ]]</font></para>
|
||||
<para style="P8b">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<para style="P17"><font>Document:</font><font>[[ o.name ]]</font></para>
|
||||
<para style="P8b"><font color="white"></font></para>
|
||||
<para style="P17"><font>Invoice Date: </font><font>[[ formatLang(o.date_invoice,date=True) ]]</font></para>
|
||||
<para style="P18"><font>Customer Ref:</font>[[ o.address_invoice_id.partner_id.ref or '/' ]]</para>
|
||||
<para style="P8b">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<blockTable colWidths="274.0,62.0,70.0,67.0,68.0" style="Tableau6">
|
||||
<tr>
|
||||
<td><para style="P3">Description / Taxes</para></td>
|
||||
<td><para style="P3">Quantity</para></td>
|
||||
<td><para style="P4">Unit Price</para></td>
|
||||
<td><para style="P4">Disc. (%)</para></td>
|
||||
<td><para style="P3">Price</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P20">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="0.0,240.0,77.5,41.0,39.0,50.0,79.0" style="Tableau7">
|
||||
<tr>
|
||||
<td><para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para></td>
|
||||
<td><para style="P8a">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['name'] ]] / ( [[ a['tax_types'] ]] )</para></td>
|
||||
<td><para style="P7a">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['quantity'] ]]</para></td>
|
||||
<td><para style="P5">[[ a['uos'] ]]</para></td>
|
||||
<td><para style="P7">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_unit'] ]]</para></td>
|
||||
<td><para style="P7">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['discount'] ]]</para></td>
|
||||
<td><para style="P7">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]]<font>[[ a['price_subtotal'] ]]</font><font> [[ a['currency'] ]]</font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="terp_default_Note">Note : [[ format(a['note']) or removeParentNode('tr') ]]</para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para><font color="white"></font></para></td>
|
||||
<td><para style="P7"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents1"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="453.0,74.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="Table Contents">[[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="P8">[[ a['type']=='text' and '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="274.0,62.0,70.0,67.0,68.0" style="Tableau6">
|
||||
<tr>
|
||||
<td><para style="P3">Description/Taxes [[ a['type']!='break' and removeParentNode('blockTable')]]</para></td>
|
||||
<td><para style="P4">Quantity</para></td>
|
||||
<td><para style="P4">Unit Price</para></td>
|
||||
<td><para style="P4">Disc. (%)</para></td>
|
||||
<td><para style="P3">Price</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="321.0,210.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="100.0,73.0,100.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="P10"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="110.0,90.0" style="Tableau5">
|
||||
<tr>
|
||||
<td><para style="P13">Total (Excl. taxes):</para></td>
|
||||
<td><para style="P12"><u>[[ '%.2f' % o.amount_untaxed ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P13">Taxes:</para></td>
|
||||
<td><para style="P11a">[[ '%.2f' % o.amount_tax ]] [[o.currency_id.code ]]</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P13">Total <font>(Incl. taxes):</font></para></td>
|
||||
<td><para style="P12"><u>[[ '%.2f' % o.amount_total ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="251.0,290.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="81.0,73.0,65.0" style="Tableau4">
|
||||
<tr>
|
||||
<td><para style="P10">Tax</para></td>
|
||||
<td><para style="P8">Base</para></td>
|
||||
<td><para style="P8">Amount</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P10"><font>[[ repeatIn(o.tax_line,'t') ]]</font><font>[[ t.name ]]</font></para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.base ]]</para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.amount]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="81.0,73.0,65.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="P10"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P8b">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<para style="P19">[[ format(o.comment) or removeParentNode('para') ]]</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or removeParentNode('para') ]]</para>
|
||||
</story>
|
||||
</document>
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Invoice_General_Header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_General_Detail_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Invoice_Line_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Coment_Payment_Term">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Payment_Terms">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Drawing" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Header" fontName="Times-Roman"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
|
||||
<paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Times-Roman"/>
|
||||
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Detail_another" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
<blockTable colWidths="302.0,237.0" style="Tableau2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P2">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,179.0,180.0" style="Table_Invoice_General_Header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Document</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Invoice Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Partner Ref.</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="179.0,179.0,180.0" style="Table_General_Detail_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.address_invoice_id.partner_id.ref or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="284.0,64.0,64.0,52.0,75.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Description / Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="4.0,280.0,44.0,21.0,66.0,53.0,51.0,19.0" style="Table_Invoice_Line_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['type']=='text' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['name'] ]] [[ a['type']=='article' and ('/ (' + a['tax_types'] + ')' ) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['quantity'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['uos'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_unit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['discount'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]] [[ a['price_subtotal'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['currency'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">Note: [[ format(a['note']) or removeParentNode('tr') ]]</para>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="4.0,278.0,257.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['type']=='text' and '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="284.0,64.0,64.0,52.0,75.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Description / Taxes [[ a['type']!='break' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1"/>
|
||||
</section>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Net Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="57.0,61.0,60.0,360.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Tax</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Base</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
|
||||
<blockTable colWidths="54.0,61.0,67.0,357.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ t.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Coment_Payment_Term">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format(o.comment or removeParentNode('blockTable')) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Payment_Terms">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
@@ -26,7 +26,7 @@ import pooler
|
||||
|
||||
class account_invoice_with_message(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_invoice_with_message, self).__init__(cr, uid, name, context)
|
||||
super(account_invoice_with_message, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'spcl_msg': self.spcl_msg,
|
||||
@@ -132,14 +132,14 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
||||
res['price_subtotal']=''
|
||||
res['currency']=''
|
||||
elif entry.state=='line':
|
||||
res['quantity']='___________________'
|
||||
res['price_unit']='______________________'
|
||||
res['discount']='____________________________________'
|
||||
res['tax_types']='_____________________'
|
||||
res['quantity']='_______________'
|
||||
res['price_unit']='______________'
|
||||
res['discount']='____________'
|
||||
res['tax_types']='____________________'
|
||||
res['uos']='_____'
|
||||
res['name']='______________________________________'
|
||||
res['price_subtotal']='___________'
|
||||
res['currency']='_'
|
||||
res['name']='_______________________________________________'
|
||||
res['price_subtotal']='____________'
|
||||
res['currency']='____'
|
||||
elif entry.state=='break':
|
||||
res['type']=entry.state
|
||||
res['name']=entry.name
|
||||
|
||||
@@ -1,272 +1,540 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="28.0" width="527" height="786"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,0" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,0"/>
|
||||
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,2" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,2" stop="2,2"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4a" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7a" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P8b" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8a" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P9" fontName="Times-Italic" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica-Bold" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11a" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="12.0" leading="13" alignment="LEFT"/>
|
||||
<paraStyle name="P15" fontName="Helvetica" fontSize="12.0" leading="13" alignment="CENTER"/>
|
||||
<paraStyle name="P16" fontName="Helvetica" fontSize="14.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="P17" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="P18" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="P19" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
|
||||
<paraStyle name="P20" fontName="Helvetica" fontSize="6.0" leading="4" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P21" fontName="Helvetica-Bold" fontSize="8.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P22" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P23" fontName="Helvetica" fontSize="14.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" alignment="CENTER" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Contents1" fontName="Helvetica" alignment="RIGHT" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P1">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="P1">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
<blockTable colWidths="295.0,232.0" style="Tableau2">
|
||||
<tr>
|
||||
<td><para style="P2"><font color="white"> </font></para></td>
|
||||
<td>
|
||||
<para style="Standard">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P23">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P16"><font>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]]</font><font>[[ o.number ]]</font></para>
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P17"><font>Document:</font><font>[[o.name]]</font></para>
|
||||
<para style="P8b"><font color="white"> </font></para>
|
||||
<para style="P17"><font>Invoice Date: </font><font>[[ formatLang(o.date_invoice,date=True) ]]</font></para>
|
||||
<para style="P18"><font>Customer Ref:</font> [[ o.address_invoice_id.partner_id.ref or '/' ]]</para>
|
||||
<para style="P8b"><font color="white"> </font></para>
|
||||
<blockTable colWidths="274.0,62.0,70.0,67.0,68.0" style="Tableau6">
|
||||
<tr>
|
||||
<td><para style="P3">Description / Taxes</para></td>
|
||||
<td><para style="P3">Quantity</para></td>
|
||||
<td><para style="P4">Unit Price</para></td>
|
||||
<td><para style="P4">Disc. (%)</para></td>
|
||||
<td><para style="P3">Price</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P20">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="0.0,240.0,77.5,41.0,39.0,50.0,79.0" style="Tableau7">
|
||||
<tr>
|
||||
<td><para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para></td>
|
||||
<td><para style="P8a">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['name'] ]] / ( [[ a['tax_types'] ]] )</para></td>
|
||||
<td><para style="P7a">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['quantity'] ]]</para></td>
|
||||
<td><para style="P5">[[ a['uos'] ]]</para></td>
|
||||
<td><para style="P7">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_unit'] ]]</para></td>
|
||||
<td><para style="P7">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['discount'] ]]</para></td>
|
||||
<td><para style="P7">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]]<font>[[ a['price_subtotal'] ]]</font><font> [[ a['currency'] ]]</font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="terp_default_Note">Note : [[ format(a['note']) or removeParentNode('tr') ]]</para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para><font color="white"></font></para></td>
|
||||
<td><para style="P7"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents1"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="453.0,74.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="Table Contents">[[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="P8">[[ a['type']=='text' and '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="274.0,62.0,70.0,67.0,68.0" style="Tableau6">
|
||||
<tr>
|
||||
<td><para style="P3">Description/Taxes [[ a['type']!='break' and removeParentNode('blockTable')]]</para></td>
|
||||
<td><para style="P4">Quantity</para></td>
|
||||
<td><para style="P4">Unit Price</para></td>
|
||||
<td><para style="P4">Disc. (%)</para></td>
|
||||
<td><para style="P3">Price</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="321.0,210.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="100.0,73.0,100.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="P10"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="110.0,90.0" style="Tableau5">
|
||||
<tr>
|
||||
<td><para style="P13">Total (Excl. taxes):</para></td>
|
||||
<td><para style="P12"><u>[[ '%.2f' % o.amount_untaxed ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P13">Taxes:</para></td>
|
||||
<td><para style="P11a">[[ '%.2f' % o.amount_tax ]] [[o.currency_id.code ]]</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P13">Total <font>(Incl. taxes):</font></para></td>
|
||||
<td><para style="P12"><u>[[ '%.2f' % o.amount_total ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="251.0,290.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="81.0,73.0,65.0" style="Tableau4">
|
||||
<tr>
|
||||
<td><para style="P10">Tax</para></td>
|
||||
<td><para style="P8">Base</para></td>
|
||||
<td><para style="P8">Amount</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P10"><font>[[ repeatIn(o.tax_line,'t') ]]</font><font>[[ t.name ]]</font></para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.base ]]</para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.amount]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="81.0,73.0,65.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="P10"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P19">[[ format(o.comment) or removeParentNode('para') ]]</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or removeParentNode('para') ]]</para>
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P19">[[ repeatIn((spcl_msg(data['form']) and spcl_msg(data['form']).splitlines()) or [], 'note') ]]</para>
|
||||
<para style="P19">[[ format(note) or removeParentNode('para') ]]</para>
|
||||
</section>
|
||||
</story>
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Invoice_General_Header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_General_Detail_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Invoice_Line_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Coment_Payment_Term">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Payment_Terms">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Drawing" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Header" fontName="Times-Roman"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
|
||||
<paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Times-Roman"/>
|
||||
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Detail_another" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
<blockTable colWidths="302.0,237.0" style="Tableau2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P3">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,179.0,180.0" style="Table_Invoice_General_Header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Document</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Invoice Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Partner Ref.</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="179.0,179.0,180.0" style="Table_General_Detail_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.address_invoice_id.partner_id.ref or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="284.0,64.0,64.0,52.0,75.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Description / Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="4.0,280.0,44.0,21.0,66.0,53.0,51.0,19.0" style="Table_Invoice_Line_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['type']=='text' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['name'] ]] [[ a['type']=='article' and ('/ (' + a['tax_types'] +')' ) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['quantity'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['uos'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_unit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['discount'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]] [[ a['price_subtotal'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['currency'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">Note: [[ format(a['note']) or removeParentNode('tr') ]]</para>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="4.0,278.0,257.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['type']=='text' and '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="284.0,64.0,64.0,52.0,75.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Description / Taxes [[ a['type']!='break' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1"/>
|
||||
</section>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Net Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="57.0,61.0,60.0,360.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Tax</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Base</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
|
||||
<blockTable colWidths="54.0,61.0,67.0,357.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ t.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Coment_Payment_Term">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format(o.comment or removeParentNode('blockTable')) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Payment_Terms">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ repeatIn((spcl_msg(data['form']) and spcl_msg(data['form']).splitlines()) or [], 'note') ]]</para>
|
||||
<para style="terp_default_9">[[ note or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class payment_order(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(payment_order, self).__init__(cr, uid, name, context)
|
||||
super(payment_order, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ def create_payment(self, cr, uid, data, context):
|
||||
'partner_id': line.partner_id and line.partner_id.id or False,
|
||||
'communication': line.ref or '/',
|
||||
'date': date_to_pay,
|
||||
'currency': line.invoice and line.invoice.currency_id.id or False,
|
||||
}, context=context)
|
||||
return {}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
class accounting_report(report_sxw.rml_parse):
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(accounting_report, self).__init__(cr, uid, name, context)
|
||||
super(accounting_report, self).__init__(cr, uid, name, context=context)
|
||||
self.ret_list = []
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
|
||||
@@ -76,7 +76,7 @@ import os
|
||||
class accounting_report_indicator(report_sxw.rml_parse):
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(accounting_report_indicator, self).__init__(cr, uid, name, context)
|
||||
super(accounting_report_indicator, self).__init__(cr, uid, name, context=context)
|
||||
self.ret_list = []
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
|
||||
@@ -36,7 +36,7 @@ parents = {
|
||||
|
||||
class account_report_bs(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_report_bs, self).__init__(cr, uid, name, context)
|
||||
super(account_report_bs, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
|
||||
"update_xml" : [
|
||||
"voucher_sequence.xml",
|
||||
"account_view.xml",
|
||||
"account_report.xml",
|
||||
"voucher_wizard.xml",
|
||||
"voucher_view.xml",
|
||||
"account_view.xml",
|
||||
],
|
||||
'certificate': '0037580727101',
|
||||
"active": False,
|
||||
|
||||
@@ -220,17 +220,7 @@ class AccountMove(osv.osv):
|
||||
_inherit = "account.move"
|
||||
_columns = {
|
||||
'name':fields.char('Name', size=256, required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'voucher_type': fields.selection([
|
||||
('pay_voucher','Cash Payment Voucher'),
|
||||
('bank_pay_voucher','Bank Payment Voucher'),
|
||||
('rec_voucher','Cash Receipt Voucher'),
|
||||
('bank_rec_voucher','Bank Receipt Voucher'),
|
||||
('cont_voucher','Contra Voucher'),
|
||||
('journal_sale_vou','Journal Sale Voucher'),
|
||||
('journal_pur_voucher','Journal Purchase Voucher'),
|
||||
('journal_voucher','Journal Voucher'),
|
||||
],'Voucher Type', readonly=True, select=True, states={'draft':[('readonly',False)]}),
|
||||
'narration':fields.text('Narration'),
|
||||
'narration':fields.text('Narration', readonly=True, select=True, states={'draft':[('readonly',False)]}),
|
||||
}
|
||||
|
||||
AccountMove()
|
||||
|
||||
@@ -1,26 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="account_move_inherit">
|
||||
<field name="name">account.move.type.form.inherit1</field>
|
||||
<record model="ir.ui.view" id="account_move_inherit_new">
|
||||
<field name="name">account.move.type.form.inherit2</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="model">account.move</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="journal_id" position="after">
|
||||
<field name="voucher_type" groups="base.group_extended" select="2"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="account_move_inherit_new">
|
||||
<field name="name">account.move.type.form.inherit2</field>
|
||||
<field name="inherit_id" ref="account_move_inherit"/>
|
||||
<field name="model">account.move</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="line_id" position="replace">
|
||||
<field colspan="4" default_get="{'lines':line_id ,'journal':journal_id }" name="line_id" nolabel="1" widget="one2many_list" height="275">
|
||||
<field colspan="4" default_get="{'lines':line_id ,'journal':journal_id }" name="line_id" nolabel="1" widget="one2many_list" height="250">
|
||||
<form string="Account Entry Line">
|
||||
<separator colspan="4" string="General Information"/>
|
||||
<field name="name" select="1"/>
|
||||
@@ -120,7 +108,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- sub_currency -->
|
||||
<!-- sub_currency -->
|
||||
<record model="ir.ui.view" id="sub_currency_form">
|
||||
<field name="name">sub.currency.form</field>
|
||||
<field name="inherit_id" ref="base.view_currency_form" />
|
||||
|
||||
@@ -1,598 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_voucher
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-05-19 14:36+0000\n"
|
||||
"PO-Revision-Date: 2009-05-19 17:10+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2009-08-28 11:00+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.actions.act_window,name:account_voucher.act_account_acount_move_line_open1
|
||||
msgid "Opening Balance Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_receipt_bakreceipt_voucher_list
|
||||
msgid "Bank Receipts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Particulars"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "State :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Ref. :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.move,voucher_type:0
|
||||
#: selection:account.voucher,type:0
|
||||
#: selection:account.voucher.open,init,type:0
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_view_cont_voucher_form
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_view_cont_voucher_form
|
||||
msgid "Contra Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,company_id:0
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.move,voucher_type:0
|
||||
#: selection:account.voucher,type:0
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_view_jour_voucher_form
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_view_jour_voucher_form
|
||||
msgid "Journal Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid ","
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
msgid "Set to Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: wizard_button:account.voucher.open,init,open:0
|
||||
msgid "Open Voucher Entries"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.model,name:account_voucher.model_account_voucher_line
|
||||
msgid "Voucher Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.move:0
|
||||
msgid "Total Credit"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,account_id:0
|
||||
#: field:account.voucher.line,account_id:0
|
||||
msgid "Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
msgid "D"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.account,level:0
|
||||
msgid "Level"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.move:0
|
||||
msgid "Account Entry Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.move:0
|
||||
msgid "Total Debit"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,amount:0
|
||||
#: field:account.voucher.line,amount:0
|
||||
#: rml:voucher.cash_amount:0
|
||||
msgid "Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Receiver's Signature"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "No."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Amount (in words) :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher.line,account_analytic_id:0
|
||||
msgid "Analytic Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.move,voucher_type:0
|
||||
#: selection:account.voucher,type:0
|
||||
#: selection:account.voucher.open,init,type:0
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_view_jour_sale_voucher_form
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_view_jour_sale_voucher_form
|
||||
msgid "Journal Sale Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_receipt_vou_voucher_list
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_receipt_vou_voucher_list
|
||||
msgid "Receipt Vouchers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
msgid "Account :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "On Account of :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_payments_bankpay_voucher_list
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_payments_cashpay_voucher_list
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_payments_voucher_list
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_payments_voucher_list
|
||||
msgid "Payment Vouchers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
msgid "Create"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.account,type1:0
|
||||
#: selection:account.account.template,type1:0
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,number:0
|
||||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.move:0
|
||||
#: field:account.voucher,state:0
|
||||
#: wizard_field:account.voucher.open,init,state:0
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.account,type1:0
|
||||
#: selection:account.account.template,type1:0
|
||||
#: selection:account.voucher.line,type:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Debit"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,type:0
|
||||
#: field:account.voucher.line,type:0
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_voucher_list
|
||||
msgid "Voucher Entries"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Authorised Signatory"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_voucher_list
|
||||
msgid "Vouchers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher.line,voucher_id:0
|
||||
#: model:res.request.link,name:account_voucher.req_link_voucher
|
||||
msgid "Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: wizard_view:account.voucher.open,init:0
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_wizard_account_voucher_open
|
||||
msgid "Open Vouchers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Dated :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_receipt_cashreceipt_voucher_list
|
||||
msgid "Cash Receipts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,partner_id:0
|
||||
#: field:account.voucher.line,partner_id:0
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_view_bank_pay_voucher_form
|
||||
msgid "New Bank Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,payment_ids:0
|
||||
msgid "Voucher Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,currency_id:0
|
||||
msgid "Currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.move:0
|
||||
#: field:account.move,narration:0
|
||||
#: view:account.voucher:0
|
||||
#: field:account.voucher,narration:0
|
||||
msgid "Narration"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,reference:0
|
||||
msgid "Voucher Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_view_cash_rec_voucher_form
|
||||
msgid "New Cash Receipt"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.actions.report.xml,name:account_voucher.report_account_voucher_amt
|
||||
msgid "Voucher Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.account,open_bal:0
|
||||
msgid "Opening Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.voucher,state:0
|
||||
#: selection:account.voucher.open,init,state:0
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "PRO-FORMA"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_receipt_cashreceipt_voucher_list
|
||||
msgid "Cash Receipt"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_view_cash_pay_voucher_form
|
||||
msgid "New Cash Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.move:0
|
||||
msgid "Optional Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
msgid "General Entries"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,date:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid ":"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.account,type1:0
|
||||
#: field:account.account.template,type1:0
|
||||
msgid "Dr/Cr"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.actions.report.xml,name:account_voucher.report_account_voucher
|
||||
msgid "Voucher Report (Cr/Dr)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.move,voucher_type:0
|
||||
#: wizard_field:account.voucher.open,init,type:0
|
||||
msgid "Voucher Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.account,type1:0
|
||||
#: selection:account.account.template,type1:0
|
||||
#: selection:account.voucher.line,type:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Credit"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Through :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,reference_type:0
|
||||
msgid "Reference Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.model,name:account_voucher.model_account_voucher
|
||||
msgid "Accounting Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,period_id:0
|
||||
msgid "Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_payments_bankpay_voucher_list
|
||||
msgid "Bank Payments"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.move:0
|
||||
msgid "General Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: wizard_field:account.voucher.open,init,period_ids:0
|
||||
msgid "Periods"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: selection:account.voucher,state:0
|
||||
#: wizard_button:account.voucher.open,init,end:0
|
||||
#: selection:account.voucher.open,init,state:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
#: selection:account.voucher,state:0
|
||||
#: selection:account.voucher.open,init,state:0
|
||||
msgid "Pro-forma"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
msgid "Other Info"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.module.module,shortdesc:account_voucher.module_meta_information
|
||||
msgid "Accounting Voucher Entries"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:res.currency,sub_name:0
|
||||
msgid "Sub Currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_other_voucher_list
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_other_voucher_list
|
||||
msgid "Other Vouchers"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher.line,name:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Canceled"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.move,voucher_type:0
|
||||
#: selection:account.voucher,type:0
|
||||
#: selection:account.voucher.open,init,type:0
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_view_cash_pay_voucher_form
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Cash Payment Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_receipt_bakreceipt_voucher_list
|
||||
msgid "Bank Receipt"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "-"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.move,voucher_type:0
|
||||
#: selection:account.voucher,type:0
|
||||
#: selection:account.voucher.open,init,type:0
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_view_jour_pur_voucher_form
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_view_jour_pur_voucher_form
|
||||
msgid "Journal Purchase Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.account:0
|
||||
msgid "Closing Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher.line,ref:0
|
||||
msgid "Ref."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.voucher,state:0
|
||||
#: selection:account.voucher.open,init,state:0
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Posted"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,name:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,move_ids:0
|
||||
msgid "Real Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.actions.wizard,name:account_voucher.wizard_account_voucher_open
|
||||
msgid "Open a Voucher Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,move_id:0
|
||||
msgid "Account Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
msgid "Entry Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_view_bank_rec_voucher_form
|
||||
msgid "New Bank Receipt"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: model:ir.ui.menu,name:account_voucher.menu_action_payments_cashpay_voucher_list
|
||||
msgid "Cash Payments"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.move,voucher_type:0
|
||||
#: selection:account.voucher,type:0
|
||||
#: selection:account.voucher.open,init,type:0
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_view_cash_rec_voucher_form
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Cash Receipt Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.move,voucher_type:0
|
||||
#: selection:account.voucher,type:0
|
||||
#: selection:account.voucher.open,init,type:0
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_view_bank_pay_voucher_form
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Bank Payment Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: selection:account.move,voucher_type:0
|
||||
#: selection:account.voucher,type:0
|
||||
#: selection:account.voucher.open,init,type:0
|
||||
#: model:ir.actions.act_window,name:account_voucher.action_view_bank_rec_voucher_form
|
||||
#: rml:voucher.cash_amount:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Bank Receipt Voucher"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.account,journal_id:0
|
||||
#: field:account.voucher,journal_id:0
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
@@ -104,7 +104,7 @@
|
||||
<para style="P2">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P24">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P2">Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
|
||||
|
||||
<blockTable colWidths="49.0,143.0,116.0,69.0,106.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -171,13 +171,14 @@
|
||||
<blockTable colWidths="482.0" style="voucher_lines">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P20">[[ repeatIn(voucher.move_ids,'move_ids') ]] <font>[[ (not move_ids) and removeParentNode('blockTable') ]]</font></para>
|
||||
<para style="P20">[[ repeatIn(voucher.move_ids,'move_ids') ]] </para>
|
||||
<blockTable colWidths="251.0,110.0,115.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">[[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']] :</para>
|
||||
<para style="P28">[[ move_ids.account_id.name ]] </para>
|
||||
<para style="P28"><i>[[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]]</i></para>
|
||||
<!--para style="P31">[[ get_ref(voucher.id,move_ids) ]]</para-->
|
||||
</td>
|
||||
<td>
|
||||
<para style="P21">[[ move_ids.debit ]]</para>
|
||||
|
||||
Regular → Executable
@@ -214,7 +214,7 @@ class account_voucher(osv.osv):
|
||||
|
||||
for il in iml:
|
||||
if il['account_analytic_id']:
|
||||
if inv.type in ('pay_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_voucher','journal_pur_voucher'):
|
||||
if inv.type in ('pay_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_vou','journal_pur_voucher'):
|
||||
ref = inv.reference
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, inv.number)
|
||||
@@ -244,7 +244,7 @@ class account_voucher(osv.osv):
|
||||
diff_currency_p = inv.currency_id.id <> company_currency
|
||||
|
||||
total = 0
|
||||
if inv.type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_voucher','journal_pur_voucher'):
|
||||
if inv.type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_vou','journal_pur_voucher'):
|
||||
ref = inv.reference
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, inv.number)
|
||||
@@ -508,12 +508,11 @@ class VoucherLine(osv.osv):
|
||||
res.append(self.move_line_get_item(cr, uid, line, context))
|
||||
return res
|
||||
|
||||
def onchange_partner(self, cr, uid, ids, partner_id, ttype,type1):
|
||||
def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1):
|
||||
if not partner_id:
|
||||
return {'value' : {'account_id' : False, 'type' : False ,'amount':False}}
|
||||
obj = self.pool.get('res.partner')
|
||||
account_id = False
|
||||
|
||||
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
|
||||
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
|
||||
balance = obj.browse(cr,uid,partner_id).credit
|
||||
|
||||
@@ -231,8 +231,8 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" eval="view_voucher_form"/>
|
||||
<field name="domain">[('type','=','journal_sale_voucher')]</field>
|
||||
<field name="context">{'type':'journal_sale_voucher'}</field>
|
||||
<field name="domain">[('type','=','journal_sale_vou')]</field>
|
||||
<field name="context">{'type':'journal_sale_vou'}</field>
|
||||
</record>
|
||||
<menuitem name="Financial Management/Voucher Entries/Other Vouchers/Journal Sale Voucher" id="menu_action_view_jour_sale_voucher_form" action="action_view_jour_sale_voucher_form"/>
|
||||
<record model="ir.actions.act_window" id="action_view_jour_pur_voucher_form">
|
||||
|
||||
@@ -45,7 +45,7 @@ _types = {
|
||||
'rec_voucher':'Cash Receipt Voucher',
|
||||
'bank_rec_voucher':'Bank Receipt Voucher',
|
||||
'cont_voucher':'Contra Voucher',
|
||||
'journal_sale_voucher':'Journal Sale Voucher',
|
||||
'journal_sale_vou':'Journal Sale Voucher',
|
||||
'journal_pur_voucher':'Journal Purchase Voucher'
|
||||
}
|
||||
_states = {
|
||||
@@ -62,7 +62,7 @@ _voucher_fields = {
|
||||
('rec_voucher','Cash Receipt Voucher'),
|
||||
('bank_rec_voucher','Bank Receipt Voucher'),
|
||||
('cont_voucher','Contra Voucher'),
|
||||
('journal_sale_voucher','Journal Sale Voucher'),
|
||||
('journal_sale_vou','Journal Sale Voucher'),
|
||||
('journal_pur_voucher','Journal Purchase Voucher')], 'required':True},
|
||||
'state': {'string':'State', 'type':'selection', 'selection':[
|
||||
('draft','Draft'),
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class auction_artists(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(auction_artists, self).__init__(cr, uid, name, context)
|
||||
super(auction_artists, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class auction_bids(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(auction_bids, self).__init__(cr, uid, name, context)
|
||||
super(auction_bids, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
})
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class auction_buyer_result(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(auction_buyer_result, self).__init__(cr, uid, name, context)
|
||||
super(auction_buyer_result, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class auction_catelog(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(auction_catelog, self).__init__(cr, uid, name, context)
|
||||
super(auction_catelog, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class auction_objects(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(auction_objects, self).__init__(cr, uid, name, context)
|
||||
super(auction_objects, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
#'lines': self.lines
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class auction_result(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(auction_result, self).__init__(cr, uid, name, context)
|
||||
super(auction_result, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ from report import report_sxw
|
||||
class auction_total_rml(report_sxw.rml_parse):
|
||||
total_obj=[]
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(auction_total_rml, self).__init__(cr, uid, name, context)
|
||||
super(auction_total_rml, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'sum_taxes':self.sum_taxes,
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class bids_lots(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(bids_lots, self).__init__(cr, uid, name, context)
|
||||
super(bids_lots, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
})
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class bids_phones_details(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(bids_phones_details, self).__init__(cr, uid, name, context)
|
||||
super(bids_phones_details, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
})
|
||||
|
||||
@@ -30,7 +30,7 @@ class buyer_form_report(report_sxw.rml_parse):
|
||||
count=0
|
||||
c=0
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(buyer_form_report, self).__init__(cr, uid, name, context)
|
||||
super(buyer_form_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'sum_taxes': self.sum_taxes,
|
||||
|
||||
@@ -34,7 +34,7 @@ class buyer_list(report_sxw.rml_parse):
|
||||
sum_buyer_price_val=0.0
|
||||
sum_lot_val=0.0
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(buyer_list, self).__init__(cr, uid, name, context)
|
||||
super(buyer_list, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lines_lots_from_auction' : self.lines_lots_from_auction,
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class catelogwithpictures(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(catelogwithpictures, self).__init__(cr, uid, name, context)
|
||||
super(catelogwithpictures, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ from report import report_sxw
|
||||
|
||||
class deposit_seller(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(deposit_seller, self).__init__(cr, uid, name, context)
|
||||
super(deposit_seller, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class lots_list(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(lots_list, self).__init__(cr, uid, name, context)
|
||||
super(lots_list, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'bid_line' : self.bid_line
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class lots_list_inventory(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(lots_list_inventory, self).__init__(cr, uid, name, context)
|
||||
super(lots_list_inventory, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'bid_line' : self.bid_line
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class lots_list_llandscape(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(lots_list_landscape, self).__init__(cr, uid, name, context)
|
||||
super(lots_list_landscape, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ from report import report_sxw
|
||||
|
||||
class auction_code_produit(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(auction_code_produit, self).__init__(cr, uid, name, context)
|
||||
super(auction_code_produit, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
})
|
||||
|
||||
@@ -28,7 +28,7 @@ from osv import osv
|
||||
|
||||
class seller_form_report(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(seller_form_report, self).__init__(cr, uid, name, context)
|
||||
super(seller_form_report, self).__init__(cr, uid, name, context=context)
|
||||
lot=self.pool.get('auction.lots').browse(cr,uid,uid)
|
||||
#address=lot.bord_vnd_id.address_get(self.cr,self.uid,[partner.id])
|
||||
# partner=lot.bord_vnd_id.partner_id
|
||||
|
||||
@@ -63,18 +63,18 @@ class audittrail_rule(osv.osv):
|
||||
_('WARNING:audittrail is not part of the pool'),
|
||||
_('Change audittrail depends -- Setting rule as DRAFT'))
|
||||
self.write(cr, uid, [thisrule.id], {"state": "draft"})
|
||||
val={
|
||||
"name":'View Log',
|
||||
"res_model":'audittrail.log',
|
||||
"src_model":thisrule.object_id.model,
|
||||
"domain":"[('res_id', '=', active_id)]"
|
||||
|
||||
}
|
||||
id=self.pool.get('ir.actions.act_window').create(cr, uid, val)
|
||||
self.write(cr, uid, ids, {"state": "subscribed","action_id":id})
|
||||
keyword = 'client_action_relate'
|
||||
value = 'ir.actions.act_window,'+str(id)
|
||||
res=self.pool.get('ir.model.data').ir_set(cr, uid, 'action', keyword,'View_log_'+thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
|
||||
val={
|
||||
"name":'View Log',
|
||||
"res_model":'audittrail.log',
|
||||
"src_model":thisrule.object_id.model,
|
||||
"domain":"[('object_id','=',"+str(thisrule.object_id.id)+"),('res_id', '=', active_id)]"
|
||||
|
||||
}
|
||||
id=self.pool.get('ir.actions.act_window').create(cr, uid, val)
|
||||
self.write(cr, uid, [thisrule.id], {"state": "subscribed","action_id":id})
|
||||
keyword = 'client_action_relate'
|
||||
value = 'ir.actions.act_window,'+str(id)
|
||||
res=self.pool.get('ir.model.data').ir_set(cr, uid, 'action', keyword,'View_log_'+thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
|
||||
return True
|
||||
|
||||
|
||||
@@ -84,14 +84,14 @@ class audittrail_rule(osv.osv):
|
||||
if thisrule.id in self.__functions :
|
||||
for function in self.__functions[thisrule.id]:
|
||||
setattr(function[0], function[1], function[2])
|
||||
w_id=self.pool.get('ir.actions.act_window').search(cr, uid, [('name','=','View Log'),('res_model','=','audittrail.log'),('src_model','=',thisrule.object_id.model)])
|
||||
self.pool.get('ir.actions.act_window').unlink(cr, uid,w_id )
|
||||
val_obj=self.pool.get('ir.values')
|
||||
value="ir.actions.act_window"+','+str(w_id[0])
|
||||
val_id=val_obj.search(cr, uid, [('model','=',thisrule.object_id.model),('value','=',value)])
|
||||
if val_id:
|
||||
res = ir.ir_del(cr, uid, val_id[0])
|
||||
self.write(cr, uid, ids, {"state": "draft"})
|
||||
w_id=self.pool.get('ir.actions.act_window').search(cr, uid, [('name','=','View Log'),('res_model','=','audittrail.log'),('src_model','=',thisrule.object_id.model)])
|
||||
self.pool.get('ir.actions.act_window').unlink(cr, uid,w_id )
|
||||
val_obj=self.pool.get('ir.values')
|
||||
value="ir.actions.act_window"+','+str(w_id[0])
|
||||
val_id=val_obj.search(cr, uid, [('model','=',thisrule.object_id.model),('value','=',value)])
|
||||
if val_id:
|
||||
res = ir.ir_del(cr, uid, val_id[0])
|
||||
self.write(cr, uid, [thisrule.id], {"state": "draft"})
|
||||
return True
|
||||
|
||||
audittrail_rule()
|
||||
|
||||
@@ -2,3 +2,6 @@
|
||||
"access_audittrail_rule_group_system","audittrail rule system","model_audittrail_rule","base.group_system",1,1,1,1
|
||||
"access_audittrail_log_group_system","audittrail log system","model_audittrail_log","base.group_system",1,1,1,1
|
||||
"access_audittrail_logline_group_system","audittrail log line system","model_audittrail_log_line","base.group_system",1,1,1,1
|
||||
"access_audittrail_rule_all_users","audittrail rule all","model_audittrail_rule","base.group_user",1,0,0,0
|
||||
"access_audittrail_log_all_users","audittrail log all","model_audittrail_log","base.group_user",1,0,1,0
|
||||
"access_audittrail_log_line_all_users","audittrail log line all","model_audittrail_log_line","base.group_user",1,0,1,0
|
||||
|
||||
|
@@ -34,6 +34,13 @@ class res_partner_contact(osv.osv):
|
||||
res = [(r['shortcut'], r['name']) for r in res if r['domain']=='contact']
|
||||
return res
|
||||
|
||||
def _main_job(self, cr, uid, ids, fields, arg, context=None):
|
||||
res = dict.fromkeys(ids, False)
|
||||
for contact in self.browse(cr, uid, ids, context):
|
||||
if contact.job_ids:
|
||||
res[contact.id] = contact.job_ids[0].name_get()[0]
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Last Name', size=30,required=True),
|
||||
'first_name': fields.char('First Name', size=30),
|
||||
@@ -47,7 +54,7 @@ class res_partner_contact(osv.osv):
|
||||
'active' : fields.boolean('Active'),
|
||||
'partner_id':fields.related('job_ids','address_id','partner_id',type='many2one', relation='res.partner', string='Main Employer'),
|
||||
'function_id':fields.related('job_ids','function_id',type='many2one', relation='res.partner.function', string='Main Function'),
|
||||
'job_id':fields.related('job_ids',type='many2one', relation='res.partner.job', string='Main Job'),
|
||||
'job_id': fields.function(_main_job, method=True, type='many2one', relation='res.partner.job', string='Main Job'),
|
||||
'email': fields.char('E-Mail', size=240),
|
||||
}
|
||||
_defaults = {
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
<field name="inherit_id" ref="base.view_partner_address_form1"/>
|
||||
<field name='type'>form</field>
|
||||
<field name='arch' type='xml'>
|
||||
<field name="email" position="replace">
|
||||
<field name="email" position="after">
|
||||
<field name="job_ids" mode="tree,form" colspan="4">
|
||||
<tree string="Contacts" editable="top">
|
||||
<field name="contact_id"/>
|
||||
|
||||
@@ -259,8 +259,8 @@ class report_creator(osv.osv):
|
||||
ret_str = ret_str[0:len(ret_str)-3]
|
||||
if ret_str.endswith('or'):
|
||||
ret_str = ret_str[0:len(ret_str)-2]
|
||||
ret_str = ret_str.strip()
|
||||
return ret_str
|
||||
ret_str = ret_str.strip()
|
||||
return ret_str % {'uid' : uid}
|
||||
|
||||
def _id_get(self, cr, uid, id, context):
|
||||
# return 'min(sale_order_line.id)'
|
||||
|
||||
@@ -86,6 +86,8 @@
|
||||
<field name="condition"/>
|
||||
</form>
|
||||
</field>
|
||||
<separator string="Legend" colspan="4"/>
|
||||
<label string="Use %%(uid)s to filter by the connected user" align="0.0"/>
|
||||
</page><page string="Security">
|
||||
<separator string="Authorized Groups (empty for all)" colspan="4"/>
|
||||
<field name="group_ids" colspan="4" nolabel="1"/>
|
||||
@@ -97,6 +99,7 @@
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="base_report_creator_action">
|
||||
<field name="name">Custom Report</field>
|
||||
<field name="res_model">base_report_creator.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
import wizard
|
||||
import netsvc
|
||||
import pooler
|
||||
import tools
|
||||
|
||||
relation_type=['one2many','many2one','many2many']
|
||||
char_type = ['char','text','selection']
|
||||
@@ -122,25 +123,29 @@ def _set_filter_value(self, cr, uid, data, context):
|
||||
model_pool = pooler.get_pool(cr.dbname).get(model_name)
|
||||
table_name = model_pool._table
|
||||
model_name = model_pool._description
|
||||
|
||||
|
||||
if field_type:
|
||||
if field_type == 'boolean':
|
||||
if value_data == 1:
|
||||
value_data = 'true'
|
||||
else:
|
||||
value_data = 'false'
|
||||
|
||||
if field_type in ['float','integer']:
|
||||
value_data = value_data or 0
|
||||
|
||||
if field_type == 'many2many' and value_data and len(value_data):
|
||||
fields_list = set_field_operator(self,table_name+"."+field_data['name'],field_data['ttype'],form_data['operator'],value_data[0][2])
|
||||
else:
|
||||
fields_list = set_field_operator(self,table_name+"."+field_data['name'],field_data['ttype'],form_data['operator'],value_data)
|
||||
if fields_list:
|
||||
create_dict = {
|
||||
'name':model_name + "/" +field_data['field_description'] +" "+ mapping_fields[form_data['operator']] + " " + str(fields_list[2]) + " ",
|
||||
'expression':' '.join(fields_list),
|
||||
'name':model_name + "/" +field_data['field_description'] +" "+ mapping_fields[form_data['operator']] + " " + tools.ustr(fields_list[2]) + " ",
|
||||
'expression':' '.join(map(tools.ustr,fields_list)),
|
||||
'report_id':data['id'],
|
||||
'condition' : form_data['condition']
|
||||
}
|
||||
pooler.get_pool(cr.dbname).get('base_report_creator.report.filter').create(cr,uid,create_dict)
|
||||
pooler.get_pool(cr.dbname).get('base_report_creator.report.filter').create(cr,uid,create_dict,context)
|
||||
#end if field_type == 'many2many' and value_data and len(value_data):
|
||||
# pooler.get_pool(cr.dbname).get('custom.report.filter').create(cr,uid,form_data)
|
||||
#end if field_type:
|
||||
|
||||
+21
-10
@@ -378,10 +378,10 @@ class res_partner(osv.osv):
|
||||
22: 'K',
|
||||
23: 'E',
|
||||
}
|
||||
|
||||
if vat[0] in ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'):
|
||||
#Legal persons with profit aim
|
||||
if vat[0] in ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'U', 'V'):
|
||||
try:
|
||||
int(vat[1:])
|
||||
int(vat[1:8])
|
||||
except:
|
||||
return False
|
||||
sum = mult_add(2, int(vat[1])) + int(vat[2]) + \
|
||||
@@ -391,10 +391,11 @@ class res_partner(osv.osv):
|
||||
check = 10 - (sum % 10)
|
||||
if check == 10:
|
||||
check = 0
|
||||
if check != int(vat[8]):
|
||||
return False
|
||||
# if check != int(vat[8]):
|
||||
# return False
|
||||
return True
|
||||
elif vat[0] in ('N', 'P', 'Q', 'S'):
|
||||
#Legal persons with non-profit aim
|
||||
elif vat[0] in ('N', 'P', 'Q', 'R', 'S', 'W'):
|
||||
try:
|
||||
int(vat[1:8])
|
||||
except:
|
||||
@@ -408,17 +409,26 @@ class res_partner(osv.osv):
|
||||
if check != vat[8]:
|
||||
return False
|
||||
return True
|
||||
elif vat[0] in ('K', 'L', 'M', 'X'):
|
||||
#Foreign natural persons, under age 14 or non-residents
|
||||
elif vat[0] in ('K', 'L', 'M', 'X', 'Y', 'Z'):
|
||||
if vat[0] == 'Y':
|
||||
check_value = '1' + vat[1:8]
|
||||
elif vat[0] == 'Z':
|
||||
check_value = '2' + vat[1:8]
|
||||
else:
|
||||
check_value = vat[1:8]
|
||||
|
||||
try:
|
||||
int(vat[1:8])
|
||||
int(check_value)
|
||||
except:
|
||||
return False
|
||||
check = 1 + (int(vat[1:8]) % 23)
|
||||
check = 1 + (int(check_value) % 23)
|
||||
|
||||
check = conv[check]
|
||||
if check != vat[8]:
|
||||
return False
|
||||
return True
|
||||
#Spanish natural persons
|
||||
else:
|
||||
try:
|
||||
int(vat[:8])
|
||||
@@ -905,7 +915,8 @@ class res_partner(osv.osv):
|
||||
except:
|
||||
return False
|
||||
|
||||
if len(vat) == 10:
|
||||
if len(vat) >= 2 and len(vat) <= 10:
|
||||
vat = (10 - len(vat)) * '0' + vat
|
||||
sum = 7 * int(vat[0]) + 5 * int(vat[1]) + 3 * int(vat[2]) + \
|
||||
2 * int(vat[3]) + 1 * int(vat[4]) + 7 * int(vat[5]) + \
|
||||
5 * int(vat[6]) + 3 * int(vat[7]) + 2 * int(vat[8])
|
||||
|
||||
@@ -276,6 +276,7 @@
|
||||
<field name="name">crm.case.form</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority" eval="1"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Cases">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
@@ -404,7 +405,7 @@
|
||||
|
||||
|
||||
<record id="crm_case_section_open_act" model="ir.actions.act_window">
|
||||
<field name="name">crm.case.section.open</field>
|
||||
<field name="name">Cases</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="domain">[('section_id','child_of',[active_id])]</field>
|
||||
<field name="view_type">form</field>
|
||||
|
||||
@@ -62,8 +62,8 @@ class rpc_proxy(object):
|
||||
return self.rpc.execute(self.dbname, self.user_id, self.passwd, *request)
|
||||
|
||||
class email_parser(object):
|
||||
def __init__(self, uid, password, section, email, email_default, dbname):
|
||||
self.rpc = rpc_proxy(uid, password, dbname=dbname)
|
||||
def __init__(self, uid, password, section, email, email_default, dbname, host):
|
||||
self.rpc = rpc_proxy(uid, password, host=host, dbname=dbname)
|
||||
try:
|
||||
self.section_id = int(section)
|
||||
except:
|
||||
@@ -315,9 +315,11 @@ if __name__ == '__main__':
|
||||
parser.add_option("-s", "--section", dest="section", help="ID or code of the case section", default="support")
|
||||
parser.add_option("-m", "--default", dest="default", help="Default eMail in case of any trouble.", default=None)
|
||||
parser.add_option("-d", "--dbname", dest="dbname", help="Database name (default: terp)", default='terp')
|
||||
parser.add_option("--host", dest="host", help="Hostname of the Open ERP Server", default="localhost")
|
||||
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
parser = email_parser(options.userid, options.password, options.section, options.email, options.default, dbname=options.dbname)
|
||||
parser = email_parser(options.userid, options.password, options.section, options.email, options.default, dbname=options.dbname, host=options.host)
|
||||
|
||||
msg_txt = email.message_from_file(sys.stdin)
|
||||
|
||||
|
||||
@@ -531,17 +531,21 @@ class document_file(osv.osv):
|
||||
result[id] = base64.encodestring(value)
|
||||
except:
|
||||
result[id]=''
|
||||
|
||||
if context.get('bin_size', False):
|
||||
result[id] = tools.human_size(len(result[id]))
|
||||
|
||||
# if context.get('bin_size', False):
|
||||
# result[id] = tools.human_size(result[id])
|
||||
return result
|
||||
|
||||
#
|
||||
# This code can be improved
|
||||
#
|
||||
def _data_set(self, cr, obj, id, name, value, uid=None, context={}):
|
||||
def _data_set(self, cr, uid, id, name, value, args=None, context={}):
|
||||
if not value:
|
||||
filename = self.browse(cr, uid, id, context).store_fname
|
||||
try:
|
||||
os.unlink(os.path.join(self._get_filestore(cr), filename))
|
||||
except:
|
||||
pass
|
||||
cr.execute('update ir_attachment set store_fname=NULL WHERE id=%s', (id,) )
|
||||
return True
|
||||
#if (not context) or context.get('store_method','fs')=='fs':
|
||||
try:
|
||||
|
||||
@@ -1412,7 +1412,7 @@ class FTPHandler(asynchat.async_chat):
|
||||
established connection.
|
||||
- (instance) server: the ftp server class instance.
|
||||
"""
|
||||
asynchat.async_chat.__init__(self, conn=conn)
|
||||
asynchat.async_chat.__init__(self, conn)
|
||||
self.server = server
|
||||
self.remote_ip, self.remote_port = self.socket.getpeername()[:2]
|
||||
self.in_buffer = []
|
||||
|
||||
@@ -128,6 +128,7 @@ class document_directory_content(osv.osv):
|
||||
event.add('last-modified').value = ics_datetime(perm[0]['write_date'][:19])
|
||||
for field in node.content.ics_field_ids:
|
||||
value = getattr(obj, field.field_id.name)
|
||||
value = value and tools.ustr(value)
|
||||
if (not value) and field.name=='uid':
|
||||
value = 'OpenERP-%s_%s@%s' % (node.content.ics_object_id.model, str(obj.id), cr.dbname,)
|
||||
obj_class.write(cr, uid, [obj.id], {field.field_id.name: value})
|
||||
@@ -146,7 +147,7 @@ class document_directory_content(osv.osv):
|
||||
else:
|
||||
value = ics_datetime(value)
|
||||
event.add(field.name).value = value
|
||||
s= StringIO.StringIO(cal.serialize().encode('utf8'))
|
||||
s= StringIO.StringIO(cal.serialize())
|
||||
s.name = node
|
||||
cr.commit()
|
||||
return s
|
||||
|
||||
@@ -28,7 +28,7 @@ import datetime
|
||||
|
||||
class attendance_print(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(attendance_print, self).__init__(cr, uid, name, context)
|
||||
super(attendance_print, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lst': self._lst,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user