[MRG] from trunk

bzr revid: yannick.vaucher@camptocamp.com-20110927083733-jywphc0ljz6t0qun
This commit is contained in:
Yannick Vaucher
2011-09-27 10:37:33 +02:00
352 changed files with 27901 additions and 6184 deletions
+19 -11
View File
@@ -139,7 +139,7 @@ class account_account_type(osv.osv):
'Balance' will generally be used for cash accounts.
'Detail' will copy each existing journal item of the previous year, even the reconciled ones.
'Unreconciled' will copy only the journal items that were unreconciled on the first day of the new fiscal year."""),
'sign': fields.selection([(-1, 'Negative'), (1, 'Positive')], 'Sign on Reports', required=True, help='Allows you to change the sign of the balance amount displayed in the reports, so that you can see positive figures instead of negative ones in expenses accounts.'),
'sign': fields.selection([(-1, 'Reverse balance sign'), (1, 'Preserve balance sign')], 'Sign on Reports', required=True, help='For accounts that are typically more debited than credited and that you would like to print as negative amounts in your reports, you should reverse the sign of the balance; e.g.: Expense account. The same applies for accounts that are typically more credited than debited and that you would like to print as positive amounts in your reports; e.g.: Income account.'),
'report_type':fields.selection([
('none','/'),
('income','Profit & Loss (Income Accounts)'),
@@ -250,6 +250,7 @@ class account_account(osv.osv):
#compute for each account the balance/debit/credit from the move lines
accounts = {}
res = {}
null_result = dict((fn, 0.0) for fn in field_names)
if children_and_consolidated:
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
@@ -306,12 +307,11 @@ class account_account(osv.osv):
sums[current.id][fn] += sums[child.id][fn]
else:
sums[current.id][fn] += currency_obj.compute(cr, uid, child.company_id.currency_id.id, current.company_id.currency_id.id, sums[child.id][fn], context=context)
null_result = dict((fn, 0.0) for fn in field_names)
for id in ids:
res[id] = sums.get(id, null_result)
else:
for id in ids:
res[id] = 0.0
res[id] = null_result
return res
def _get_company_currency(self, cr, uid, ids, field_name, arg, context=None):
@@ -2637,6 +2637,10 @@ class account_fiscal_position_account_template(osv.osv):
account_fiscal_position_account_template()
# ---------------------------------------------------------
# Account Financial Report
# ---------------------------------------------------------
class account_financial_report(osv.osv):
_name = "account.financial.report"
_description = "Account Report"
@@ -2691,17 +2695,19 @@ class account_financial_report(osv.osv):
'parent_id': fields.many2one('account.financial.report', 'Parent'),
'children_ids': fields.one2many('account.financial.report', 'parent_id', 'Account Report'),
'sequence': fields.integer('Sequence'),
'note': fields.text('Notes'),
'balance': fields.function(_get_balance, 'Balance'),
'level': fields.function(_get_level, string='Level', store=True, type='integer'),
'type': fields.selection([
('sum','Sum'),
('sum','View'),
('accounts','Accounts'),
('account_report','Account Report'),
('account_type','Account Type'),
('account_report','Report Value'),
],'Type'),
'account_ids': fields.many2many('account.account', 'account_account_financial_report', 'report_line_id', 'account_id', 'Accounts'),
'note': fields.text('Notes'),
'account_report_id': fields.many2one('account.financial.report', 'Account Report'),
'balance': fields.function(_get_balance, 'Balance'),
'display_detail': fields.boolean('Display the account list'),
'level': fields.function(_get_level, string='Level', store=True, type='integer'),
'display_detail': fields.boolean('Display details', help='Display every account with its balance instead of the sum.'),
'account_report_id': fields.many2one('account.financial.report', 'Report Value'),
'account_type_ids': fields.many2many('account.account.type', 'account_account_financial_report_type', 'report_id', 'account_type_id', 'Account Types'),
}
_defaults = {
@@ -2710,7 +2716,9 @@ class account_financial_report(osv.osv):
account_financial_report()
# Multi charts of Accounts wizard
# ---------------------------------------------------------
# Account generation from template wizards
# ---------------------------------------------------------
class wizard_multi_charts_accounts(osv.osv_memory):
"""
+15 -5
View File
@@ -117,6 +117,12 @@ class account_bank_statement(osv.osv):
res[statement_id] = (currency_id, currency_names[currency_id])
return res
def _get_statement(self, cr, uid, ids, context=None):
result = {}
for line in self.pool.get('account.bank.statement.line').browse(cr, uid, ids, context=context):
result[line.statement_id.id] = True
return result.keys()
_order = "date desc, id desc"
_name = "account.bank.statement"
_description = "Bank Statement"
@@ -131,15 +137,19 @@ class account_bank_statement(osv.osv):
states={'confirm':[('readonly',True)]}),
'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'),
states={'confirm': [('readonly', True)]}),
'balance_end': fields.function(_end_balance, store=True, # store=True for account_cash_statement
string="Balance", help='Balance as calculated based on Starting Balance and transaction lines'),
'balance_end': fields.function(_end_balance,
store = {
'account.bank.statement': (lambda self, cr, uid, ids, c={}: ids, ['line_ids','move_line_ids'], 10),
'account.bank.statement.line': (_get_statement, ['amount'], 10),
},
string="Computed Balance", help='Balance as calculated based on Starting Balance and transaction lines'),
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
'line_ids': fields.one2many('account.bank.statement.line',
'statement_id', 'Statement lines',
states={'confirm':[('readonly', True)]}),
'move_line_ids': fields.one2many('account.move.line', 'statement_id',
'Entry lines', states={'confirm':[('readonly',True)]}),
'state': fields.selection([('draft', 'Draft'),
'state': fields.selection([('draft', 'New'),
('open','Open'), # used by cash statements
('confirm', 'Closed')],
'State', required=True, readonly="1",
@@ -306,7 +316,7 @@ class account_bank_statement(osv.osv):
return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
def check_status_condition(self, cr, uid, state, journal_type='bank'):
return state=='draft'
return state in ('draft','open')
def button_confirm_bank(self, cr, uid, ids, context=None):
obj_seq = self.pool.get('ir.sequence')
@@ -465,7 +475,7 @@ class account_bank_statement_line(osv.osv):
}
_defaults = {
'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
'date': lambda *a: time.strftime('%Y-%m-%d'),
'date': lambda self,cr,uid,context={}: context.get('date', time.strftime('%Y-%m-%d')),
'type': 'general',
}
+14 -13
View File
@@ -184,31 +184,33 @@ class account_cash_statement(osv.osv):
res['end'] = end_l
return res
def _get_statement(self, cr, uid, ids, context=None):
result = {}
for line in self.pool.get('account.bank.statement.line').browse(cr, uid, ids, context=context):
result[line.statement_id.id] = True
return result.keys()
_columns = {
'total_entry_encoding': fields.function(_get_sum_entry_encoding, store=True, string="Cash Transaction", help="Total cash transactions"),
'total_entry_encoding': fields.function(_get_sum_entry_encoding, string="Cash Transaction", help="Total cash transactions",
store = {
'account.bank.statement': (lambda self, cr, uid, ids, c={}: ids, ['line_ids','move_line_ids'], 10),
'account.bank.statement.line': (_get_statement, ['amount'], 10),
}),
'closing_date': fields.datetime("Closed On"),
'balance_end_cash': fields.function(_balance_end_cash, store=True, string='Balance', help="Closing balance based on cashBox"),
'balance_end_cash': fields.function(_balance_end_cash, store=True, string='Closing Balance', help="Closing balance based on cashBox"),
'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'),
'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
'user_id': fields.many2one('res.users', 'Responsible', required=False),
}
_defaults = {
'state': 'draft',
'date': lambda *a: time.strftime("%Y-%m-%d %H:%M:%S"),
'date': lambda self,cr,uid,context={}: context.get('date', time.strftime("%Y-%m-%d %H:%M:%S")),
'user_id': lambda self, cr, uid, context=None: uid,
'starting_details_ids': _get_cash_open_box_lines,
'ending_details_ids': _get_default_cash_close_box_lines
}
def create(self, cr, uid, vals, context=None):
sql = [
('journal_id', '=', vals.get('journal_id', False)),
('state', '=', 'open')
]
open_jrnl = self.search(cr, uid, sql)
if open_jrnl:
raise osv.except_osv(_('Error'), _('You can not have two open register for the same journal!'))
if self.pool.get('account.journal').browse(cr, uid, vals['journal_id'], context=context).type == 'cash':
open_close = self._get_cash_open_close_box_lines(cr, uid, context)
if vals.get('starting_details_ids', False):
@@ -300,7 +302,6 @@ class account_cash_statement(osv.osv):
})
vals.update({
'date': time.strftime("%Y-%m-%d %H:%M:%S"),
'state': 'open',
})
self.write(cr, uid, [statement.id], vals, context=context)
@@ -310,7 +311,7 @@ class account_cash_statement(osv.osv):
if journal_type == 'bank':
return super(account_cash_statement, self).balance_check(cr, uid, cash_id, journal_type, context)
if not self._equal_balance(cr, uid, cash_id, context):
raise osv.except_osv(_('Error !'), _('CashBox Balance is not matching with Calculated Balance !'))
raise osv.except_osv(_('Error !'), _('The closing balance should be the same than the computed balance !'))
return True
def statement_close(self, cr, uid, ids, journal_type='bank', context=None):
+53
View File
@@ -85,5 +85,58 @@
<field name="type">automatic</field>
</record>
<record id="action_bank_account_configuration_installer" model="ir.actions.act_window">
<field name="name">Define your Bank Account</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner.bank</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
</record>
<record id="bank_account_configuration_todo" model="ir.actions.todo">
<field name="action_id" ref="action_bank_account_configuration_installer" />
<field name="category_id" ref="category_accounting_configuration" />
</record>
<record id="action_view_financial_accounts_installer" model="ir.actions.act_window">
<field name="name">Review your Financial Accounts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="view_financial_accounts_todo" model="ir.actions.todo">
<field name="action_id" ref="action_view_financial_accounts_installer" />
<field name="category_id" ref="category_accounting_configuration" />
<field name="groups_id" eval="[(6, 0, [ref('account.group_account_user')])]" />
</record>
<record id="action_review_financial_journals_installer" model="ir.actions.act_window">
<field name="name">Review your Financial Journal</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.journal</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="review_financial_journals_todo" model="ir.actions.todo">
<field name="action_id" ref="action_review_financial_journals_installer" />
<field name="category_id" ref="category_accounting_configuration" />
<field name="groups_id" eval="[(6, 0, [ref('account.group_account_user')])]" />
</record>
<record id="action_review_payment_terms_installer" model="ir.actions.act_window">
<field name="name">Review your Payment Terms</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.payment.term</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="review_payment_terms_todo" model="ir.actions.todo">
<field name="action_id" ref="action_review_payment_terms_installer" />
<field name="category_id" ref="category_accounting_configuration" />
<field name="groups_id" eval="[(6, 0, [ref('account.group_account_user')])]" />
</record>
</data>
</openerp>
+2 -2
View File
@@ -205,7 +205,7 @@
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/>
<group col="6" colspan="4">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
@@ -300,7 +300,7 @@
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/>
<group col="8" colspan="4" groups="base.group_user">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
+31 -19
View File
@@ -564,7 +564,7 @@
</group>
<notebook colspan="4">
<page string="Transaction" name="statement_line_ids">
<field colspan="4" name="line_ids" nolabel="1">
<field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
<tree editable="bottom" string="Statement lines">
<field name="sequence" readonly="1" invisible="1"/>
<field name="date" groups="base.group_extended"/>
@@ -596,7 +596,7 @@
</page>
</notebook>
<group col="8" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
<field name="balance_end"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
@@ -749,6 +749,7 @@
<group col="2" colspan="2">
<separator string="Reporting Configuration" colspan="4"/>
<field name="report_type" select="2"/>
<field name="sign" />
</group>
<group col="2" colspan="2">
<separator string="Closing Method" colspan="4"/>
@@ -2555,7 +2556,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" domain="[('type','=','cash')]" select="1" widget="selection"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
<field name="user_id" select="1" readonly="1"/>
<field name="period_id" select="1"/>
<field name="currency" invisible="1"/>
@@ -2563,7 +2564,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
<notebook colspan="4">
<page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
<field colspan="4" name="line_ids" nolabel="1">
<field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
<tree editable="bottom" string="Statement lines">
<field name="sequence" invisible="1"/>
<field name="date" groups="base.group_extended"/>
@@ -2637,12 +2638,12 @@ action = pool.get('res.config').next(cr, uid, [], context)
</group>
<group col="2" colspan="2">
<separator string="Closing Balance" colspan="4"/>
<field name="balance_end" string="Calculated Balance"/>
<field name="balance_end_cash" string="CashBox Balance"/>
<field name="balance_end"/>
<field name="balance_end_cash"/>
</group>
</group>
<group col="8" colspan="4">
<field name="state" colspan="4"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm" colspan="4"/>
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
<button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
<button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>
@@ -2713,16 +2714,27 @@ action = pool.get('res.config').next(cr, uid, [], context)
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Report">
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
<field name="type"/>
<field name="account_report_id" attrs="{'readonly': [('type', '!=', 'account_report')]}"/>
<separator string="Accounts" colspan="4"/>
<field name="display_detail" attrs="{'readonly': [('type', '!=', 'accounts')]}"/>
<field name="account_ids" nolabel="1" colspan="4" attrs="{'readonly': [('type', '!=', 'accounts')]}"/>
<separator string="Notes" colspan="4"/>
<field name="note" nolabel="1" colspan="4"/>
<group col="6" colspan="4">
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
<field name="type"/>
</group>
<notebook colspan="4">
<page string="Report" attrs="{'invisible': [('state','!=','confirm')]}">
<field name="display_detail" attrs="{'invisible': [('type','!=','accounts')]}"/>
<newline/>
<field name="account_ids" nolabel="1" colspan="6" attrs="{'invisible': [('type', '!=', 'accounts')]}"/>
<newline/>
<field name="account_report_id" attrs="{'invisible': [('type', '!=', 'account_report')]}"/>
<newline/>
<field name="account_type_ids" nolabel="1" attrs="{'invisible': [('type', '!=', 'account_type')]}"/>
<newline/>
</page>
<page string="Notes" attrs="{'invisible': [('state','!=','confirm')]}">
<field name="note" nolabel="1" colspan="4"/>
</page>
</notebook>
</form>
</field>
</record>
@@ -2763,7 +2775,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
</record>
<record id="action_account_financial_report_tree" model="ir.actions.act_window">
<field name="name">Account Reports</field>
<field name="name">Financial Reports</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.financial.report</field>
<field name="view_type">form</field>
@@ -2790,7 +2802,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
</field>
</record>
<record id="action_account_report_tree_hierarchy" model="ir.actions.act_window">
<field name="name">Account Reports Hierarchy</field>
<field name="name">Financial Reports Hierarchy</field>
<field name="res_model">account.financial.report</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_account_report_tree_hierarchy"/>
@@ -186,8 +186,8 @@
<field name="code">1104</field>
<field name="name">Bank Current Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">liquidity</field>
<field name="user_type" ref="conf_account_type_asset"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_o_income" model="account.account.template">
@@ -446,7 +446,7 @@
<field name="property_account_expense_categ" ref="conf_a_expense"/>
<field name="property_account_income_categ" ref="conf_a_sale"/>
<field name="property_account_income_opening" ref="conf_o_income"/>
<field name="property_account_expense_opening" ref="conf_o_expense"/>
<field name="property_account_expense_opening" ref="conf_o_expense"/>
<field name="property_reserve_and_surplus_account" ref="conf_a_reserve_and_surplus"/>
</record>
@@ -611,7 +611,7 @@
<record id="conf_a_expense" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('otaxs')])]"/>
</record>
<record id="action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
+8 -6
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-05 23:09+0000\n"
"PO-Revision-Date: 2011-09-22 02:55+0000\n"
"Last-Translator: Majed Majbour <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-17 04:55+0000\n"
"X-Generator: Launchpad (build 13955)\n"
"X-Launchpad-Export-Date: 2011-09-23 04:38+0000\n"
"X-Generator: Launchpad (build 14012)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@@ -48,7 +48,7 @@ msgstr ""
#. module: account
#: field:account.installer.modules,account_voucher:0
msgid "Voucher Management"
msgstr ""
msgstr "إدارة القسائم"
#. module: account
#: view:account.account:0
@@ -68,7 +68,7 @@ msgstr "متبقي"
#: code:addons/account/invoice.py:785
#, python-format
msgid "Please define sequence on invoice journal"
msgstr ""
msgstr "يرجى تحديد تسلسل على الفاتورة"
#. module: account
#: constraint:account.period:0
@@ -134,7 +134,7 @@ msgstr "المدخلات المحاسبية -"
#: code:addons/account/account.py:1291
#, python-format
msgid "You can not delete posted movement: \"%s\"!"
msgstr ""
msgstr "لا يمكنك حذف حركة تم ترحيلها: \"%s\"!"
#. module: account
#: report:account.invoice:0
@@ -173,6 +173,8 @@ msgid ""
"If the active field is set to False, it will allow you to hide the payment "
"term without removing it."
msgstr ""
"إذا تم تعيين الحقل النشط إلى خطأ ، فإنه سيسمح لك بإخفاء مدة السداد دون "
"إزالتها."
#. module: account
#: code:addons/account/invoice.py:1421
+1 -16
View File
@@ -65,21 +65,6 @@ class account_installer(osv.osv_memory):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.company_id and user.company_id.id or False
def _get_default_charts(self, cr, uid, context=None):
module_name = False
company_id = self._default_company(cr, uid, context=context)
company = self.pool.get('res.company').browse(cr, uid, company_id, context=context)
address_id = self.pool.get('res.partner').address_get(cr, uid, [company.partner_id.id])
if address_id['default']:
address = self.pool.get('res.partner.address').browse(cr, uid, address_id['default'], context=context)
code = address.country_id.code
module_name = (code and 'l10n_' + code.lower()) or False
if module_name:
module_id = self.pool.get('ir.module.module').search(cr, uid, [('name', '=', module_name)], context=context)
if module_id:
return module_name
return 'configurable'
_defaults = {
'date_start': lambda *a: time.strftime('%Y-01-01'),
'date_stop': lambda *a: time.strftime('%Y-12-31'),
@@ -87,7 +72,7 @@ class account_installer(osv.osv_memory):
'sale_tax': 0.0,
'purchase_tax': 0.0,
'company_id': _default_company,
'charts': _get_default_charts
'charts': 'configurable'
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
@@ -196,25 +196,25 @@
<para style="Total">Account Total</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_direction('6')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_direction('6'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('4')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('4'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('3')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('3'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('2')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('2'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('1')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('1'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('0')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('0'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_total('5')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_total('5'), currency_obj=company.currency_id) ]]</para>
</td>
</tr>
@@ -224,25 +224,25 @@
<para style="P2_content">[[ partner['name'] ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['direction']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['direction'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['4'])]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['4'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['3'])]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['3'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['2']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['2'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['1']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['1'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['0']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['0'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['total']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['total'], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
<tr>
@@ -251,25 +251,25 @@
<para style="P2_content">[[ not_partner['name'] ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['direction']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['direction'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['4'])]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['4'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['3'])]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['3'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['2']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['2'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['1']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['1'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['0']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['0'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['total']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['total'], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
+1 -1
View File
@@ -296,7 +296,7 @@
<td><para style="P14"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font> </para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font> </para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font> </para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance'], currency_obj=company.currency_id) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['balance'], currency = company.currency_id) ]]</font> </para></td>
</tr>
</blockTable>
<para style="P11">
@@ -136,7 +136,7 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
'code': account.code,
'name': account.name,
'level': account.level,
'balance':account.balance,
'balance': account.balance != 0 and account.balance * account.user_type.sign or account.balance,
'type': account.type,
}
currency = account.currency_id and account.currency_id or account.company_id.currency_id
@@ -236,12 +236,12 @@
</td>
</tr>
<tr style="Table3">
[[ repeatIn(get_lines_another('asset'),'a' ) ]]
[[ repeatIn(get_lines_another('asset'),'a' ) ]]
[[ setTag('tr','tr',{'style': 'Table'+str(min(3,a['level']))}) ]]
<td><para style="terp_level_3_code">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_code'}) ]]<i>[[ a['code'] ]]</i></para></td>
<td><para style="terp_level_3_name">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a['level']))+'_name'}) ]][[ a['name'] ]]</para></td>
<td>[[ (a['level'] &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_balance'}) ]][[ formatLang(a['balance']) ]] [[company.currency_id.symbol ]]</para></td>
<td>[[ a['level'] == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a['balance']) ]] [[company.currency_id.symbol ]]</u></para></td>
<td>[[ (a['level'] &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_balance'}) ]][[ formatLang(a['balance'], currency_obj = company.currency_id) ]]</para></td>
<td>[[ a['level'] == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a['balance'], currency_obj = company.currency_id) ]]</u></para></td>
</tr>
</blockTable>
<blockTable colWidths="426.0,113.0" style="Table_Net_Profit_Loss">
@@ -250,7 +250,7 @@
<para style="terp_default_Bold_9">Balance:</para>
</td>
<td>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_cr()) ]] [[ company.currency_id.symbol ]]</u></para>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_cr(), currency_obj = company.currency_id) ]]</u></para>
</td>
</tr>
</blockTable>
@@ -278,12 +278,12 @@
</td>
</tr>
<tr style="Table3">
[[ repeatIn(get_lines_another('liability'),'a' ) ]]
[[ repeatIn(get_lines_another('liability'),'a' ) ]]
[[ setTag('tr','tr',{'style': 'Table'+str(min(3,a['level']))}) ]]
<td><para style="terp_level_3_code">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_code'}) ]]<i>[[ a['code'] ]]</i></para></td>
<td><para style="terp_level_3_name">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a['level']))+'_name'}) ]][[ a['name'] ]]</para></td>
<td>[[ (a['level'] &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_balance'}) ]][[ formatLang(a['balance']) ]] [[company.currency_id.symbol ]]</para></td>
<td>[[ a['level'] == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a['balance']) ]] [[company.currency_id.symbol ]]</u></para></td>
<td>[[ (a['level'] &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_balance'}) ]][[ formatLang(a['balance'], currency_obj = company.currency_id) ]]</para></td>
<td>[[ a['level'] == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a['balance'], currency_obj = company.currency_id) ]]</u></para></td>
</tr>
</blockTable>
<blockTable colWidths="426.0,113.0" style="Table_Net_Profit_Loss">
@@ -292,7 +292,7 @@
<para style="terp_default_Bold_9">Balance:</para>
</td>
<td>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_dr()) ]] [[ company.currency_id.symbol ]]</u></para>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_dr(), currency_obj = company.currency_id) ]]</u></para>
</td>
</tr>
</blockTable>
@@ -207,7 +207,7 @@
</td>
<td>
<para style="terp_default_Right_9">
<font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(a['balance1']) ]] [[ company.currency_id.symbol ]]</font>
<font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(a['balance1'], currency_obj=company.currency_id) ]]</font>
</para>
</td>
<td>
@@ -224,7 +224,7 @@
<td>
<para style="terp_default_Right_9">
<font>[[ ( a['level']&lt;4 or a['name']=='Net Profit') and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font>
<font>[[(a['code'] and a['name']) and formatLang(a['balance']) or removeParentNode('font')]] [[ company.currency_id.symbol ]]</font>
<font>[[(a['code'] and a['name']) and formatLang(a['balance'], currency_obj=company.currency_id) or removeParentNode('font')]]</font>
</para>
</td>
</tr>
@@ -235,13 +235,13 @@
<para style="terp_default_Bold_9">Balance:</para>
</td>
<td>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_cr()) ]] [[ company.currency_id.symbol ]]</u></para>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_cr(), currency_obj=company.currency_id) ]]</u></para>
</td>
<td>
<para style="terp_default_Bold_9">Balance:</para>
</td>
<td>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_dr()) ]] [[ company.currency_id.symbol ]]</u></para>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_dr(), currency_obj=company.currency_id) ]]</u></para>
</td>
</tr>
</blockTable>
@@ -298,7 +298,7 @@
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]] </para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]] </para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id) ) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id ) ]]</para></td>
</tr>
</blockTable>
<blockTable colWidths="50.0,180.0,80.0,80.0,80.0,80.0" style="Table_Final_Total_currency">[[ display_currency(data) or removeParentNode('blockTable') ]]
@@ -307,7 +307,7 @@
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id) ) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id ) ]]</para></td>
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
</tr>
</blockTable>
@@ -319,7 +319,7 @@
<td><para style="terp_default_9">[[ 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['credit']-line['debit']) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit'], currency_obj=company.currency_id ) ]]</para></td>
</tr>
</blockTable>
<blockTable colWidths="50.0,180.0,80.0,80.0,80.0,80.0" style="Table_Journal_Line_Content_currency">[[ display_currency(data) or removeParentNode('blockTable') ]]
@@ -328,7 +328,7 @@
<td><para style="terp_default_9">[[ 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['credit']-line['debit']) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit'], currency_obj=company.currency_id ) ]]</para></td>
<td><para style="terp_default_Right_9"><font>[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font></para></td>
</tr>
</blockTable>
@@ -63,14 +63,18 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
if data['form']['enable_filter']:
vals['balance_cmp'] = self.pool.get('account.financial.report').browse(self.cr, self.uid, report.id, context=data['form']['comparison_context']).balance
lines.append(vals)
account_ids = []
if report.type == 'accounts' and report.display_detail and report.account_ids:
account_ids = account_obj._get_children_and_consol(self.cr, self.uid, [x.id for x in report.account_ids])
elif report.type == 'account_type' and report.account_type_ids:
account_ids = account_obj.search(self.cr, self.uid, [('user_type','in', [x.id for x in report.account_type_ids])])
if account_ids:
for account in account_obj.browse(self.cr, self.uid, account_ids, context=data['form']['used_context']):
if account.type != 'view':
flag = False
vals = {
'name': account.code + ' ' + account.name,
'balance': account.balance,
'balance': account.balance != 0 and account.balance * account.user_type.sign or account.balance,
'type': 'account',
'level': 6,
'account_type': account.type,
@@ -273,7 +273,7 @@
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]] </para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit()- sum_credit()) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit()- sum_credit(), currency_obj=company.currency_id) ]]</para></td>
</tr>
</blockTable>
<blockTable colWidths="100.0,100.0,73.0,80.0,80.0,80.0" style="Table_Journal_Title" repeatRows="1">[[ display_currency(data) or removeParentNode('blockTable') ]]
@@ -290,7 +290,7 @@
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()- sum_debit()) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()- sum_debit(), currency_obj=company.currency_id) ]]</para></td>
</tr>
</blockTable>
@@ -311,7 +311,7 @@
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id)) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id), currency_obj=company.currency_id) ]] </para>
</td>
<td>
@@ -337,7 +337,7 @@
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)) ]] </para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id)) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id), currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -358,7 +358,7 @@
<para style="terp_default_Right_9">[[ formatLang(line['credit']) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit'] ) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit'], currency_obj=company.currency_id ) ]]</para>
</td>
</tr>
</blockTable>
@@ -371,7 +371,7 @@
<td><para style="terp_default_9">[[ 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['credit']-line['debit'] ) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit'], currency_obj=company.currency_id ) ]]</para></td>
<td><para style="terp_default_Right_9"><font>[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font></para></td>
</tr>
</blockTable>
@@ -476,10 +476,10 @@
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.symbol or '' ]]</para>
<para style="terp_default_Bold_9_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]]</para>
</td>
</tr>
</blockTable>
@@ -515,7 +515,7 @@
<para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] </para>
</td>
<td>
<para style="terp_default_Right_8"><font>[[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']]</font></para>
@@ -572,7 +572,7 @@
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -608,7 +608,7 @@
<para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -505,10 +505,10 @@
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency = company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.symbol or '' ]]</para>
<para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]]</para>
</td>
</tr>
</blockTable>
@@ -547,7 +547,7 @@
<para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_7">[[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']]</para>
@@ -607,7 +607,7 @@
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -646,7 +646,7 @@
<para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>
</td>
<td>
<para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] </para>
</td>
</tr>
</blockTable>
+9 -9
View File
@@ -247,8 +247,8 @@
<td><para style="P11"><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>
<td><para style="P12">[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P12">[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P12">[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]]</para></td>
<td><para style="P12">[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]]</para></td>
</tr>
<para style="Standard"><font color="white">[[lines(o.period_id.id, o.journal_id.id) or removeParentNode('story') ]]</font></para>
<tr>
@@ -258,8 +258,8 @@
<td><para style="terp_default_8">[[ line.account_id.code ]]</para></td>
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,17) ]]</para></td>
<td><para style="terp_default_8">[[ strip_name(line.name,27) ]]</para></td>
<td><para style="P8">[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P8">[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P8">[[ formatLang(line.debit, currency_obj=company.currency_id) ]]</para></td>
<td><para style="P8">[[ formatLang(line.credit, currency_obj=company.currency_id) ]]</para></td>
</tr>
</blockTable>
@@ -282,8 +282,8 @@
<td><para style="P11"><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>
<td><para style="P12">[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P12">[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P12">[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]]</para></td>
<td><para style="P12">[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]]</para></td>
<!-- given a period and a journal, the sum of debit will always be equal to the sum of credit, so there is no point to display it-->
<td><para style="P12"> <!--o.journal_id.currency and formatLang((sum_debit(o.period_id.id, o.journal_id.id) - sum_credit(o.period_id.id, o.journal_id.id))) ]] [[ o.journal_id.currency and o.journal_id.currency.symbol --></para></td>
</tr>
@@ -295,9 +295,9 @@
<td><para style="terp_default_8">[[ line.account_id.code ]]</para></td>
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,15) ]]</para></td>
<td><para style="terp_default_8">[[ strip_name(line.name,17) ]]</para></td>
<td><para style="P8">[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P8">[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P8">[[ line.currency_id and formatLang(line.amount_currency) or '' ]] [[ line.currency_id.symbol or '']]</para></td>
<td><para style="P8">[[ formatLang(line.debit, currency_obj=company.currency_id) ]]</para></td>
<td><para style="P8">[[ formatLang(line.credit, currency_obj=company.currency_id) ]]</para></td>
<td><para style="P8">[[ line.currency_id and formatLang(line.amount_currency, currency_obj=line.currency_id) or '' ]]</para></td>
</tr>
</blockTable>
</story>
@@ -241,16 +241,16 @@
<td><para style="P8"></para></td>
<td><para style="P8"><u>[[ formatLang(sum_debit()) ]]</u></para></td>
<td><para style="P8"><u>[[ formatLang(sum_credit()) ]]</u></para></td>
<td><para style="P8"><u>[[ formatLang((sum_debit()-sum_credit())) ]] [[ company.currency_id.symbol ]]</u></para></td>
<td><para style="P8"><u>[[ formatLang(sum_litige()) ]] [[ company.currency_id.symbol ]]</u></para></td>
<td><para style="P8"><u>[[ formatLang((sum_debit()-sum_credit()), currency_obj=company.currency_id) ]]</u></para></td>
<td><para style="P8"><u>[[ formatLang(sum_litige(), currency_obj=company.currency_id) ]]</u></para></td>
</tr>
<tr>
<td><para style="P3">[[ repeatIn(lines(), 'a') ]]<font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font><font>[[ a['ref'] ]] [[ a['type']==3 and a['code'] ]]</font></para></td>
<td><para style="P3"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ a['name'] ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['debit']) ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['credit']) ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['enlitige'] or 0.0) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['balance'], currency_obj=company.currency_id) ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['enlitige'] or 0.0, currency_obj=company.currency_id) ]]</para></td>
</tr>
</blockTable>
</story>
@@ -477,7 +477,7 @@
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_credit_partner(p))) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p)), currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -497,7 +497,7 @@
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -528,7 +528,7 @@
<para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['progress']), currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -581,7 +581,7 @@
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_credit_partner(p))) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p)), currency_obj=company.currency_id) ]] </para>
</td>
<td>
<para style="terp_default_Bold_9_Right">
@@ -604,7 +604,7 @@
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">
@@ -640,7 +640,7 @@
<para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['progress']), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">
@@ -482,7 +482,7 @@
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_credit_partner(p))) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p)), currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -502,7 +502,7 @@
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -533,7 +533,7 @@
<para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['progress']), currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -590,7 +590,7 @@
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_credit_partner(p))) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p)), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">
@@ -613,7 +613,7 @@
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">
@@ -649,7 +649,7 @@
<para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang((line['progress']), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_8">
@@ -263,7 +263,7 @@
<para style="terp_default_Centre_9">[[ formatLang(l.discount, dp='Account') ]] </para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, dp='Account') ]] [[ o.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, dp='Account', currency_obj=o.currency_id) ]]</para>
</td>
</tr>
<tr>
@@ -309,7 +309,7 @@
<para style="terp_default_9">Net Total:</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
</td>
</tr>
<tr>
@@ -322,7 +322,7 @@
<para style="terp_default_9">Taxes:</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account') ]] [[ o.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.currency_id) ]]</para>
</td>
</tr>
<tr>
@@ -335,7 +335,7 @@
<para style="terp_tblheader_Details">Total:</para>
</td>
<td>
<para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
<para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -368,10 +368,10 @@
<para style="terp_default_8">[[ t.name ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang(t.base, dp='Account') ]] [[ o.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ formatLang(t.base, dp='Account', currency_obj=o.currency_id) ]]</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, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
<para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_8">
@@ -219,7 +219,7 @@
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] &lt; time.strftime('%Y-%m-%d'))) and formatLang(line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] &lt; time.strftime('%Y-%m-%d'))) and formatLang(line['debit'] - line['credit'], currency_obj=company.currency_id) ]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para>
@@ -244,7 +244,7 @@
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] </para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] &lt; time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] &lt; time.strftime('%Y-%m-%d'), getLines(o)), 0)), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_9">
@@ -264,7 +264,7 @@
<para style="terp_default_Bold_9">Balance : </para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_tblheader_Details_Right">[[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0)), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_8">
@@ -279,10 +279,10 @@
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_default_9">Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]].</para>
<para style="terp_default_9">Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0)), currency_obj=company.currency_id) ]].</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</pto>
</story>
</document>
</document>
@@ -221,7 +221,7 @@
</para>
</td>
<td>
<para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font></para>
<para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance']), currency_obj=company.currency_id) ]]</font></para>
</td>
<td>
<para style="terp_default_9">
@@ -234,7 +234,7 @@
</para>
</td>
<td>
<para style="terp_default_Right_9"><font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[(a['code1'] and a['name1']) and formatLang(abs(a['balance1'])) or removeParentNode('font') ]] [[ company.currency_id.symbol ]]</font></para>
<para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[(a['code1'] and a['name1']) and formatLang(abs(a['balance1']), currency_obj=company.currency_id) or removeParentNode('font') ]]</font></para>
</td>
</tr>
</blockTable>
@@ -247,7 +247,7 @@
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit' and final_result()['type'] or '' ]]</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(abs(final_result()['balance'])) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(abs(final_result()['balance']), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9"></para>
@@ -256,7 +256,7 @@
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss' and final_result()['type'] or '' ]]</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(abs(final_result()['balance']), currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -267,13 +267,13 @@
<para style="terp_default_Bold_9">Total:</para>
</td>
<td>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]]</u></para>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr()), currency_obj=company.currency_id) ]]</u></para>
</td>
<td>
<para style="terp_default_Bold_9">Total:</para>
</td>
<td>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]]</u></para>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr()), currency_obj=company.currency_id) ]]</u></para>
</td>
</tr>
</blockTable>
+12 -4
View File
@@ -141,11 +141,15 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
'code': cal_list['expense'][i].code,
'name': cal_list['expense'][i].name,
'level': cal_list['expense'][i].level,
'balance':cal_list['expense'][i].balance,
'balance': cal_list['expense'][i].balance != 0 and \
cal_list['expense'][i].balance * cal_list['expense'][i].user_type.sign or \
cal_list['expense'][i].balance,
'code1': cal_list['income'][i].code,
'name1': cal_list['income'][i].name,
'level1': cal_list['income'][i].level,
'balance1':cal_list['income'][i].balance,
'balance1': cal_list['income'][i].balance != 0 and \
cal_list['income'][i].balance * cal_list['income'][i].user_type.sign or \
cal_list['income'][i].balance,
}
self.result_temp.append(temp)
else:
@@ -158,7 +162,9 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
'code1': cal_list['income'][i].code,
'name1': cal_list['income'][i].name,
'level1': cal_list['income'][i].level,
'balance1':cal_list['income'][i].balance,
'balance1': cal_list['income'][i].balance != 0 and \
cal_list['income'][i].balance * cal_list['income'][i].user_type.sign \
or cal_list['income'][i].balance,
}
self.result_temp.append(temp)
if i < len(cal_list['expense']):
@@ -166,7 +172,9 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
'code': cal_list['expense'][i].code,
'name': cal_list['expense'][i].name,
'level': cal_list['expense'][i].level,
'balance':cal_list['expense'][i].balance,
'balance': cal_list['expense'][i].balance != 0 and \
cal_list['expense'][i].balance * cal_list['expense'][i].user_type.sign \
or cal_list['expense'][i].balance,
'code1': '',
'name1': '',
'level1': False,
+10 -10
View File
@@ -224,12 +224,12 @@
</td>
</tr>
<tr style="Table3">
[[ repeatIn(get_lines_another('expense'),'a' ) ]]
[[ repeatIn(get_lines_another('expense'),'a' ) ]]
[[ setTag('tr','tr',{'style': 'Table'+str(min(3,a.level))}) ]]
<td><para style="terp_level_3_code">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_code'}) ]]<i>[[ a.code ]]</i></para></td>
<td><para style="terp_level_3_name">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.level))+'_name'}) ]][[ a.name ]]</para></td>
<td>[[ (a.level &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]]</para></td>
<td>[[ a.level == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a.balance) ]] [[company.currency_id.symbol ]]</u></para></td>
<td>[[ (a.level &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance * a.user_type.sign, currency_obj=company.currency_id) ]]</para></td>
<td>[[ a.level == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a.balance * a.user_type.sign, currency_obj=company.currency_id) ]]</u></para></td>
</tr>
</blockTable>
<blockTable colWidths="100.0,326.0,113.0" style="Table_Net_Profit_Loss">
@@ -241,7 +241,7 @@
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(final_result()['balance']) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(final_result()['balance'], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -251,7 +251,7 @@
<para style="terp_default_Bold_9">Total:</para>
</td>
<td>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_dr()) ]] [[ company.currency_id.symbol ]]</u></para>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_dr(), currency_obj=company.currency_id) ]]</u></para>
</td>
</tr>
</blockTable>
@@ -273,12 +273,12 @@
</td>
</tr>
<tr style="Table3">
[[ repeatIn(get_lines_another('income'),'a' ) ]]
[[ repeatIn(get_lines_another('income'),'a' ) ]]
[[ setTag('tr','tr',{'style': 'Table'+str(min(3,a.level))}) ]]
<td><para style="terp_level_3_code">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_code'}) ]]<i>[[ a.code ]]</i></para></td>
<td><para style="terp_level_3_name">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.level))+'_name'}) ]][[ a.name ]]</para></td>
<td>[[ (a.level &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]]</para></td>
<td>[[ a.level == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a.balance) ]] [[company.currency_id.symbol ]]</u></para></td>
<td>[[ (a.level &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance * a.user_type.sign, currency_obj=company.currency_id) ]]</para></td>
<td>[[ a.level == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a.balance * a.user_type.sign, currency_obj=company.currency_id) ]]</u></para></td>
</tr>
</blockTable>
<blockTable colWidths="100.0,326.0,113.0" style="Table4">
@@ -290,7 +290,7 @@
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(final_result()['balance']) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(final_result()['balance'], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -300,7 +300,7 @@
<para style="terp_default_Bold_9">Total:</para>
</td>
<td>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_cr()) ]] [[ company.currency_id.symbol ]]</u></para>
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(sum_cr(), currency_obj=company.currency_id) ]]</u></para>
</td>
</tr>
</blockTable>
+3 -3
View File
@@ -129,10 +129,10 @@
<para style="terp_default_9">[[ line['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['debit']) ]] [[ company.currency_id.symbol]]</para>
<para style="terp_default_Right_9">[[ formatLang(line['debit'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol]]</para>
<para style="terp_default_Right_9">[[ formatLang(line['credit'], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
@@ -141,4 +141,4 @@
</para>
</section>
</story>
</document>
</document>
+1 -1
View File
@@ -153,7 +153,7 @@
<td><para style="P5"><font>[[ repeatIn(get_lines(data['form']['based_on'], data['form']['company_id']), 'o') ]]</font><font color="white">[[ (o['level']) ]]</font> <font>[[ (len(o['level'])&lt;5 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font><font>[[ o['code'] ]] [[ o['name'] ]] </font></para></td>
<td><para style="P6"><font>[[ len(o['level'])&lt;5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]]</font><font>[[ o['type']&lt;&gt;'view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]]</font></para></td>
<td><para style="P6"><font>[[ len(o['level'])&lt;5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['credit']) ]]</font><font>[[ o['type']&lt;&gt;'view' and removeParentNode('font') ]][[ formatLang(o['credit'])]]</font></para></td>
<td><para style="P6"><font>[[ len(o['level'])&lt;5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]]</font><font>[[ o['type']&lt;&gt;'view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]]</font> </para></td>
<td><para style="P6"><font>[[ len(o['level'])&lt;5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['tax_amount'], currency_obj=company.currency_id) ]]</font><font>[[ o['type']&lt;&gt;'view' and removeParentNode('font') ]][[ formatLang(o['tax_amount'], currency_obj=company.currency_id) ]]</font> </para></td>
</tr>
</blockTable>
</story>
@@ -31,7 +31,7 @@
</record>
<record id="action_account_report" model="ir.actions.act_window">
<field name="name">Financial Report</field>
<field name="name">Financial Reports</field>
<field name="res_model">accounting.report</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
+152 -122
View File
@@ -52,9 +52,11 @@ class account_fiscalyear_close(osv.osv_memory):
obj_acc_period = self.pool.get('account.period')
obj_acc_fiscalyear = self.pool.get('account.fiscalyear')
obj_acc_journal = self.pool.get('account.journal')
obj_acc_move = self.pool.get('account.move')
obj_acc_move_line = self.pool.get('account.move.line')
obj_acc_account = self.pool.get('account.account')
obj_acc_journal_period = self.pool.get('account.journal.period')
currency_obj = self.pool.get('res.currency')
data = self.browse(cr, uid, ids, context=context)
@@ -81,150 +83,178 @@ class account_fiscalyear_close(osv.osv_memory):
raise osv.except_osv(_('UserError'),
_('The journal must have centralised counterpart without the Skipping draft state option checked!'))
move_ids = obj_acc_move_line.search(cr, uid, [
('journal_id', '=', new_journal.id), ('period_id.fiscalyear_id', '=', new_fyear.id)])
#delete existing move and move lines if any
move_ids = obj_acc_move.search(cr, uid, [
('journal_id', '=', new_journal.id), ('period_id', '=', period.id)])
if move_ids:
obj_acc_move_line._remove_move_reconcile(cr, uid, move_ids, context=context)
obj_acc_move_line.unlink(cr, uid, move_ids, context=context)
move_line_ids = obj_acc_move_line.search(cr, uid, [('move_id', 'in', move_ids)])
obj_acc_move_line._remove_move_reconcile(cr, uid, move_line_ids, context=context)
obj_acc_move_line.unlink(cr, uid, move_line_ids, context=context)
obj_acc_move.unlink(cr, uid, move_ids, context=context)
cr.execute("SELECT id FROM account_fiscalyear WHERE date_stop < %s", (str(new_fyear.date_start),))
result = cr.dictfetchall()
fy_ids = ','.join([str(x['id']) for x in result])
query_line = obj_acc_move_line._query_get(cr, uid,
obj='account_move_line', context={'fiscalyear': fy_ids})
cr.execute('select id from account_account WHERE active AND company_id = %s', (old_fyear.company_id.id,))
ids = map(lambda x: x[0], cr.fetchall())
for account in obj_acc_account.browse(cr, uid, ids,
context={'fiscalyear': fy_id}):
accnt_type_data = account.user_type
if not accnt_type_data:
continue
if accnt_type_data.close_method=='none' or account.type == 'view':
continue
if accnt_type_data.close_method=='balance':
balance_in_currency = 0.0
if account.currency_id:
cr.execute('SELECT sum(amount_currency) as balance_in_currency FROM account_move_line ' \
'WHERE account_id = %s ' \
'AND ' + query_line + ' ' \
'AND currency_id = %s', (account.id, account.currency_id.id))
balance_in_currency = cr.dictfetchone()['balance_in_currency']
#create the opening move
vals = {
'name': '/',
'ref': '',
'period_id': period.id,
'journal_id': new_journal.id,
}
move_id = obj_acc_move.create(cr, uid, vals, context=context)
if abs(account.balance)>0.0001:
obj_acc_move_line.create(cr, uid, {
'debit': account.balance>0 and account.balance,
'credit': account.balance<0 and -account.balance,
'name': data[0].report_name,
'date': period.date_start,
'journal_id': new_journal.id,
'period_id': period.id,
'account_id': account.id,
'currency_id': account.currency_id and account.currency_id.id or False,
'amount_currency': balance_in_currency,
}, {'journal_id': new_journal.id, 'period_id':period.id})
if accnt_type_data.close_method == 'unreconciled':
offset = 0
limit = 100
while True:
cr.execute('SELECT id, name, quantity, debit, credit, account_id, ref, ' \
'amount_currency, currency_id, blocked, partner_id, ' \
'date_maturity, date_created ' \
'FROM account_move_line ' \
'WHERE account_id = %s ' \
'AND ' + query_line + ' ' \
'AND reconcile_id is NULL ' \
'ORDER BY id ' \
'LIMIT %s OFFSET %s', (account.id, limit, offset))
result = cr.dictfetchall()
if not result:
break
for move in result:
move.pop('id')
move.update({
'date': period.date_start,
'journal_id': new_journal.id,
'period_id': period.id,
})
obj_acc_move_line.create(cr, uid, move, {
'journal_id': new_journal.id,
'period_id': period.id,
})
offset += limit
#1. report of the accounts with defferal method == 'unreconciled'
cr.execute('''
SELECT a.id
FROM account_account a
LEFT JOIN account_account_type t ON (a.user_type = t.id)
WHERE a.active
AND a.type != 'view'
AND t.close_method = %s''', ('unreconciled', ))
account_ids = map(lambda x: x[0], cr.fetchall())
#We have also to consider all move_lines that were reconciled
#on another fiscal year, and report them too
offset = 0
limit = 100
while True:
cr.execute('SELECT DISTINCT b.id, b.name, b.quantity, b.debit, b.credit, b.account_id, b.ref, ' \
'b.amount_currency, b.currency_id, b.blocked, b.partner_id, ' \
'b.date_maturity, b.date_created ' \
'FROM account_move_line a, account_move_line b ' \
'WHERE b.account_id = %s ' \
'AND b.reconcile_id is NOT NULL ' \
'AND a.reconcile_id = b.reconcile_id ' \
'AND b.period_id IN ('+fy_period_set+') ' \
'AND a.period_id IN ('+fy2_period_set+') ' \
'ORDER BY id ' \
'LIMIT %s OFFSET %s', (account.id, limit, offset))
result = cr.dictfetchall()
if not result:
break
for move in result:
move.pop('id')
move.update({
'date': period.date_start,
'journal_id': new_journal.id,
'period_id': period.id,
})
obj_acc_move_line.create(cr, uid, move, {
'journal_id': new_journal.id,
'period_id': period.id,
})
offset += limit
if accnt_type_data.close_method=='detail':
offset = 0
limit = 100
while True:
cr.execute('SELECT id, name, quantity, debit, credit, account_id, ref, ' \
'amount_currency, currency_id, blocked, partner_id, ' \
'date_maturity, date_created ' \
'FROM account_move_line ' \
'WHERE account_id = %s ' \
'AND ' + query_line + ' ' \
'ORDER BY id ' \
'LIMIT %s OFFSET %s', (account.id, limit, offset))
if account_ids:
cr.execute('''
INSERT INTO account_move_line (
name, create_uid, create_date, write_uid, write_date,
statement_id, journal_id, currency_id, date_maturity,
partner_id, blocked, credit, state, debit,
ref, account_id, period_id, date, move_id, amount_currency,
quantity, product_id, company_id)
(SELECT name, create_uid, create_date, write_uid, write_date,
statement_id, %s,currency_id, date_maturity, partner_id,
blocked, credit, 'draft', debit, ref, account_id,
%s, date, %s, amount_currency, quantity, product_id, company_id
FROM account_move_line
WHERE account_id IN %s
AND ''' + query_line + '''
AND reconcile_id IS NULL)''', (new_journal.id, period.id, move_id, tuple(account_ids),))
result = cr.dictfetchall()
if not result:
break
for move in result:
move.pop('id')
move.update({
'date': period.date_start,
'journal_id': new_journal.id,
'period_id': period.id,
})
obj_acc_move_line.create(cr, uid, move)
offset += limit
ids = obj_acc_move_line.search(cr, uid, [('journal_id','=',new_journal.id),
#We have also to consider all move_lines that were reconciled
#on another fiscal year, and report them too
cr.execute('''
INSERT INTO account_move_line (
name, create_uid, create_date, write_uid, write_date,
statement_id, journal_id, currency_id, date_maturity,
partner_id, blocked, credit, state, debit,
ref, account_id, period_id, date, move_id, amount_currency,
quantity, product_id, company_id)
(SELECT
b.name, b.create_uid, b.create_date, b.write_uid, b.write_date,
b.statement_id, %s, b.currency_id, b.date_maturity,
b.partner_id, b.blocked, b.credit, 'draft', b.debit,
b.ref, b.account_id, %s, b.date, %s, b.amount_currency,
b.quantity, b.product_id, b.company_id
FROM account_move_line b
WHERE b.account_id IN %s
AND b.reconcile_id IS NOT NULL
AND b.period_id IN ('''+fy_period_set+''')
AND b.reconcile_id IN (SELECT DISTINCT(reconcile_id)
FROM account_move_line a
WHERE a.period_id IN ('''+fy2_period_set+''')))''', (new_journal.id, period.id, move_id, tuple(account_ids),))
#2. report of the accounts with defferal method == 'detail'
cr.execute('''
SELECT a.id
FROM account_account a
LEFT JOIN account_account_type t ON (a.user_type = t.id)
WHERE a.active
AND a.type != 'view'
AND t.close_method = %s''', ('detail', ))
account_ids = map(lambda x: x[0], cr.fetchall())
if account_ids:
cr.execute('''
INSERT INTO account_move_line (
name, create_uid, create_date, write_uid, write_date,
statement_id, journal_id, currency_id, date_maturity,
partner_id, blocked, credit, state, debit,
ref, account_id, period_id, date, move_id, amount_currency,
quantity, product_id, company_id)
(SELECT name, create_uid, create_date, write_uid, write_date,
statement_id, %s,currency_id, date_maturity, partner_id,
blocked, credit, 'draft', debit, ref, account_id,
%s, date, %s, amount_currency, quantity, product_id, company_id
FROM account_move_line
WHERE account_id IN %s
AND ''' + query_line + ''')
''', (new_journal.id, period.id, move_id, tuple(account_ids),))
#3. report of the accounts with defferal method == 'balance'
cr.execute('''
SELECT a.id
FROM account_account a
LEFT JOIN account_account_type t ON (a.user_type = t.id)
WHERE a.active
AND a.type != 'view'
AND t.close_method = %s''', ('balance', ))
account_ids = map(lambda x: x[0], cr.fetchall())
query_1st_part = """
INSERT INTO account_move_line (
debit, credit, name, date, move_id, journal_id, period_id,
account_id, currency_id, amount_currency, company_id, state) VALUES
"""
query_2nd_part = ""
query_2nd_part_args = []
for account in obj_acc_account.browse(cr, uid, account_ids, context={'fiscalyear': fy_id}):
balance_in_currency = 0.0
if account.currency_id:
cr.execute('SELECT sum(amount_currency) as balance_in_currency FROM account_move_line ' \
'WHERE account_id = %s ' \
'AND ' + query_line + ' ' \
'AND currency_id = %s', (account.id, account.currency_id.id))
balance_in_currency = cr.dictfetchone()['balance_in_currency']
company_currency_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id
if not currency_obj.is_zero(cr, uid, company_currency_id, abs(account.balance)):
if query_2nd_part:
query_2nd_part += ','
query_2nd_part += "(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"
query_2nd_part_args += (account.balance > 0 and account.balance or 0.0,
account.balance < 0 and -account.balance or 0.0,
data[0].report_name,
period.date_start,
move_id,
new_journal.id,
period.id,
account.id,
account.currency_id and account.currency_id.id or None,
balance_in_currency,
account.company_id.id,
'draft')
if query_2nd_part:
cr.execute(query_1st_part + query_2nd_part, tuple(query_2nd_part_args))
#validate and centralize the opening move
obj_acc_move.validate(cr, uid, [move_id], context=context)
#reconcile all the move.line of the opening move
ids = obj_acc_move_line.search(cr, uid, [('journal_id', '=', new_journal.id),
('period_id.fiscalyear_id','=',new_fyear.id)])
context['fy_closing'] = True
if ids:
obj_acc_move_line.reconcile(cr, uid, ids, context=context)
reconcile_id = obj_acc_move_line.reconcile(cr, uid, ids, context=context)
#set the creation date of the reconcilation at the first day of the new fiscalyear, in order to have good figures in the aged trial balance
self.pool.get('account.move.reconcile').write(cr, uid, [reconcile_id], {'create_date': new_fyear.date_start}, context=context)
#create the journal.period object and link it to the old fiscalyear
new_period = data[0].period_id.id
ids = obj_acc_journal_period.search(cr, uid, [('journal_id','=',new_journal.id),('period_id','=',new_period)])
ids = obj_acc_journal_period.search(cr, uid, [('journal_id', '=', new_journal.id), ('period_id', '=', new_period)])
if not ids:
ids = [obj_acc_journal_period.create(cr, uid, {
'name': (new_journal.name or '')+':'+(period.code or ''),
'name': (new_journal.name or '') + ':' + (period.code or ''),
'journal_id': new_journal.id,
'period_id': period.id
})]
cr.execute('UPDATE account_fiscalyear ' \
'SET end_journal_period_id = %s ' \
'WHERE id = %s', (ids[0], old_fyear.id))
return {'type': 'ir.actions.act_window_close'}
account_fiscalyear_close()
@@ -68,6 +68,7 @@ class account_common_report(osv.osv_memory):
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
WHERE f.id = %s
AND p.special = false
ORDER BY p.date_start ASC, p.special ASC
LIMIT 1) AS period_start
UNION
@@ -76,6 +77,7 @@ class account_common_report(osv.osv_memory):
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
WHERE f.id = %s
AND p.date_start < NOW()
AND p.special = false
ORDER BY p.date_stop DESC
LIMIT 1) AS period_stop''', (fiscalyear_id, fiscalyear_id))
periods = [i[0] for i in cr.fetchall()]
@@ -2,7 +2,7 @@
<data>
<record model="ir.actions.act_window" id="account_analytic_plan_form_action_installer">
<field name="name">Account Analytic Plans</field>
<field name="name">Define your Analytic Plans</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.plan</field>
<field name="view_type">form</field>
@@ -240,7 +240,7 @@
<para style="terp_default_Right_9">[[ formatLang(a['ref_qty']) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(a['ref_amt']) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(a['ref_amt'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">100.00%</para>
@@ -288,7 +288,7 @@
<para style="terp_default_Right_9">[[formatLang(a['qty']) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(a['amt']) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(a['amt'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(a['perc']) ]]%</para>
+6 -7
View File
@@ -136,12 +136,11 @@ class account_invoice_line(osv.osv):
res += diff_res
return res
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None):
fiscal_pool = self.pool.get('account.fiscal.position')
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context, company_id)
if not product:
return super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context)
else:
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context)
return res
if type in ('in_invoice','in_refund'):
product_obj = self.pool.get('product.product').browse(cr, uid, product, context=context)
if type == 'in_invoice':
@@ -153,8 +152,8 @@ class account_invoice_line(osv.osv):
if not oa:
oa = product_obj.categ_id.property_stock_account_output_categ and product_obj.categ_id.property_stock_account_output_categ.id
if oa:
fpos = fposition_id and self.pool.get('account.fiscal.position').browse(cr, uid, fposition_id, context=context) or False
a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, oa)
fpos = fposition_id and fiscal_pool.browse(cr, uid, fposition_id, context=context) or False
a = fiscal_pool.map_account(cr, uid, fpos, oa)
res['value'].update({'account_id':a})
return res
Executable → Regular
View File
View File
View File
View File
+1 -1
View File
@@ -314,7 +314,7 @@
<menuitem parent="menu_finance_config_assets" id="menu_action_account_asset_asset_list_normal" action="action_account_asset_asset_list_normal"/>
<record model="ir.actions.act_window" id="action_account_asset_asset_form_normal">
<field name="name">Asset Categories</field>
<field name="name">Review Asset Categories</field>
<field name="res_model">account.asset.category</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
View File
+5 -5
View File
@@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-24 12:54+0000\n"
"PO-Revision-Date: 2011-09-17 13:42+0000\n"
"PO-Revision-Date: 2011-09-26 12:09+0000\n"
"Last-Translator: lholivier <olivier.lenoir@free.fr>\n"
"Language-Team: French <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-18 04:58+0000\n"
"X-Generator: Launchpad (build 13955)\n"
"X-Launchpad-Export-Date: 2011-09-27 04:47+0000\n"
"X-Generator: Launchpad (build 14028)\n"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_normal
@@ -131,7 +131,7 @@ msgstr "Commentaires"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Change history"
msgstr ""
msgstr "Historique des modifications"
#. module: account_asset
#: view:account.asset.asset:0
@@ -341,7 +341,7 @@ msgstr ""
#: field:account.asset.asset,date:0
#: field:account.asset.property.history,date:0
msgid "Date"
msgstr ""
msgstr "Date"
#. module: account_asset
#: field:account.asset.board,value_net:0
+441
View File
@@ -0,0 +1,441 @@
# Danish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-23 06:03+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-24 04:58+0000\n"
"X-Generator: Launchpad (build 14012)\n"
#. module: account_budget
#: field:crossovered.budget,creating_user_id:0
msgid "Responsible User"
msgstr ""
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Confirmed"
msgstr ""
#. module: account_budget
#: model:ir.actions.act_window,name:account_budget.open_budget_post_form
#: model:ir.ui.menu,name:account_budget.menu_budget_post_form
msgid "Budgetary Positions"
msgstr ""
#. module: account_budget
#: code:addons/account_budget/account_budget.py:119
#, python-format
msgid "The General Budget '%s' has no Accounts!"
msgstr ""
#. module: account_budget
#: report:account.budget:0
msgid "Printed at:"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
msgid "Confirm"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,validating_user_id:0
msgid "Validate User"
msgstr ""
#. module: account_budget
#: model:ir.actions.act_window,name:account_budget.action_account_budget_crossvered_summary_report
msgid "Print Summary"
msgstr ""
#. module: account_budget
#: field:crossovered.budget.lines,paid_date:0
msgid "Paid Date"
msgstr ""
#. module: account_budget
#: field:account.budget.analytic,date_to:0
#: field:account.budget.crossvered.report,date_to:0
#: field:account.budget.crossvered.summary.report,date_to:0
#: field:account.budget.report,date_to:0
msgid "End of period"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
#: selection:crossovered.budget,state:0
msgid "Draft"
msgstr ""
#. module: account_budget
#: report:account.budget:0
msgid "at"
msgstr ""
#. module: account_budget
#: view:account.budget.report:0
#: model:ir.actions.act_window,name:account_budget.action_account_budget_analytic
#: model:ir.actions.act_window,name:account_budget.action_account_budget_crossvered_report
msgid "Print Budgets"
msgstr ""
#. module: account_budget
#: report:account.budget:0
msgid "Currency:"
msgstr "Valuta:"
#. module: account_budget
#: model:ir.model,name:account_budget.model_account_budget_crossvered_report
msgid "Account Budget crossvered report"
msgstr ""
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Validated"
msgstr ""
#. module: account_budget
#: field:crossovered.budget.lines,percentage:0
msgid "Percentage"
msgstr "Procentdel"
#. module: account_budget
#: report:crossovered.budget.report:0
msgid "to"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,state:0
msgid "Status"
msgstr "Status"
#. module: account_budget
#: model:ir.actions.act_window,help:account_budget.act_crossovered_budget_view
msgid ""
"A budget is a forecast of your company's income and expenses expected for a "
"period in the future. With a budget, a company is able to carefully look at "
"how much money they are taking in during a given period, and figure out the "
"best way to divide it among various categories. By keeping track of where "
"your money goes, you may be less likely to overspend, and more likely to "
"meet your financial goals. Forecast a budget by detailing the expected "
"revenue per analytic account and monitor its evolution based on the actuals "
"realised during that period."
msgstr ""
#. module: account_budget
#: view:account.budget.crossvered.summary.report:0
msgid "This wizard is used to print summary of budgets"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "%"
msgstr "%"
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Description"
msgstr "Beskrivelse:"
#. module: account_budget
#: report:crossovered.budget.report:0
msgid "Currency"
msgstr "Valuta"
#. module: account_budget
#: report:crossovered.budget.report:0
msgid "Total :"
msgstr "Total:"
#. module: account_budget
#: field:account.budget.post,company_id:0
#: field:crossovered.budget,company_id:0
#: field:crossovered.budget.lines,company_id:0
msgid "Company"
msgstr "Virksomhed"
#. module: account_budget
#: view:crossovered.budget:0
msgid "To Approve"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
msgid "Reset to Draft"
msgstr ""
#. module: account_budget
#: view:account.budget.post:0
#: view:crossovered.budget:0
#: field:crossovered.budget.lines,planned_amount:0
msgid "Planned Amount"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Perc(%)"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
#: selection:crossovered.budget,state:0
msgid "Done"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Practical Amt"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
#: view:account.budget.post:0
#: view:crossovered.budget:0
#: field:crossovered.budget.lines,practical_amount:0
msgid "Practical Amount"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,date_to:0
#: field:crossovered.budget.lines,date_to:0
msgid "End Date"
msgstr ""
#. module: account_budget
#: model:ir.model,name:account_budget.model_account_budget_analytic
#: model:ir.model,name:account_budget.model_account_budget_report
msgid "Account Budget report for analytic account"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
msgid "Theoritical Amount"
msgstr ""
#. module: account_budget
#: field:account.budget.post,name:0
#: field:crossovered.budget,name:0
msgid "Name"
msgstr ""
#. module: account_budget
#: model:ir.model,name:account_budget.model_crossovered_budget_lines
msgid "Budget Line"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
#: view:account.budget.post:0
msgid "Lines"
msgstr "Linier"
#. module: account_budget
#: report:account.budget:0
#: view:crossovered.budget:0
#: field:crossovered.budget.lines,crossovered_budget_id:0
#: report:crossovered.budget.report:0
#: model:ir.actions.report.xml,name:account_budget.account_budget
#: model:ir.model,name:account_budget.model_crossovered_budget
msgid "Budget"
msgstr "Budget"
#. module: account_budget
#: code:addons/account_budget/account_budget.py:119
#, python-format
msgid "Error!"
msgstr ""
#. module: account_budget
#: field:account.budget.post,code:0
#: field:crossovered.budget,code:0
msgid "Code"
msgstr ""
#. module: account_budget
#: view:account.budget.analytic:0
#: view:account.budget.crossvered.report:0
msgid "This wizard is used to print budget"
msgstr ""
#. module: account_budget
#: model:ir.actions.act_window,name:account_budget.act_crossovered_budget_view
#: model:ir.actions.act_window,name:account_budget.action_account_budget_post_tree
#: model:ir.actions.act_window,name:account_budget.action_account_budget_report
#: model:ir.actions.report.xml,name:account_budget.report_crossovered_budget
#: model:ir.ui.menu,name:account_budget.menu_act_crossovered_budget_view
#: model:ir.ui.menu,name:account_budget.menu_action_account_budget_post_tree
#: model:ir.ui.menu,name:account_budget.next_id_31
#: model:ir.ui.menu,name:account_budget.next_id_pos
msgid "Budgets"
msgstr ""
#. module: account_budget
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr ""
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Cancelled"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
msgid "Approve"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,date_from:0
#: field:crossovered.budget.lines,date_from:0
msgid "Start Date"
msgstr ""
#. module: account_budget
#: view:account.budget.post:0
#: field:crossovered.budget.lines,general_budget_id:0
#: model:ir.model,name:account_budget.model_account_budget_post
msgid "Budgetary Position"
msgstr ""
#. module: account_budget
#: field:account.budget.analytic,date_from:0
#: field:account.budget.crossvered.report,date_from:0
#: field:account.budget.crossvered.summary.report,date_from:0
#: field:account.budget.report,date_from:0
msgid "Start of period"
msgstr ""
#. module: account_budget
#: model:ir.model,name:account_budget.model_account_budget_crossvered_summary_report
msgid "Account Budget crossvered summary report"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Theoretical Amt"
msgstr ""
#. module: account_budget
#: view:account.budget.analytic:0
#: view:account.budget.crossvered.report:0
#: view:account.budget.crossvered.summary.report:0
#: view:account.budget.report:0
msgid "Select Dates Period"
msgstr ""
#. module: account_budget
#: view:account.budget.analytic:0
#: view:account.budget.crossvered.report:0
#: view:account.budget.crossvered.summary.report:0
#: view:account.budget.report:0
msgid "Print"
msgstr ""
#. module: account_budget
#: model:ir.module.module,description:account_budget.module_meta_information
msgid ""
"This module allows accountants to manage analytic and crossovered budgets.\n"
"\n"
"Once the Master Budgets and the Budgets are defined (in "
"Accounting/Budgets/),\n"
"the Project Managers can set the planned amount on each Analytic Account.\n"
"\n"
"The accountant has the possibility to see the total of amount planned for "
"each\n"
"Budget and Master Budget in order to ensure the total planned is not\n"
"greater/lower than what he planned for this Budget/Master Budget. Each list "
"of\n"
"record can also be switched to a graphical view of it.\n"
"\n"
"Three reports are available:\n"
" 1. The first is available from a list of Budgets. It gives the "
"spreading, for these Budgets, of the Analytic Accounts per Master Budgets.\n"
"\n"
" 2. The second is a summary of the previous one, it only gives the "
"spreading, for the selected Budgets, of the Analytic Accounts.\n"
"\n"
" 3. The last one is available from the Analytic Chart of Accounts. It "
"gives the spreading, for the selected Analytic Accounts, of the Master "
"Budgets per Budgets.\n"
"\n"
msgstr ""
#. module: account_budget
#: field:crossovered.budget.lines,analytic_account_id:0
#: model:ir.model,name:account_budget.model_account_analytic_account
msgid "Analytic Account"
msgstr ""
#. module: account_budget
#: report:account.budget:0
msgid "Budget :"
msgstr "Budget:"
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Planned Amt"
msgstr ""
#. module: account_budget
#: view:account.budget.post:0
#: field:account.budget.post,account_ids:0
msgid "Accounts"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
#: field:account.analytic.account,crossovered_budget_line:0
#: view:account.budget.post:0
#: field:account.budget.post,crossovered_budget_line:0
#: view:crossovered.budget:0
#: field:crossovered.budget,crossovered_budget_line:0
#: view:crossovered.budget.lines:0
#: model:ir.actions.act_window,name:account_budget.act_account_analytic_account_cb_lines
#: model:ir.actions.act_window,name:account_budget.act_crossovered_budget_lines_view
#: model:ir.ui.menu,name:account_budget.menu_act_crossovered_budget_lines_view
msgid "Budget Lines"
msgstr "Budget linier"
#. module: account_budget
#: view:account.budget.analytic:0
#: view:account.budget.crossvered.report:0
#: view:account.budget.crossvered.summary.report:0
#: view:account.budget.report:0
#: view:crossovered.budget:0
msgid "Cancel"
msgstr ""
#. module: account_budget
#: model:ir.module.module,shortdesc:account_budget.module_meta_information
msgid "Budget Management"
msgstr "Budget administration"
#. module: account_budget
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Analysis from"
msgstr ""
@@ -185,13 +185,13 @@
<para style="terp_default_9"><font face="Helvetica" size="9.0" color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica" size="8.0"> [[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo']) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln']) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac']) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['perc']) ]]%</para>
@@ -205,13 +205,13 @@
<para style="terp_tblheader_Details">[[ repeatIn(funct_total(data['form']),'b') ]] Total:</para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo']) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln']) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac']) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">[[ formatLang(b['tot_perc']) ]]%</para>
@@ -223,4 +223,4 @@
</para>
</pto>
</story>
</document>
</document>
@@ -148,13 +148,13 @@
<para style="terp_default_9"><font color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ a['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['perc'], digits=2) ]]%</para>
@@ -168,13 +168,13 @@
<para style="terp_default_Bold_9"><font face="Helvetica">[[ repeatIn(funct_total(data['form']),'b') ]]</font>Total:</para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] </para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_perc'], digits=2) ]]%</para>
@@ -163,13 +163,13 @@
<para style="terp_default_9"><font face="Helvetica" size="10.0" color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica" size="8.0">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], dp='Account') ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], dp='Account', currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], dp='Account') ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], dp='Account', currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], dp='Account') ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], dp='Account', currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['perc'],digits=2) ]]%</para>
@@ -183,13 +183,13 @@
<para style="terp_tblheader_Details">[[ repeatIn(funct_total(data['form']),'b') ]] Total :</para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], dp='Account') ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], dp='Account', currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], dp='Account') ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], dp='Account', currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], dp='Account') ]] [[ company.currency_id.symbol ]]</para>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], dp='Account', currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">[[ formatLang(b['tot_perc'],digits=2) ]]%</para>
+14 -1
View File
@@ -63,7 +63,20 @@ class followup_line(osv.osv):
}
_defaults = {
'start': 'days',
}
def _check_description(self, cr, uid, ids, context=None):
for line in self.browse(cr, uid, ids, context=context):
if line.description:
try:
line.description % {'partner_name': '', 'date':'', 'user_signature': '', 'company_name': ''}
except:
return False
return True
_constraints = [
(_check_description, 'Your description is invalid, use the right legend or %% if you want to use the percent character.', ['description']),
]
followup_line()
@@ -101,4 +114,4 @@ Thanks,
res_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -164,7 +164,7 @@
<!-- Configure Follow-Ups Wizard -->
<record id="action_view_account_followup_followup_form" model="ir.actions.act_window">
<field name="name">Configure Follow-Ups</field>
<field name="name">Review Invoicing Follow-Ups</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account_followup.followup</field>
<field name="view_type">form</field>
@@ -115,12 +115,13 @@ class account_followup_print_all(osv.osv_memory):
_name = 'account.followup.print.all'
_description = 'Print Followup & Send Mail to Customers'
_columns = {
'partner_ids': fields.many2many('account_followup.stat.by.partner', 'partner_stat_rel', 'osv_memory_id', 'partner_id', 'Partners', required=True, domain="[('account_id.type', '=', 'receivable'), ('account_id.reconcile', '=', True), ('reconcile_id','=', False), ('state', '!=', 'draft'), ('account_id.active', '=', True), ('debit', '>', 0)]"),
'partner_ids': fields.many2many('account_followup.stat.by.partner', 'partner_stat_rel', 'osv_memory_id', 'partner_id', 'Partners', required=True),
'email_conf': fields.boolean('Send email confirmation'),
'email_subject': fields.char('Email Subject', size=64),
'partner_lang': fields.boolean('Send Email in Partner Language', help='Do not change message text, if you want to send email in partner language, or configure from company'),
'email_body': fields.text('Email body'),
'summary': fields.text('Summary', required=True, readonly=True)
'summary': fields.text('Summary', required=True, readonly=True),
'test_print': fields.boolean('Test Print', help='Check if you want to print followups without changing followups level.')
}
def _get_summary(self, cr, uid, context=None):
if context is None:
@@ -316,14 +317,15 @@ class account_followup_print_all(osv.osv_memory):
to_update = res
data['followup_id'] = 'followup_id' in context and context['followup_id'] or False
date = 'date' in context and context['date'] or data['date']
for id in to_update.keys():
if to_update[id]['partner_id'] in data['partner_ids']:
cr.execute(
"UPDATE account_move_line "\
"SET followup_line_id=%s, followup_date=%s "\
"WHERE id=%s",
(to_update[id]['level'],
date, int(id),))
if not data['test_print']:
for id in to_update.keys():
if to_update[id]['partner_id'] in data['partner_ids']:
cr.execute(
"UPDATE account_move_line "\
"SET followup_line_id=%s, followup_date=%s "\
"WHERE id=%s",
(to_update[id]['level'],
date, int(id),))
data.update({'date': context['date']})
datas = {
'ids': [],
@@ -86,6 +86,7 @@
<page string="Email Settings">
<field name="email_conf" colspan="4"/>
<field name="partner_lang" colspan="4"/>
<field name="test_print" colspan="4"/>
<field name="email_subject" colspan="4"/>
<separator string="Email body" colspan="4" />
<field name="email_body" colspan="4" nolabel="1"/>
@@ -1,21 +1,21 @@
<?xml version="1.0"?>
<openerp>
<data>
<data>
<report id="account_invoices_1"
string="Invoices with Layout"
model="account.invoice"
name="account.invoice.layout"
rml="account_invoice_layout/report/report_account_invoice_layout.rml"
auto="False"/>
<report id="account_invoices_layout_message"
menu="False"
string="Invoices with Layout and Message"
model="account.invoice"
name="notify_account.invoice"
rml="account_invoice_layout/report/special_message_invoice.rml"
auto="False"/>
<report id="account_invoices_1"
string="Invoices"
model="account.invoice"
name="account.invoice.layout"
rml="account_invoice_layout/report/report_account_invoice_layout.rml"
auto="False"/>
<report id="account_invoices_layout_message"
menu="False"
string="Invoices and Message"
model="account.invoice"
name="notify_account.invoice"
rml="account_invoice_layout/report/special_message_invoice.rml"
auto="False"/>
</data>
</data>
</openerp>
@@ -182,28 +182,6 @@
<images/>
</stylesheet>
<story>
<pto>
<pto_header>
<blockTable colWidths="283.0,71.0,57.0,57.0,71.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_Right">Price</para>
</td>
</tr>
</blockTable>
</pto_header>
<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">
@@ -505,6 +483,5 @@
<para style="Standard">
<font color="white"> </font>
</para>
</pto>
</story>
</document>
@@ -186,28 +186,6 @@
<images/>
</stylesheet>
<story>
<pto>
<pto_header>
<blockTable colWidths="283.0,71.0,57.0,57.0,71.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_Right">Price</para>
</td>
</tr>
</blockTable>
</pto_header>
<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">
@@ -523,6 +501,5 @@
<para style="terp_default_9">
<font color="white"> </font>
</para>
</pto>
</story>
</document>
@@ -1,22 +1,9 @@
-
In order to Print the Invoice layout report in Normal Mode, we will create a invoice record
-
!record {model: account.invoice, id: test_invoice_1}:
currency_id: base.EUR
company_id: base.main_company
address_invoice_id: base.res_partner_address_tang
partner_id: base.res_partner_asus
state: draft
type: out_invoice
account_id: account.a_recv
name: Test invoice 1
address_contact_id: base.res_partner_address_tang
-
Print the Invoice layout report in Normal Mode
-
!python {model: account.invoice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('test_invoice_1')], {}, {})
(data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('account.demo_invoice_0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout.'+format), 'wb+').write(data)
@@ -25,7 +12,7 @@
-
!python {model: account.invoice}: |
ctx={}
ctx.update({'model': 'account.invoice','active_ids': [ref('test_invoice_1')]})
ctx.update({'model': 'account.invoice','active_ids': [ref('account.demo_invoice_0')]})
data_dict = {'message':ref('account_invoice_layout.demo_message1')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_invoice_special_msg',wiz_data=data_dict, context=ctx, our_module='account_invoice_layout')
@@ -2,43 +2,43 @@
<openerp>
<data>
<record id="account_invoice_special_msg_view" model="ir.ui.view">
<field name="name">Account Invioce Special Message</field>
<field name="model">account.invoice.special.msg</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Message">
<group colspan="4" col="6">
<field name="message"/>
</group>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
</field>
</record>
<record id="account_invoice_special_msg_view" model="ir.ui.view">
<field name="name">Account Invioce Special Message</field>
<field name="model">account.invoice.special.msg</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Message">
<group colspan="4" col="6">
<field name="message"/>
</group>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
</field>
</record>
<record id="action_account_invoice_special_msg" model="ir.actions.act_window">
<field name="name">Invoices with Layout and Message</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.invoice.special.msg</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_invoice_special_msg_view"/>
<field name="target">new</field>
</record>
<record id="action_account_invoice_special_msg" model="ir.actions.act_window">
<field name="name">Invoices and Message</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.invoice.special.msg</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_invoice_special_msg_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="account_invoice_special_msg_values">
<field name="model_id" ref="account.model_account_invoice" />
<field name="object" eval="1" />
<field name="name">Account Invioce Special Message</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_invoice_special_msg'))" />
<field name="key">action</field>
<field name="model">account.invoice</field>
</record>
<record model="ir.values" id="account_invoice_special_msg_values">
<field name="model_id" ref="account.model_account_invoice" />
<field name="object" eval="1" />
<field name="name">Account Invioce Special Message</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_invoice_special_msg'))" />
<field name="key">action</field>
<field name="model">account.invoice</field>
</record>
</data>
</openerp>
</openerp>
+1 -1
View File
@@ -70,7 +70,7 @@
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='ref']" position="after">
<xpath expr="//field[@name='move_id']" position="after">
<field name="internal_sequence_number"/>
</xpath>
</data>
+3 -3
View File
@@ -265,7 +265,7 @@ class account_voucher(osv.osv):
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
'company_currency': fields.related('company_id','currency_id', type='many2one', relation='res.currency', string='Currency', readonly=True),
'state':fields.selection(
[('draft','Draft'),
[('draft','New'),
('proforma','Pro-forma'),
('posted','Posted'),
('cancel','Cancelled')
@@ -807,11 +807,11 @@ class account_voucher(osv.osv):
if voucher.currency_rate_difference > 0:
account_id = voucher.company_id.property_expense_currency_exchange
if not account_id:
raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! "))
raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! "))
else:
account_id = voucher.company_id.property_income_currency_exchange
if not account_id:
raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! "))
raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! "))
currency_diff_line = {
'name': _('Currency Difference'),
@@ -102,7 +102,7 @@
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile this record ?"/>
<button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
@@ -280,7 +280,7 @@
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)" confirm="Are you sure to unreconcile this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
@@ -455,7 +455,7 @@
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
@@ -149,7 +149,7 @@
</page>
</notebook>
<group col="8" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
@@ -270,7 +270,7 @@
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<group attrs="{'invisible':['|', ('state','!=','posted'), ('paid','=',True)]}">
+1 -1
View File
@@ -168,7 +168,7 @@ class account_analytic_account(osv.osv):
'date_start': fields.date('Date Start'),
'date': fields.date('Date End', select=True),
'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts.
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
'state': fields.selection([('draft','New'),('open','Started'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
help='* When an account is created its in \'Draft\' state.\
\n* If any associated partner is there, it can be in \'Open\' state.\
\n* If any pending balance is there it can be in \'Pending\'. \
+12 -10
View File
@@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-05 23:03+0000\n"
"Last-Translator: Majed Majbour <Unknown>\n"
"PO-Revision-Date: 2011-09-22 02:41+0000\n"
"Last-Translator: kifcaliph <kifcaliph@hotmail.com>\n"
"Language-Team: Arabic <ar@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-07 04:35+0000\n"
"X-Generator: Launchpad (build 13861)\n"
"X-Launchpad-Export-Date: 2011-09-23 04:39+0000\n"
"X-Generator: Launchpad (build 14012)\n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
@@ -25,7 +25,7 @@ msgstr "حساب فرعي"
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
msgstr ""
msgstr "اسم الحساب"
#. module: analytic
#: help:account.analytic.line,unit_amount:0
@@ -44,12 +44,12 @@ msgstr ""
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
msgstr ""
msgstr "المحافظة / الولاية"
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
msgstr ""
msgstr "مدير المحاسبة"
#. module: analytic
#: selection:account.analytic.account,state:0
@@ -114,7 +114,7 @@ msgstr "وصف"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
msgstr ""
msgstr "عادي"
#. module: analytic
#: field:account.analytic.account,company_id:0
@@ -185,7 +185,7 @@ msgstr "جهة الإتصال"
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr ""
msgstr "خطأ! العملة لابد و أن تكون مثل العملة للشركة المختارة"
#. module: analytic
#: selection:account.analytic.account,state:0
@@ -208,11 +208,13 @@ msgid ""
"If you select the View Type, it means you won't allow to create journal "
"entries using that account."
msgstr ""
"اذا اخترت نوع العرض، فذلك يعني انك لن تسمح بإنشاء قيود اليومية بإستخدام ذلك "
"الحساب."
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
msgstr ""
msgstr "نهاية التاريخ"
#. module: analytic
#: field:account.analytic.account,code:0
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -21,14 +21,15 @@
from report.interface import report_int
import netsvc
import openerp.pooler
class report_artistlot(report_int):
def __init__(self, name):
report_int.__init__(self, name)
def create(self, cr, uid, ids, datas, context):
service = netsvc.LocalService("object_proxy")
lots = service.execute(cr.dbname, uid, 'auction.lots', 'read', ids, ['artist_id'])
pool = pooler.get_pool(cr.dbname)
lots = pool.get('auction.lots').read(cr, uid, ids, ['artist_id'])
artists = []
for lot in lots:
if lot['artist_id'] and lot['artist_id'] not in artists:
+4 -4
View File
@@ -20,15 +20,15 @@
##############################################################################
from report.interface import report_int
import netsvc
import openerp.pooler
class auction_seller(report_int):
def __init__(self, name):
report_int.__init__(self, name)
def create(self, cr, uid, ids, datas, context):
service = netsvc.LocalService("object_proxy")
lots = service.execute(cr.dbname, uid, 'auction.lots', 'read', ids, ['bord_vnd_id'])
pool = openerp.pooler.get_pool(cr.dbname)
lots = pool.get('auction.lots').read(cr, uid, ids, ['bord_vnd_id'])
bords = {}
for l in lots:
@@ -37,7 +37,7 @@ class auction_seller(report_int):
new_ids = bords.keys()
parts = {}
partners = service.execute(cr.dbname, uid, 'auction.deposit', 'read', new_ids, ['partner_id'])
partners = pool.get('auction.deposit').read(cr, uid, new_ids, ['partner_id'])
for l in partners:
if l['partner_id']:
parts[l['partner_id'][0]]=True
+3 -5
View File
@@ -32,10 +32,8 @@ class report_custom(report_rml):
report_rml.__init__(self, name, table, tmpl, xsl)
def create_xml(self, cr, uid, ids, datas, context=None):
service = netsvc.LocalService("object_proxy")
lots = service.execute(cr.dbname, uid, 'auction.lots', 'read', ids, ['obj_price','ach_login','obj_comm','lot_est1','lot_est2','bord_vnd_id','ach_emp','auction_id'])
auction = service.execute(cr.dbname, uid, 'auction.dates', 'read', [lots[0]['auction_id'][0]])[0]
lots = self.pool.get('auction.lots').read(cr, uid , ids, ['obj_price','ach_login','obj_comm','lot_est1','lot_est2','bord_vnd_id','ach_emp','auction_id'])
auction = self.pool.get('auction.dates').read(cr, uid, [lots[0]['auction_id'][0]])[0]
unsold = comm = emp = paid = unpaid = 0
est1 = est2 = adj = 0
@@ -75,7 +73,7 @@ class report_custom(report_rml):
debit = adj
costs = service.execute(cr.dbname, uid, 'auction.lots', 'compute_seller_costs', ids)
costs = self.pool.get('auction.lots').compute_seller_costs(cr, uid, ids)
for cost in costs:
debit += cost['amount']
+2 -4
View File
@@ -141,9 +141,8 @@ class auction_lots_send_aie(osv.osv_memory):
def _photos_send(cr, uid, uname, passwd, did, ids):
service = netsvc.LocalService("object_proxy")
for (ref,id) in ids:
datas = service.execute(cr.db_name, uid, 'auction.lots', 'read', [id], ['name','image'])
datas = self.pool.get('auction.lots').read(cr, uid, [id], ['name','image'])
if len(datas):
bin = base64.decodestring(datas[0]['image'])
fname = datas[0]['name']
@@ -186,8 +185,7 @@ class auction_lots_send_aie(osv.osv_memory):
if context is None:
context = {}
service = netsvc.LocalService("object_proxy")
lots = service.execute(cr.dbname, uid, 'auction.lots', 'read', context.get('active_ids',[]), ['obj_num','lot_num','obj_desc','bord_vnd_id','lot_est1','lot_est2','artist_id','lot_type','aie_categ'])
lots = self.pool.get('auction.lots').read(cr, uid, context.get('active_ids',[]), ['obj_num','lot_num','obj_desc','bord_vnd_id','lot_est1','lot_est2','artist_id','lot_type','aie_categ'])
lots_ids = []
datas = self.read(cr, uid, ids[0],['uname','login','lang','numerotation','dates'])
for l in lots:
@@ -132,9 +132,8 @@ class auction_lots_pay(osv.osv_memory):
if context is None:
context = {}
import pickle
service = netsvc.LocalService("object_proxy")
datas = self.read(cr, uid, ids[0],['uname','password','dates'])
lots = service.execute(cr.dbname, uid, 'auction.lots', 'read', context['active_ids'], ['obj_num','obj_price'])
lots = self.pool.get('auction.lots').read(cr, uid, context['active_ids'], ['obj_num','obj_price'])
args = pickle.dumps(lots)
self._catalog_send(datas['uname'], datas['password'], datas['dates'], args)
return {'type': 'ir.actions.act_window_close'}
@@ -49,9 +49,8 @@ class auction_lots_invoice(osv.osv_memory):
if context is None:
context = {}
res = super(auction_lots_invoice, self).default_get(cr, uid, fields, context=context)
service = netsvc.LocalService("object_proxy")
lots = service.execute(cr.dbname, uid, 'auction.lots', 'read', context.get('active_ids', []))
auction = service.execute(cr.dbname, uid, 'auction.dates', 'read', [lots[0]['auction_id'][0]])[0]
lots = self.pool.get('auction.lots').read(cr, uid, context.get('active_ids', []))
auction = self.pool.get('auction.dates').read(cr, uid, [lots[0]['auction_id'][0]])[0]
price = 0.0
price_topay = 0.0
@@ -59,7 +58,7 @@ class auction_lots_invoice(osv.osv_memory):
for lot in lots:
price_lot = lot['obj_price'] or 0.0
costs = service.execute(cr.dbname, uid, 'auction.lots', 'compute_buyer_costs', [lot['id']])
costs = self.pool.get('auction.lots').compute_buyer_costs(cr, uid, [lot['id']])
price_lot += costs['amount']
price += price_lot
@@ -68,7 +67,7 @@ class auction_lots_invoice(osv.osv_memory):
raise osv.except_osv(_('UserError'), _('Two different buyers for the same invoice !\nPlease correct this problem before invoicing'))
uid = lot['ach_uid'][0]
elif lot['ach_login']:
refs = service.execute(uid, 'res.partner', 'search', [('ref','=',lot['ach_login'])])
refs = self.pool.get('res.partner').search(cr, uid, [('ref','=',lot['ach_login'])])
if len(refs):
uid = refs[-1]
if 'ach_pay_id' in lot and lot['ach_pay_id']:
@@ -105,7 +104,6 @@ class auction_lots_invoice(osv.osv_memory):
"""
if context is None:
context = {}
service = netsvc.LocalService("object_proxy")
datas = {'ids' : context.get('active_ids',[])}
res = self.read(cr, uid, ids, ['number','ach_uid'])
res = res and res[0] or {}
+502
View File
@@ -0,0 +1,502 @@
# Danish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-26 15:35+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-27 04:47+0000\n"
"X-Generator: Launchpad (build 14028)\n"
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_user:0
msgid ""
"Check this if you want the rule to send an email to the responsible person."
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_remind_partner:0
msgid "Remind Partner"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_partner_categ_id:0
msgid "Partner Category"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_watchers:0
msgid "Mail to Watchers (CC)"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_state_to:0
msgid "Button Pressed"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,model_id:0
msgid "Object"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_email:0
msgid "Mail to these Emails"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_state:0
msgid "Set State to"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_email_from:0
msgid "Email From"
msgstr "E-mail fra"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Body"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Days"
msgstr "Dage"
#. module: base_action_rule
#: field:base.action.rule,last_run:0
msgid "Last Run"
msgstr ""
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:313
#, python-format
msgid "Error!"
msgstr "Fejl!"
#. module: base_action_rule
#: field:base.action.rule,act_reply_to:0
msgid "Reply-To"
msgstr "Svar til"
#. module: base_action_rule
#: help:base.action.rule,act_email_cc:0
msgid ""
"These people will receive a copy of the future communication between partner "
"and users by email"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Minutes"
msgstr "Minutter"
#. module: base_action_rule
#: field:base.action.rule,name:0
msgid "Rule Name"
msgstr "Regel Navn"
#. module: base_action_rule
#: help:base.action.rule,act_remind_partner:0
msgid ""
"Check this if you want the rule to send a reminder by email to the partner."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Partner"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Deadline"
msgstr "Deadline"
#. module: base_action_rule
#: field:base.action.rule,trg_partner_id:0
msgid "Partner"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_subject)s = Object subject"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Reminders"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Special Keywords to Be Used in The Body"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_state_from:0
msgid "State"
msgstr ""
#. module: base_action_rule
#: model:ir.actions.act_window,help:base_action_rule.base_action_rule_act
msgid ""
"Use automated actions to automatically trigger actions for various screens. "
"Example: a lead created by a specific user may be automatically set to a "
"specific sales team, or an opportunity which still has status pending after "
"14 days might trigger an automatic reminder email."
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_email:0
msgid "Email-id of the persons whom mail is to be sent"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
#: model:ir.module.module,shortdesc:base_action_rule.module_meta_information
msgid "Action Rule"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Fields to Change"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Creation Date"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Last Action Date"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Hours"
msgstr "Timer"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_id)s = Object ID"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Delay After Trigger Date"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_remind_attach:0
msgid "Remind with Attachment"
msgstr ""
#. module: base_action_rule
#: constraint:ir.cron:0
msgid "Invalid arguments"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_user_id:0
msgid "Set Responsible to"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "None"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_email_to:0
msgid ""
"Use a python expression to specify the right field on which one than we will "
"use for the 'To' field of the header"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_phone)s = Responsible phone"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid ""
"The rule uses the AND operator. The model must match all non-empty fields so "
"that the rule executes the action described in the 'Actions' tab."
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_date_range_type:0
msgid "Delay type"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,regex_name:0
msgid ""
"Regular expression for matching name of the resource\n"
"e.g.: 'urgent.*' will search for records having name starting with the "
"string 'urgent'\n"
"Note: This is case sensitive search."
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_method:0
msgid "Call Object Method"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_email_to:0
msgid "Email To"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_watchers:0
msgid ""
"Check this if you want the rule to mark CC(mail to any other person defined "
"in actions)."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner)s = Partner name"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Note"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_email_from:0
msgid ""
"Use a python expression to specify the right field on which one than we will "
"use for the 'From' field of the header"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_date_range:0
msgid "Delay after trigger date"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,trg_date_range:0
msgid ""
"Delay After Trigger Date,specifies you can put a negative number. If you "
"need a delay before the trigger date, like sending a reminder 15 minutes "
"before a meeting."
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,active:0
msgid "Active"
msgstr "Aktiv"
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:314
#, python-format
msgid "No E-Mail ID Found for your Company address!"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_remind_user:0
msgid "Remind Responsible"
msgstr ""
#. module: base_action_rule
#: model:ir.module.module,description:base_action_rule.module_meta_information
msgid "This module allows to implement action rules for any object."
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,sequence:0
msgid "Gives the sequence order when displaying a list of rules."
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Months"
msgstr "Måneder"
#. module: base_action_rule
#: field:base.action.rule,filter_id:0
msgid "Filter"
msgstr "Filter"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Date"
msgstr "Dato"
#. module: base_action_rule
#: help:base.action.rule,server_action_id:0
msgid ""
"Describes the action name.\n"
"eg:on which object which action to be taken on basis of which condition"
msgstr ""
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_ir_cron
msgid "ir.cron"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_description)s = Object description"
msgstr ""
#. module: base_action_rule
#: constraint:base.action.rule:0
msgid "Error: The mail is not well formated"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Actions"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Information"
msgstr ""
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_base_action_rule
msgid "Action Rules"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_mail_body:0
msgid "Content of mail"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_user_id:0
msgid "Responsible"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner_email)s = Partner Email"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_date)s = Creation date"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_email)s = Responsible Email"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_mail_body:0
msgid "Mail body"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_remind_user:0
msgid ""
"Check this if you want the rule to send a reminder by email to the user."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Server Action to be Triggered"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_user:0
msgid "Mail to Responsible"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_email_cc:0
msgid "Add Watchers (Cc)"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Fields"
msgstr ""
#. module: base_action_rule
#: model:ir.actions.act_window,name:base_action_rule.base_action_rule_act
#: model:ir.ui.menu,name:base_action_rule.menu_base_action_rule_form
msgid "Automated Actions"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,server_action_id:0
msgid "Server Action"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,regex_name:0
msgid "Regex on Resource Name"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_remind_attach:0
msgid ""
"Check this if you want that all documents attached to the object be attached "
"to the reminder email sent."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Timing"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,sequence:0
msgid "Sequence"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Actions"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,active:0
msgid ""
"If the active field is set to False, it will allow you to hide the rule "
"without removing it."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user)s = Responsible name"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,create_date:0
msgid "Create Date"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on States"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_date_type:0
msgid "Trigger Date"
msgstr ""
File diff suppressed because it is too large Load Diff
+10 -1
View File
@@ -128,6 +128,12 @@ class res_partner_bank(osv.osv):
return _('The IBAN does not seem to be correct. You should have entered something like this %s'), (iban_example)
return _('The IBAN is invalid, it should begin with the country code'), ()
def _check_bank(self, cr, uid, ids, context=None):
for partner_bank in self.browse(cr, uid, ids, context=context):
if partner_bank.state == 'iban' and not partner_bank.bank.bic:
return False
return True
def get_bban_from_iban(self, cr, uid, ids, context=None):
'''
This function returns the bank account number computed from the iban account number, thanks to the mapping_list dictionary that contains the rules associated to its country.
@@ -157,7 +163,10 @@ class res_partner_bank(osv.osv):
# to not break community modules.
'iban': fields.related('acc_number', string='IBAN', size=34, readonly=True, help="International Bank Account Number", type="char"),
}
_constraints = [(check_iban, _construct_constraint_msg, ["acc_number"])]
_constraints = [
(check_iban, _construct_constraint_msg, ["iban"]),
(_check_bank, '\nPlease define BIC/Swift code on bank for bank type IBAN Account to make valid payments', ['bic'])
]
res_partner_bank()
+92
View File
@@ -0,0 +1,92 @@
# Danish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-23 16:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-24 04:58+0000\n"
"X-Generator: Launchpad (build 14012)\n"
#. module: base_iban
#: model:ir.module.module,shortdesc:base_iban.module_meta_information
msgid "Create IBAN bank accounts"
msgstr ""
#. module: base_iban
#: code:addons/base_iban/base_iban.py:120
#, python-format
msgid ""
"The IBAN does not seems to be correct. You should have entered something "
"like this %s"
msgstr ""
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_zip_field
msgid "zip"
msgstr ""
#. module: base_iban
#: help:res.partner.bank,iban:0
msgid "International Bank Account Number"
msgstr ""
#. module: base_iban
#: model:ir.model,name:base_iban.model_res_partner_bank
msgid "Bank Accounts"
msgstr "Bankkonti"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_country_field
msgid "country_id"
msgstr ""
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_swift_field
msgid "bic"
msgstr ""
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_iban_field
msgid "iban"
msgstr ""
#. module: base_iban
#: code:addons/base_iban/base_iban.py:121
#, python-format
msgid "The IBAN is invalid, It should begin with the country code"
msgstr ""
#. module: base_iban
#: field:res.partner.bank,iban:0
msgid "IBAN"
msgstr "IBAN"
#. module: base_iban
#: model:res.partner.bank.type,name:base_iban.bank_iban
msgid "IBAN Account"
msgstr ""
#. module: base_iban
#: model:ir.module.module,description:base_iban.module_meta_information
msgid ""
"\n"
"This module installs the base for IBAN (International Bank Account Number) "
"bank accounts and checks for its validity.\n"
"\n"
" "
msgstr ""
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_acc_number_field
msgid "acc_number"
msgstr ""
+6 -5
View File
@@ -8,14 +8,15 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-01-12 20:19+0000\n"
"Last-Translator: Quentin THEURET <Unknown>\n"
"PO-Revision-Date: 2011-09-26 12:09+0000\n"
"Last-Translator: Maxime Chambreuil (http://www.savoirfairelinux.com) "
"<maxime.chambreuil@savoirfairelinux.com>\n"
"Language-Team: French <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-05 05:42+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2011-09-27 04:47+0000\n"
"X-Generator: Launchpad (build 14028)\n"
#. module: base_module_quality
#: code:addons/base_module_quality/object_test/object_test.py:187
@@ -390,7 +391,7 @@ msgstr "Erreur ! Le module n'est pas correctement chargé/installé."
#: code:addons/base_module_quality/speed_test/speed_test.py:116
#, python-format
msgid "Error in Read method: %s"
msgstr ""
msgstr "Erreur dans la méthode Read : %s"
#. module: base_module_quality
#: code:addons/base_module_quality/speed_test/speed_test.py:138
+12 -12
View File
@@ -90,18 +90,18 @@
</record>
<!-- Import or create customers configartion view -->
<record id="action_import_create_installer" model="ir.actions.act_window">
<field name="name">Import or Create Customers</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="base.view_partner_tree"/>
<field name="help">Create some Customers, Suppliers and their contacts manually from this form or you can import your existing partners by CSV spreadsheet from "Import Data" wizard</field>
</record>
<record id="config_wizard_action_import_create_installer" model="ir.actions.todo">
<field name="action_id" ref="action_import_create_installer"/>
<field name="category_id" ref="base.category_administration_config"/>
<record id="action_import_create_installer" model="ir.actions.act_window">
<field name="name">Create or Import Customers</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="base.view_partner_tree"/>
<field name="help">Create or Import Customers and their contacts manually from this form or you can import your existing partners by CSV spreadsheet from "Import Data" wizard</field>
</record>
<record id="config_wizard_action_import_create_installer" model="ir.actions.todo">
<field name="action_id" ref="action_import_create_installer"/>
<field name="category_id" ref="base.category_sales_management_config"/>
</record>
<!-- Define default users preferences-->
+32
View File
@@ -0,0 +1,32 @@
# Danish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-23 15:37+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-24 04:59+0000\n"
"X-Generator: Launchpad (build 14012)\n"
#. module: base_tools
#: model:ir.module.module,shortdesc:base_tools.module_meta_information
msgid "Common base for tools modules"
msgstr ""
#. module: base_tools
#: model:ir.module.module,description:base_tools.module_meta_information
msgid ""
"\n"
" "
msgstr ""
"\n"
" "
+5
View File
@@ -126,6 +126,11 @@ Creates a dashboard for CRM that includes:
'test/test_crm_recurrent_meeting.yml',
'test/test_crm_stage_changes.yml',
'test/test_crm_recurrent_meeting_case2.yml',
'test/test_crm_lead_case2.yml',
'test/test_crm_opportunity_case2.yml',
'test/test_crm_phonecall_case2.yml',
'test/test_crm_partner2opportunity.yml',
'test/test_crm_segmentation.yml',
],
'installable': True,
'active': False,
+2 -2
View File
@@ -29,8 +29,8 @@ from tools.translate import _
MAX_LEVEL = 15
AVAILABLE_STATES = [
('draft', 'Draft'),
('open', 'Open'),
('draft', 'New'),
('open', 'In Progress'),
('cancel', 'Cancelled'),
('done', 'Closed'),
('pending', 'Pending'),
+2
View File
@@ -30,6 +30,7 @@ class crm_installer(osv.osv_memory):
'crm_helpdesk': fields.boolean('Helpdesk', help="Manages a Helpdesk service."),
'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fundraising process and tracking."),
'crm_claim': fields.boolean('Claims', help="Manages the suppliers and customers claims, including your corrective or preventive actions."),
'import_sugarcrm': fields.boolean('Import Data from SugarCRM', help="Help you to import and update data from SugarCRM to OpenERP"),
'crm_caldav': fields.boolean('Calendar Synchronizing', help="Helps you to synchronize the meetings with other calendar clients and mobiles."),
'sale_crm': fields.boolean('Opportunity to Quotation', help="Create a Quotation from an Opportunity."),
'fetchmail': fields.boolean('Fetch Emails', help="Allows you to receive E-Mails from POP/IMAP server."),
@@ -49,6 +50,7 @@ class crm_installer(osv.osv_memory):
nodes = doc.xpath("//field[@name='sale_crm']")
for node in nodes:
node.set('invisible', '0')
node.set('modifiers', '{}')
res['arch'] = etree.tostring(doc)
return res
+4 -2
View File
@@ -16,6 +16,7 @@
<field name="wiki_sale_faq" groups="base.group_extended"/>
<field name="sale_crm" invisible="1" groups="base.group_extended"/>
<field name="crm_caldav"/>
<field name="import_sugarcrm"/>
<field name="fetchmail"/>
<field name="thunderbird"/>
<field name="outlook"/>
@@ -25,7 +26,7 @@
</record>
<record model="ir.actions.act_window" id="crm_case_section_view_form_installer">
<field name="name">Create Sales Team</field>
<field name="name">Define Sales Team</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">crm.case.section</field>
<field name="view_type">form</field>
@@ -38,6 +39,7 @@
<field name="action_id" ref="crm_case_section_view_form_installer"/>
<field name="category_id" ref="base.category_sales_management_config"/>
<field name="sequence">10</field>
<field name="groups_id" eval="[(6, 0, [ref('base.group_extended')])]" />
</record>
<record model="ir.actions.act_window" id="crm_case_stage_form_installer">
@@ -53,8 +55,8 @@
<record id="crm_case_stage_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="crm_case_stage_form_installer"/>
<field name="category_id" ref="base.category_sales_management_config"/>
<field name="groups_id" eval="[(6, 0, [ref('base.group_extended')])]" />
<field name="sequence">10</field>
</record>
</data>
</openerp>
+11 -12
View File
@@ -120,7 +120,7 @@
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
@@ -195,7 +195,7 @@
<field name="email_cc" size="512" attrs="{'invisible': [('email_from', '=', False)]}"/>
</group>
<field name="subject" colspan="4" widget="char" attrs="{'invisible': [('email_from', '=', False)]}" size="512"/>
<field name="body_text" colspan="4" attrs="{'invisible': [('email_from', '!=', False)]}"/>
<field name="display_text" colspan="4" attrs="{'invisible': [('email_from', '!=', False)]}"/>
</group>
<notebook colspan="4">
<page string="Details" attrs="{'invisible': [('email_from', '=', False)]}">
@@ -302,7 +302,7 @@
<field name="state"/>
<field name="color"/>
<field name="priority"/>
<field name="planned_revenue"/>
<field name="planned_revenue" sum="Expected Revenues"/>
<field name="user_email"/>
<templates>
<t t-name="kanban-box">
@@ -341,7 +341,6 @@
<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
<div class="oe_kanban_left">
<a string="Edit" icon="gtk-edit" type="edit"/>
<a string="Delete" icon="gtk-close" type="delete"/>
<a string="Change Color" icon="color-picker" type="color" name="color"/>
<a string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
<a string="Schedule/Log Call" name="%(opportunity2phonecall_act)d" icon="terp-call-start" type="action"/>
@@ -372,9 +371,9 @@
<field name="arch" type="xml">
<search string="Search Leads">
<filter icon="terp-check"
string="Current"
name="current" help="Draft, Open and Pending Leads"
domain="[('state','in',('draft','open','pending'))]"/>
string="New"
name="current" help="New Leads"
domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test"
string="Open"
domain="[('state','=','open')]"/>
@@ -412,7 +411,7 @@
</field>
<separator orientation="vertical"/>
<field name="country_id" context="{'invisible_country': False}">
<filter icon="terp-personal+" context="{'invisible_country': False}" help="Show countries"/>
<filter icon="terp-personal+" context="{'invisible_country': False}" help="Show countries"/>
</field>
<newline/>
<group expand="0" string="Group By...">
@@ -516,7 +515,7 @@
<separator colspan="4"/>
<group col="10" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel" states="draft" type="object" icon="gtk-cancel" />
<button name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert" />
@@ -581,7 +580,7 @@
<field name="email_cc" size="512" attrs="{'invisible': [('email_from', '=', False)]}"/>
</group>
<field name="subject" colspan="4" widget="char" attrs="{'invisible': [('email_from', '=', False)]}" size="512"/>
<field name="body_text" colspan="4" attrs="{'invisible': [('email_from', '!=', False)]}"/>
<field name="display_text" colspan="4" attrs="{'invisible': [('email_from', '!=', False)]}"/>
</group>
<notebook colspan="4">
<page string="Details" attrs="{'invisible': [('email_from', '=', False)]}">
@@ -675,9 +674,9 @@
<field name="arch" type="xml">
<search string="Search Opportunities">
<filter icon="terp-check"
string="Current" help="Draft, Open and Pending Opportunities"
string="New" help="New Opportunities"
name="current"
domain="[('state','in',('draft','open','pending'))]"/>
domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test"
string="Open" help="Open Opportunities"
domain="[('state','=','open')]"/>
+1 -1
View File
@@ -58,7 +58,7 @@
<field name="section_id" widget="selection"
groups="base.group_extended"/>
</group><group col="2" colspan="2">
<separator colspan="2" string="Contact"/>
<separator colspan="2" string="Contacts"/>
<field name="partner_id" string="Partner"
on_change="onchange_partner_id(partner_id)" />
<field name="partner_address_id"
+1 -1
View File
@@ -106,7 +106,7 @@
<field name="view_id" ref="crm_case_phone_tree_view"/>
<field name="domain">[('state','!=','done')]</field>
<field name="context" eval="'{\'search_default_section_id\':section_id, \'default_state\':\'open\', \'search_default_current\':1,\'search_default_today\':1}'"/>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
<field name="search_view_id" ref="crm.view_crm_case_scheduled_phonecalls_filter"/>
<field name="help">Scheduled calls list all the calls to be done by your sales team. A salesman can record the information about the call in the form view. This information will be stored in the partner form to trace every contact you have with a customer. You can also import a .CSV file with a list of calls to be done by your sales team.</field>
</record>
+51 -4
View File
@@ -107,7 +107,7 @@
<field name="description" nolabel="1" colspan="4" />
<separator colspan="4" />
<group col="8" colspan="4">
<field name="state" select="1" />
<field name="state" widget="statusbar" statusbar_visible="open,done" statusbar_colors='{"pending":"red"}' select="1"/>
<button name="case_cancel" string="Cancel"
states="open,pending" type="object"
icon="gtk-cancel" />
@@ -182,9 +182,6 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Phonecalls">
<filter icon="terp-check" string="Current"
name="current"
domain="[('state','in', ('open','pending'))]"/>
<filter icon="terp-go-today" string="Today"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')),
('date','&gt;=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
@@ -226,6 +223,56 @@
</search>
</field>
</record>
<!-- Scheduled a phonecall search view-->
<record id="view_crm_case_scheduled_phonecalls_filter" model="ir.ui.view">
<field name="name">CRM - Scheduled Calls Search</field>
<field name="model">crm.phonecall</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Scheduled Phonecalls">
<filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Today"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')),
('date','&gt;=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
name="today"
help="Todays's Phonecalls"
/>
<filter icon="terp-go-week"
string="7 Days"
help="Phonecalls during last 7 days"
domain="[('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="partner_id"/>
<field name="user_id">
<filter icon="terp-personal-"
domain="[('user_id','=',False)]"
help="Unassigned Phonecalls" />
</field>
<field name="section_id"
widget="selection" string="Sales Team">
<filter icon="terp-personal+" groups="base.group_extended"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
<newline/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]"
context="{'group_by':'partner_id'}" />
<filter string="Responsible" icon="terp-personal"
domain="[]" context="{'group_by':'user_id'}" />
<separator orientation="vertical" />
<filter string="Creation" icon="terp-go-month" help="Creation Date"
domain="[]" context="{'group_by':'create_date'}" />
<filter string="Date" icon="terp-go-month" domain="[]"
context="{'group_by':'date'}" help="Date of Call" />
</group>
</search>
</field>
</record>
</data>
</openerp>
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2011-01-18 16:45+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2011-09-26 12:10+0000\n"
"Last-Translator: lholivier <olivier.lenoir@free.fr>\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: 2011-09-05 05:06+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2011-09-27 04:47+0000\n"
"X-Generator: Launchpad (build 14028)\n"
#. module: crm
#: view:crm.lead.report:0
@@ -2512,7 +2512,7 @@ msgstr "L'étape de l'opportunité \"%s\" a été changé à \"%s\"."
#: code:addons/crm/crm_lead.py:282
#, python-format
msgid "Changed Stage to: %s"
msgstr ""
msgstr "Etape passée à : %s"
#. module: crm
#: selection:crm.segmentation.line,operator:0
+11 -5
View File
@@ -73,11 +73,13 @@
<search string="Leads Analysis">
<group>
<filter icon="terp-personal"
name="lead"
string="Lead"
domain="[('type','=', 'lead')]"
help="Show only lead"/>
<filter icon="terp-personal+"
string="Opportunity"
name="opportunity"
domain="[('type','=','opportunity')]"
help="Show only opportunity"/>
<separator orientation="vertical" />
@@ -93,9 +95,13 @@
<separator orientation="vertical" />
<filter icon="terp-check"
string="Active"
domain="[('state','in',('draft','open'))]"
help="Leads/Opportunities which are in draft and open state"/>
string="New"
domain="[('state','=','draft')]"
help="Leads/Opportunities which are in New state"/>
<filter icon="terp-camera_test"
string="Open"
domain="[('state','=','open')]"
help="Leads/Opportunities which are in open state"/>
<filter icon="gtk-media-pause"
string="Pending"
domain="[('state','=','pending')]"
@@ -209,7 +215,7 @@
<field name="name">Leads Analysis</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="context">{'search_default_filter_lead': 1, "search_default_user":1, "search_default_this_month":1, 'group_by_no_leaf':1, 'group_by':[]}</field>
<field name="context">{'search_default_lead': 1, "search_default_user":1, "search_default_this_month":1, 'group_by_no_leaf':1, 'group_by':[]}</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[]</field>
<field name="help">Leads Analysis allows you to check different CRM related information. Check for treatment delays, number of responses given and emails sent. You can sort out your leads analysis by different groups to get accurate grained analysis.</field>
@@ -231,7 +237,7 @@
<field name="name">Opportunities Analysis</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="context">{"search_default_filter_opportunity":1, "search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{"search_default_opportunity":1,"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">tree,graph</field>
<field name="help">Opportunities Analysis gives you an instant access to your opportunities with information such as the expected revenue, planned cost, missed deadlines or the number of interactions per opportunity. This report is mainly used by the sales manager in order to do the periodic review with the teams of the sales pipeline.</field>
</record>
+83 -7
View File
@@ -1,8 +1,18 @@
- |
- |
In order to test the CRM in OpenERP,
I will do a customer qualification process that
starts with a fist contact with a customer (a lead), which will be converted to a
business opportunity and a partner.
-
I check installer report.
-
!record {model: base.setup.installer , id: base_action_rule_0_1}:
name: Test_action
-
I create the view at the time of setup.
-
!python {model: base.setup.installer}: |
self.fields_view_get(cr, uid,view_id=None, view_type='form', context=None, toolbar=False, submenu=False)
- |
In order to test the flow, I create a two new users "user_crm" and
I assign the group "salesman".
@@ -25,26 +35,36 @@
email_from: info@mycustomer.com
name: New Customer
partner_name: Capegemini
partner_id: base.res_partner_9
phone: (855) 924-4364
mobile: (333) 715-1450
section_id: crm.section_sales_department
referred: False
- |
I check that the lead is in 'draft' state,
I check that the lead is in 'draft' state.
-
!assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in Draft}:
- state == "draft"
-
I open lead by click on "Open" button,
I open lead by click on "Open" button.
-
!python {model: crm.lead}: |
self.case_open(cr, uid, [ref("crm_lead_newcustomer0")])
fields={
'day_open': 0.0,
'day_close': 0.0
}
self._compute_day(cr, uid, [ref("crm_lead_newcustomer0")], fields, context)
- |
I check that lead is now in 'open' state.
-
!assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in open state}:
- state == "open"
-
I search id for case object.
-
!python {model: crm.case.categ}: |
self._find_object_id(cr, uid, context)
- |
As the lead seems to be a real business opportunity, I will convert it to a
partner
@@ -56,16 +76,40 @@
assert action['res_model'] == 'crm.lead2opportunity.partner'
-
|
Now, select "create a new partner" option in this wizard.
I select "create a new partner" option.
-
!record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_0}:
action: 'create'
name: 'convert'
-
Then, Click on "Create Opportunity" button of this wizard.
Then, Click on "Create Opportunity" button.
-
!python {model: crm.lead2opportunity.partner}: |
self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_0")], {'active_ids': [ref("crm_lead_newcustomer0")], 'active_id': ref("crm_lead_newcustomer0")})
-
|
I select "Link to an existing partner" option.
-
!record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_1}:
action: 'exist'
name: 'existing partner'
-
Then, Click on "Create Opportunity" button.
-
!python {model: crm.lead2opportunity.partner}: |
self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_1")], {'active_ids': [ref("crm_lead_newcustomer0")], 'active_id': ref("crm_lead_newcustomer0")})
-
|
I select "Do not link to a partner" option.
-
!record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_2}:
action: 'nothing'
name: 'Do not link to a partner'
-
Then, Click on "Create Opportunity" button.
-
!python {model: crm.lead2opportunity.partner}: |
self.action_apply(cr, uid, [ref("crm_lead2opportunity_partner_create_2")], {'active_ids': [ref("crm_lead_newcustomer0")], 'active_id': ref("crm_lead_newcustomer0")})
- |
In order to check the opportunity is created or not, I check type.
-
@@ -73,6 +117,39 @@
lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
assert lead.type == 'opportunity'
-
I create mass report of lead to opprtunity partner.
-
!record {model: crm.lead2opportunity.partner.mass, id: crm_lead2opportunity_partner_mass0}:
user_ids:
- base.user_root
section_id: crm.section_sales_department
-
Then, execute that mass wizard.
-
!python {model: crm.lead2opportunity.partner.mass}: |
self.mass_convert(cr, uid, [ref("crm_lead2opportunity_partner_mass0")],{'active_ids': [ref("crm_lead_newcustomer0")], 'active_id': ref("crm_lead_newcustomer0")})
-
I close lead by click on "close" button.
-
!python {model: crm.lead}: |
self.case_close(cr, uid, [ref("crm_lead_newcustomer0")])
- |
I check that lead is now in 'done' state.
-
!assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in done state}:
- state == "done"
-
I cancel lead by click on "cancel" button.
-
!python {model: crm.lead}: |
self.case_cancel(cr, uid, [ref("crm_lead_newcustomer0")])
- |
I check that lead is now in 'cancel' state.
-
!assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in cancel state}:
- state == "cancel"
#-
# |
# yaml is also not working with smtp server and send new email.
@@ -89,4 +166,3 @@
- |
I Reply to last Email to lead with some document attached.and check that communication history generated or not.
+151
View File
@@ -0,0 +1,151 @@
-
In order to do complete test the CRM in OpenERP,
I will create new full configured record and carry test on it.
- |
I Start by creating "Test Sales Team" with No Unlink.
I create a crm.case.section record.
-
!record {model: crm.case.section, id: crm_case_section_demosalesteam}:
code: DEMO
complete_name: Test Sales Team
name: Test Sales Team
allow_unlink: False
member_ids:
- base.user_admin
stage_ids:
- crm.stage_lead1
- crm.stage_lead2
- crm.stage_lead3
- crm.stage_lead4
- crm.stage_lead5
- crm.stage_lead6
working_hours: 0.0
resource_calendar_id: resource.timesheet_group1
parent_id: crm.section_sales_department
-
I assign segmentation.
-
!record {model: res.users, id: res_users_usercrm0}:
context_section_id: crm_case_section_demosalesteam
- |
I create a new lead "Test Customer" and I provide an address to this
demo customer and email "info@democustomer.com" and Also "Test Sales Team".
-
!record {model: crm.lead, id: crm_lead_democustomer}:
email_from: info@democustomer.com
name: Test Customer
partner_name: NotSoTinySARL
phone: (+32).81.81.37.00
mobile: (+32).81.81.37.00
section_id: crm_case_section_demosalesteam
referred: False
type: lead
-
I check that the lead is in 'draft' state.
-
!assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in Draft}:
- state == "draft"
-
I create categories.
-
!record {model: crm.case.categ, id: crm_case_categ0}:
name: crm_case_section_demosalesteam
section_id: crm_case_section_demosalesteam
-
I assigning contact detail to the Lead "Test Customer" without address.
-
!python {model: crm.lead}: |
self.onchange_partner_address_id(cr, uid, ref("crm_lead_democustomer"), None, email=False)
-
I assigning contact detail to the Lead "Test Customer" with address.
-
!python {model: crm.lead}: |
self.onchange_partner_address_id(cr, uid, ref("crm_lead_democustomer"), ref("base.res_partner_address_notsotinysarl0"), email=False)
-
I selecting email "Opt-out" option for the "Test Customer" Lead.
-
!python {model: crm.lead}: |
self.on_change_optout(cr, uid, ref("crm_lead_democustomer"), True)
-
I change the Opt-out to Opt-in to show email receive preference.
-
!python {model: crm.lead}: |
self.on_change_optin(cr, uid, ref("crm_lead_democustomer"), True)
-
I open lead by click on "Open" button.
-
!python {model: crm.lead}: |
self.case_open(cr, uid, [ref("crm_lead_democustomer")])
-
I check that lead "Test Customer" is now in 'open' state.
-
!assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in open state}:
- state == "open"
-
I reset the lead "Test Customer".
-
!python {model: crm.lead}: |
self.case_reset(cr, uid, [ref("crm_lead_democustomer")])
-
I again opening lead by click on "Open" button.
-
!python {model: crm.lead}: |
self.case_open(cr, uid, [ref("crm_lead_democustomer")])
-
I setting stage "New" for the lead "Test Customer".
-
!python {model: crm.lead}: |
self.stage_next(cr, uid, [ref("crm_lead_democustomer")], context={'stage_type': 'lead'})
-
I try to Unlink the Lead "Test Customer" demo Lead.
-
!python {model: crm.lead}: |
try:
self.unlink(cr, uid, [ref("crm_lead_democustomer")])
except:
pass
-
I setting Lead "Test Customer" to Pending State.
-
!python {model: crm.lead}: |
self.case_pending(cr, uid, [ref("crm_lead_democustomer")])
-
I check that lead "Test Customer" is now in 'Pending' state.
-
!assert {model: crm.lead, id: crm_lead_democustomer, string: Lead in Pending state}:
- state == "pending"
-
I Escalate the Lead "Test Customer" Parent "Sales Team".
-
!python {model: crm.lead}: |
self.case_escalate(cr, uid, [ref("crm_lead_democustomer")])
-
I add Internal Note Saying Escalated Reason.
-
!record {model: crm.add.note, id: crm_add_note_0}:
body: Sales Lead Has Been Escalated Due to Some Technical reason to the parent 'Sales
Team'
state: unchanged
-
I click a note button to attach the record.
-
!python {model: crm.add.note}: |
context['active_model'] = "crm.lead"
context['active_ids'] = [ref("crm_lead_democustomer")]
self.action_add(cr, uid, [ref("crm_add_note_0")], context=context)
-
I Copying this lead "Test Customer" to New Lead.
-
!python {model: crm.lead}: |
self.copy(cr, uid, ref("crm_lead_democustomer"))
-
I checking the Lead Copied or Not.
-
!python {model: crm.lead}: |
sid = self.search(cr, uid, [('name', '=', 'Test Customer'),('state', '=', 'draft')])
if not sid:
raise AssertionError("Lead is not copied Successfully")
+27 -27
View File
@@ -1,9 +1,9 @@
- |
Now I will test Meetings which may be customer meeting or phonecall meeting or
I will test Meetings which may be customer meeting or phonecall meeting or
internal Meeting.
- |
I start by creating a new Meeting.
-
I start by creating a new Meeting.
-
!record {model: crm.meeting, id: crm_meeting_regardingpresentation0}:
categ_id: crm.categ_meet2
date: !eval time.strftime('%Y-%m-%d 16:04:00')
@@ -18,14 +18,14 @@
section_id: crm.section_sales_department
- |
I check that the Meetings is in 'UnConfirmed' state.
-
-
!assert {model: crm.meeting, id: crm_meeting_regardingpresentation0}:
- state == "draft"
- state == "draft"
- |
I can set reminder on meeting if I put reminder "40 minutes before"
I can set reminder on meeting if I put reminder "40 minutes before" .
- |
For that, I first create alarm.
-
-
!record {model: res.alarm, id: res_alarm_minituesbefore0}:
name: 40 minutes before
trigger_duration: 40
@@ -33,51 +33,51 @@
trigger_occurs: before
trigger_related: start
- |
Now I will assign this reminder.
I will assign this reminder.
- !python {model: crm.meeting}: |
self.write(cr, uid, [ref('crm_meeting_regardingpresentation0')], {'alarm_id': ref("res_alarm_minituesbefore0")})
- |
In order to check recurrence on meetings I will set Recurrency to Custom
and I set the fields so that the meeting will occur weekly on Monday and Friday 10 times
and I set the fields so that the meeting will occur weekly on Monday and Friday 10 times.
-
!python {model: crm.meeting}: |
self.write(cr, uid, [ref("crm_meeting_regardingpresentation0")], {'fr': 1, 'mo': 1, 'th': 1, 'tu': 1, 'we':1, 'count':10, 'interval': 1, 'rrule_type': 'weekly'})
- |
I can see from the calendar view that the meeting is scheduled on Monday and Friday
for 10 times,
for 10 times.
-
!python {model: crm.meeting}: |
self.fields_view_get(cr, uid, False, 'calendar', context)
- |
- |
I will search for one of the recurrent event and count the number of meeting.
-
!python {model: crm.meeting}: |
import time
from datetime import datetime, date, timedelta
ids = self.search(cr, uid, [('date', '>=', time.strftime('%Y-%m-%d 00:00:00')), ('date', '<=', (datetime.now()+timedelta(31)).strftime('%Y-%m-%d 00:00:00')), ('name', '=', 'Regarding Presentation')], context={'virtual_id': True})
assert len(ids) == 10
assert len(ids) == 10
- |
Now If I want to edit meetings information for all occurrence I click on "Edit All" button.
If I want to edit meetings information for all occurrence I click on "Edit All" button.
-
!python {model: crm.meeting}: |
self.write(cr, uid, [ref('crm_meeting_regardingpresentation0')], {'edit_all':'True'},context)
- |
I can see that new meeting form is opened with same value
I change some data for meeting and save it
I can see from meeting's calendar view that all meeting occurrences are changed accordingly
-
- |
I can see that new meeting form is opened with same value.
I change some data for meeting and save it.
I can see from meeting's calendar view that all meeting occurrences are changed accordingly.
-
!record {model: crm.meeting, id: crm.crm_meeting_regardingpresentation0}:
alarm_id: base_calendar.alarm9
rrule_type: weekly
- |
- |
In order to invite people for this meetings, I click on "Invite People" button
I can invite internal user.
-
I can invite internal user.
-
!record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}:
type: internal
send_mail: False
@@ -85,13 +85,13 @@
user_ids:
- base.user_demo
-
I click on "Invite" button of "Invite attendee" wizard.
I click on "Invite" button of "Invite attendee" wizard.
-
!python {model: base_calendar.invite.attendee}: |
self.do_invite(cr, uid, [ref('base_calendar_invite_attendee_0')], {'active_id': ref('crm_meeting_regardingpresentation0'), 'model' : 'crm.meeting', 'attendee_field':'attendee_ids'})
self.do_invite(cr, uid, [ref('base_calendar_invite_attendee_0')], {'active_id': ref('crm_meeting_regardingpresentation0'), 'model' : 'crm.meeting', 'attendee_field':'attendee_ids'})
- |
After direct/indirect confirmation for meetings I can confirm meeting
After direct/indirect confirmation for meetings I can confirm meeting.
-
!python {model: crm.meeting}: |
self.case_open(cr, uid, [ref('crm_meeting_regardingpresentation0')])
+43 -11
View File
@@ -11,18 +11,17 @@
stage_id: crm.stage_lead1
categ_id: crm.categ_oppor2
section_id: crm.section_sales_department
- |
I check that the opportunity is in 'New' state.
-
!assert {model: crm.lead, id: crm_opportunity_abcfuelcounits0}:
- state == "draft"
- |
I open opportunity by click on "Open" button,
-
!python {model: crm.lead}: |
self.case_open(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
- |
I check that phonecall record is created for that opportunity.
-
!python {model: crm.phonecall}: |
phone_obj = self.pool.get('crm.phonecall')
- |
I schedule Meeting on this current opportunity by clicking on "schedule
Meeting".
@@ -33,7 +32,7 @@
- |
I can see that Meeting's calendar view is shown.
then I click on the date on which I want to schedule meeting.
I fill proper data for that meeting and save it
I fill proper data for that meeting and save it.
-
!record {model: crm.meeting, id: crm_meeting_abcfuelcounits0}:
date: !eval time.strftime('%Y-%m-%d 00:00:00')
@@ -51,13 +50,13 @@
I click on "schedule call" button and select planned date for the call.
-
!record {model: crm.opportunity2phonecall, id: crm_opportunity2phonecall_abcfuelcounits0}:
date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 11:15:00')"
date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 11:15:00')"
name: 'ABC FUEL CO 829264 - 10002 units'
section_id: crm.section_sales_department
user_id: base.user_demo
categ_id: crm.categ_phone1
- |
schedule phonecall by apply (action_apply)function of opportunity2phoncall wizard
schedule phonecall by opportunity2phoncall wizard.
-
!python {model: crm.opportunity2phonecall}: |
self.action_apply(cr, uid, [ref('crm_opportunity2phonecall_abcfuelcounits0')], {'active_ids': [ref("crm_opportunity_abcfuelcounits0")]})
@@ -72,10 +71,43 @@
I can see phonecall record after click on "Schedule call" wizard.
-
!record {model: crm.phonecall, id: crm_phonecall_abcfuelcounits0}:
date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 11:15:00')"
date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 11:15:00')"
duration: 3.0
name: 'ABC FUEL CO 829264 - 10002 units'
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
section_id: crm.section_sales_department
- |
I Merge the opportunities.
-
for that create two opportunities first opportunity 'Test FUEL CO'.
-
!record {model: crm.lead, id: crm_opportunity_1}:
email_from: info@balmerinc.be
name: 'Test FUEL CO 829264 - 10002 units'
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
probability: 1.0
stage_id: crm.stage_lead1
categ_id: crm.categ_oppor2
section_id: crm.section_sales_department
-
I create the opportunity 'FUEL CO'.
-
!record {model: crm.lead, id: crm_opportunity_2}:
email_from: info@balmerinc.be
name: 'FUEL CO 829264 - 10002 units'
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
probability: 1.0
stage_id: crm.stage_lead1
categ_id: crm.categ_oppor2
section_id: crm.section_sales_department
- |
I Merge two Opportunities.
-
!python {model: crm.merge.opportunity}: |
op_list = [ref('crm_opportunity_1'),ref('crm_opportunity_2')]
op_ids=self.pool.get('crm.lead').browse(cr,uid,op_list)
lead_ids = [ref('crm_lead_newcustomer0')]
self.merge(cr, uid, op_ids, {'lead_ids': lead_ids})
@@ -0,0 +1,45 @@
- |
I start by creating a new Opportunity. And I select partner for opportunity.
I can see that after selecting partner his contact and email is automatically filled.
-
!record {model: crm.lead, id: crm_opportunity_demotestopportunity}:
email_from: info@balmerinc.be
name: 'Demo Test Opportunity'
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
probability: 1.0
categ_id: crm.categ_oppor2
section_id: crm.section_sales_department
type: opportunity
-
I check that the opportunity is in 'New' state.
-
!assert {model: crm.lead, id: crm_opportunity_demotestopportunity, string: Opportunity in Draft}:
- state == "draft"
-
I open opportunity by click on "Open" button.
-
!python {model: crm.lead}: |
self.case_open(cr, uid, [ref("crm_opportunity_demotestopportunity")])
-
I change partner of the opportunity.
-
!python {model: crm.lead}: |
self.onchange_partner_id(cr, uid, [ref("crm_opportunity_demotestopportunity")], ref("base.res_partner_agrolait"))
-
I change Contact Detail of the opportunity.
-
!python {model: crm.lead}: |
self.onchange_partner_address_id(cr, uid,[ref("crm_opportunity_demotestopportunity")], ref("base.res_partner_address_8invoice"))
-
I change Opportunity to Won State.
-
!python {model: crm.lead}: |
self.case_mark_won(cr, uid, [ref("crm_opportunity_demotestopportunity")])
-
I check that the opportunity is in 'Done' state.
-
!assert {model: crm.lead, id: crm_opportunity_demotestopportunity, string: Opportunity is Won}:
- state == "done"
@@ -0,0 +1,25 @@
- |
I start by creating a new opportunity from partner.
-
!record {model: crm.partner2opportunity, id: crm_partner2opportunity_id_0}:
name: test
planned_revenue: 0.0
partner_id: base.res_partner_9
probability: 0.0
-
I click on "Create Opportunity" button of this wizard.
-
!python {model: crm.partner2opportunity}: |
fields = {
'name': 'test',
'planned_revenue': '0.0',
'partner_id': ref('base.res_partner_9'),
'probability': '0.0'
}
self.default_get(cr, uid, fields, {"active_ids": [ref("crm_partner2opportunity_id_0")]})
- |
In order to check the opportunity is created or not, I check type.
-
!python {model: crm.partner2opportunity}: |
opportunity = self.make_opportunity(cr, uid, [ref("crm_partner2opportunity_id_0")], {"active_ids": [ref("crm_partner2opportunity_id_0")]})
assert True
+36 -13
View File
@@ -7,16 +7,19 @@
duration: 2.0
section_id: crm.section_sales_department
-
Now , I select partner by click on "Create a Partner" button.
I select partner by click on "Create a Partner" button.
-
!record {model: crm.phonecall2partner, id: crm_phonecall2partner_1}:
action: exist
partner_id: base.res_partner_9
-
Now, click on "Continue" button of this wizard.
I click on "Continue" button of this wizard and make partner.
-
!python {model: crm.phonecall2partner}: |
self._select_partner(cr, uid,{"active_ids": [ref("crm_phonecall_interviewcall0")]})
self.open_create_partner(cr, uid, [ref("crm_phonecall2partner_1")], {"active_ids": [ref("crm_phonecall_interviewcall0")]})
self.make_partner(cr, uid, [ref("crm_phonecall2partner_1")], {"active_ids": [ref("crm_phonecall_interviewcall0")]})
- |
@@ -28,31 +31,28 @@
partner_id: base.res_partner_9
planned_revenue: 0.0
probability: 0.0
-
Now, I click on "Convert" button of this wizard.
-
!python {model: crm.phonecall2opportunity}: |
self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_interviewcall0")], {"active_id": ref("crm_phonecall_interviewcall0")})
- |
I can see that a business opportunity is now assigned to this phonecall
-
!assert {model: crm.phonecall, id: crm_phonecall_interviewcall0}:
- opportunity_id != False
-
I click on "Convert" button of this wizard.
-
!python {model: crm.phonecall2opportunity}: |
self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_interviewcall0")], {"active_id": ref("crm_phonecall_interviewcall0")})
- |
And I check that the phonecall and the newly created business opportunity is linked
to same partner
to same partner.
-
!python {model: crm.phonecall}: |
obj_phonecall = self.browse(cr, uid, ref('crm_phonecall_interviewcall0'))
ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0]
assert obj_phonecall.partner_id == obj_opp.partner_id
- |
I schedule Meeting on this current phonecall by clicking on "schedule
Meeting"
Meeting".
-
!python {model: crm.phonecall}: |
self.action_make_meeting(cr, uid, [ref('crm_phonecall_interviewcall0')])
@@ -60,7 +60,7 @@
- |
I can see that Meeting's calendar view is shown.
then I click on the date on which I want schedule meeting.
I fill proper data for that meeting and save it
I fill proper data for that meeting and save it.
-
!record {model: crm.meeting, id: crm_meeting_interviewcall0}:
alarm_id: base_calendar.alarm3
@@ -85,9 +85,32 @@
name: Interview call
section_id: crm.section_sales_department
user_id: base.user_root
action: schedule
categ_id: crm.categ_phone1
-
I click on "schedule other call" button. and plan for other call.
-
!record {model: crm.phonecall2phonecall, id: crm_phonecall2phonecall_interviewcall1}:
date: !eval "'%s-%s-%s 19:49:00' %(datetime.now().year,datetime.now().month,datetime.now().day)"
name: Interview call
section_id: crm.section_sales_department
user_id: base.user_root
action: log
categ_id: crm.categ_phone1
- |
I click on "Schedule" button of this wizard.
-
!python {model: crm.phonecall2phonecall}: |
fields = {
'name': 'Interview call',
'section_id': ref('crm.section_sales_department'),
'user_id': ref('base.user_root'),
'categ_id': ref('crm.categ_phone1')
}
self.default_get(cr, uid, fields,{'active_id': ref('crm_phonecall_interviewcall0')})
self.action_apply(cr, uid, [ref('crm_phonecall2phonecall_interviewcall0')], {'active_id': ref('crm_phonecall_interviewcall0')})
- |
I click on "Schedule" button of this wizard with log option.
-
!python {model: crm.phonecall2phonecall}: |
self.action_apply(cr, uid, [ref('crm_phonecall2phonecall_interviewcall1')], {'active_id': ref('crm_phonecall_interviewcall0')})
@@ -0,0 +1,26 @@
- |
I start by creating a new phonecall.
-
!record {model: crm.phonecall, id: crm_phonecall_dummycall}:
date: !eval time.strftime('%Y-%m-%d 08:00:00')
name: Dummy call
duration: 0.0
section_id: crm.section_sales_department
partner_id: base.res_partner_agrolait
state: open
-
I change Contact Detail of the Partner.
-
!python {model: crm.phonecall}: |
self.onchange_partner_address_id(cr, uid,[ref("crm_phonecall_dummycall")], ref("base.res_partner_address_8invoice"))
-
I setting Phone call to Held (Done).
-
!python {model: crm.phonecall}: |
self.case_close(cr, uid, [ref("crm_phonecall_dummycall")])
-
I check that the hone call is in 'Held' state.
-
!assert {model: crm.phonecall, id: crm_phonecall_dummycall, string: Phone call Helded}:
- state == "done"
@@ -21,7 +21,7 @@
meeting_ids = self.search(cr, uid, [('id', 'in', [ref('crm_meeting_testmeeting0')]),('date','>=','2011-03-13'), ('date_deadline', '<=', '2011-05-13')], context={'virtual_id': True})
assert len(meeting_ids) == 5, 'Recurrent daily meetings are not created !'
-
Now I create a weekly meeting till a particular end date.
I create a weekly meeting till a particular end date.
-
!record {model: crm.meeting, id: crm_meeting_reviewcodewithprogrammer0}:
date: '2011-04-18 11:47:00'
@@ -95,4 +95,3 @@
meeting_ids = self.search(cr, uid, [('recurrent_uid', '=', ref('crm_meeting_reviewcodewithprogrammer0')), ('recurrent_id','=','2011-04-25 12:47:00')], context)
assert meeting_ids, 'Meeting is not edited !'
+38
View File
@@ -0,0 +1,38 @@
- |
I will test segmentation which create specific partner categories criteria.
-
I create a new segmentation record.
-
!record {model: crm.segmentation, id: crm_segmentation_id_0}:
categ_id: base.res_partner_category_5
exclusif: true
name: segment
som_interval: 0.0
sales_purchase_active : True
-
I start the process.
-
!python {model: crm.segmentation}: |
self.process_start(cr, uid, [ref("crm_segmentation_id_0")],context)
-
I continue the segmentation process.
-
!python {model: crm.segmentation}: |
context.update({'start': True})
self.process_continue(cr, uid, [ref("crm_segmentation_id_0")], context)
-
I create the segmentation line.
-
!record {model: crm.segmentation.line, id: crm_segmentation_line_id_0}:
expr_name: sale
expr_operator: '>'
expr_value: 1000.0
name: Rule1
operator: or
segmentation_id: crm_segmentation_id_0
-
I check the Segmentation line record.
-
!python {model: crm.segmentation.line}: |
self.test(cr, uid, [ref("crm_segmentation_line_id_0")],partner_id=0)
+16 -6
View File
@@ -1,10 +1,10 @@
-
In order to test the changes on stage of a lead or an opportunity with OpenERP,
I create some leads and test the stage changes.
-
-
I want to change the probability to 0.0 when the opportunity is marked as lost.
So I set its Change probability automatically true.
-
-
!record {model: crm.case.stage, id: crm.stage_lead6}:
name: Lost
on_change: true
@@ -12,9 +12,9 @@
section_ids:
- crm.section_sales_department
sequence: 0
-
-
I create a lead 'Test Lead1'.
-
-
!record {model: crm.lead, id: crm_lead_openerppresentation0}:
categ_id: crm.categ_oppor4
day_close: 0.0
@@ -29,7 +29,17 @@
!python {model: crm.lead}: |
self.case_open(cr, uid, [ref('crm_lead_openerppresentation0')])
-
I find that this lead can be converted to opportunity.
I assigning stage.
-
!python {model: crm.lead}: |
self.onchange_stage_id(cr, uid, [ref('crm_lead_openerppresentation0')], [], context)
-
I assigning percent.
-
!python {model: crm.lead}: |
self.stage_find_percent(cr, uid, 10.0, [])
-
I find that this lead can be converted to opportunity.
-
!record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner0}:
action: 'create'
@@ -51,7 +61,7 @@
!python {model: crm.lead}: |
self.case_mark_lost(cr, uid, [ref('crm_lead_openerppresentation0')])
-
Now I check whether the probability is set according to stage change or not.
I check whether the probability is set according to stage change or not.
-
!python {model: crm.lead}: |
opportunity = self.browse(cr, uid, ref('crm_lead_openerppresentation0'))
+1
View File
@@ -158,6 +158,7 @@ class crm_lead2partner(osv.osv_memory):
'name': lead.partner_name or lead.contact_name or lead.name,
'user_id': lead.user_id.id,
'comment': lead.description,
'address': []
})
contact_obj.create(cr, uid, {
'partner_id': partner_id,

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