[MERGE] Upstream

bzr revid: stw@openerp.com-20110922131429-vlgqxnb37jsoaq5l
This commit is contained in:
Stephane Wirtel 2011-09-22 15:14:29 +02:00
commit 8a06c9f209
70 changed files with 4452 additions and 1449 deletions

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)'),
@ -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):
"""

View File

@ -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"/>
@ -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"/>

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-22 04:48+0000\n"
"X-Generator: Launchpad (build 13996)\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

View File

@ -28,12 +28,17 @@ class account_fiscal_position(osv.osv):
_description = 'Fiscal Position'
_columns = {
'name': fields.char('Fiscal Position', size=64, required=True),
'active': fields.boolean('Active', help="By unchecking the active field, you may hide a fiscal position without deleting it."),
'company_id': fields.many2one('res.company', 'Company'),
'account_ids': fields.one2many('account.fiscal.position.account', 'position_id', 'Account Mapping'),
'tax_ids': fields.one2many('account.fiscal.position.tax', 'position_id', 'Tax Mapping'),
'note': fields.text('Notes', translate=True),
}
_defaults = {
'active': True,
}
def map_tax(self, cr, uid, fposition_id, taxes, context=None):
if not taxes:
return []

View File

@ -8,8 +8,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Fiscal Position">
<field name="name" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="active" groups="base.group_extended"/>
</group>
<separator string="Mapping" colspan="4"/>
<newline/>
<field name="tax_ids" colspan="2" widget="one2many_list" nolabel="1">

View File

@ -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>

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">

View File

@ -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

View File

@ -240,8 +240,8 @@
[[ 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 = company.currency_id) ]]</para></td>
<td>[[ a['level'] == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a['balance'], currency = 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 = company.currency_id) ]]</u></para>
</td>
</tr>
</blockTable>
@ -282,8 +282,8 @@
[[ 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 = company.currency_id) ]]</para></td>
<td>[[ a['level'] == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a['balance'], currency = 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 = company.currency_id) ]]</u></para>
</td>
</tr>
</blockTable>

View File

@ -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>

View File

@ -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>

View File

@ -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,

View File

@ -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>

View File

@ -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>

View File

@ -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>

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>

View File

@ -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>

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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>

View File

@ -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>

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,

View File

@ -228,8 +228,8 @@
[[ 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.symbol)</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>
@ -277,8 +277,8 @@
[[ 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>

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>

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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

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-22 04:48+0000\n"
"X-Generator: Launchpad (build 13996)\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

View File

@ -70,7 +70,6 @@
</record>
<record id="base_setup_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_setup_installer"/>
<field name="category_id" ref="base.category_administration_config"/>
<field name="sequence">2</field>
</record>
@ -222,7 +221,6 @@
</record>
<record id="base_setup_company_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_setup_company"/>
<field name="category_id" ref="base.category_administration_config"/>
<field name="sequence">1</field>
</record>
<!-- register Upload Logo configuration wizard -->

View File

@ -21,5 +21,4 @@
import base_vat
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -18,26 +18,34 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Base VAT',
'name': 'VAT Number Validation',
'version': '1.0',
'category': 'Tools',
'category': 'Generic Modules/Base',
'category': 'Finance',
'complexity': "easy",
'description': """
Enable VAT Number for a partner and check its validity.
=======================================================
VAT validation for Partners' VAT numbers
========================================
After installing this module, values entered in the VAT field of Partners will
be validated for all supported countries. The country is inferred from the
2-letter country code that prefixes the VAT number, e.g. ``BE0477472701``
will be validated using the Belgian rules.
Supported countries currently include EU countries, and a few non-EU countries
such as Chile, Colombia, Mexico, Norway or Russia. For unsupported countries,
only the country code will be validated.
This module follows the methods stated at http://sima-pc.com/nif.php for
checking the validity of VAT Number assigned to partners in European countries.
""",
'author': 'OpenERP SA',
'depends': ['account'],
'website': 'http://www.openerp.com',
'update_xml': ['base_vat_view.xml'],
'data': ['base_vat_view.xml'],
'installable': True,
'active': False,
'certificate': '0084849360989',
'images': ['images/1_partner_vat.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.vat.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<field name="property_account_payable" position="after">
<group colspan="2" col="6">
<field name="vat" on_change="vat_change(vat)" colspan="4" />
<field groups="base.group_extended" name="vat_subjected" colspan="1"/>
</group>
</field>
</field>
</record>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.vat.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<field name="property_account_payable" position="after">
<group colspan="2" col="6">
<field name="vat" on_change="vat_change(vat)" colspan="4" />
<field name="vat_subjected" colspan="1" groups="base.group_extended" />
</group>
</field>
</field>
</record>
</data>
</data>
</openerp>

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

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"/>

View File

@ -44,7 +44,6 @@
<field eval="'Interest in Your New Product'" name="name"/>
<field eval="'(956) 293-2595'" name="phone"/>
</record>
<record id="crm_case_developingwebapplications0" model="crm.lead">
<field name="type_id" ref="crm.type_lead5"/>
<field eval="'2'" name="priority"/>
@ -266,12 +265,17 @@
<field name="user_id" ref="base.user_demo"/>
<field eval="'draft'" name="state"/>
<field eval="45000.0" name="planned_revenue"/>
<field eval="50" name="probability"/>
<field eval="35" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor3"/>
<field name="stage_id" ref="crm.stage_lead2"/>
<field eval="'Pricing Information of Onsite Intervention'" name="name"/>
<field eval="'Send price list regarding our interventions'" name="title_action"/>
<field name="partner_name">BalmerInc S.A.</field>
<field name="street">Rue des Palais 51, bte 33</field>
<field name="city">Bruxelles</field>
<field eval="1000" name="zip"/>
<field name="country_id" ref="base.be"/>
</record>
<record id="crm_case_rdroundfundingunits25" model="crm.lead">
<field eval="1" name="active"/>
@ -282,15 +286,65 @@
<field name="user_id" ref="base.user_demo"/>
<field eval="'draft'" name="state"/>
<field eval="30000.0" name="planned_revenue"/>
<field eval="75" name="probability"/>
<field eval="30" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor3"/>
<field name="stage_id" ref="crm.stage_lead2"/>
<field eval="'Interest in your Kitchen Design Project'" name="name"/>
<field eval="'Send Catalogue by E-Mail'" name="title_action"/>
<field name="partner_name">Lucie Vonck</field>
<field name="street">Chaussée de Namur</field>
<field name="city">Grand-Rosière</field>
<field eval="1367" name="zip"/>
<field name="country_id" ref="base.be"/>
</record>
<record id="crm_case_unifliege" model="crm.lead">
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead2"/>
<field name="partner_id" ref="base.res_partner_accent"/>
<field name="partner_address_id" ref="base.res_partner_address_accent"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'open'" name="state"/>
<field eval="2500.0" name="planned_revenue"/>
<field eval="25" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor6"/>
<field name="stage_id" ref="crm.stage_lead2"/>
<field eval="'Plan train our students on your product'" name="name"/>
<field eval="'Call to define real needs about training'" name="title_action"/>
<field eval="4000" name="zip"/>
<field name="partner_name">Université de Liège</field>
<field name="street">Place du 20Août</field>
<field name="city">Liège</field>
<field eval="75016" name="zip"/>
<field name="country_id" ref="base.be"/>
</record>
<record id="crm_case_bankwealthy2" model="crm.lead">
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead2"/>
<field name="partner_id" ref="base.res_partner_2"/>
<field name="partner_address_id" ref="base.res_partner_address_9"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'open'" name="state"/>
<field eval="462.0" name="planned_revenue"/>
<field eval="40" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor2"/>
<field name="stage_id" ref="crm.stage_lead2"/>
<field eval="'Plan to buy 66 keyboards and 66 mouses'" name="name"/>
<field eval="'Propose the kit keyboard+mouse'" name="title_action"/>
<field name="partner_name">Bank Wealthy and sons</field>
<field name="street">1 rue Rockfeller</field>
<field name="city">Paris</field>
<field eval="75016" name="zip"/>
<field name="country_id" ref="base.fr"/>
</record>
<record id="crm_case_mediapoleunits0" model="crm.lead">
<field eval="10" name="probability"/>
<field eval="100" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_3"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
@ -308,7 +362,7 @@
<field eval="'info@mycompany.net'" name="email_from"/>
</record>
<record id="crm_case_abcfuelcounits0" model="crm.lead">
<field eval="40" name="probability"/>
<field eval="80" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_marcdubois0"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
@ -324,6 +378,11 @@
<field eval="'Need new design for my website'" name="name"/>
<field eval="'info@opensides.be'" name="email_from"/>
<field eval="'Convert to quote'" name="title_action"/>
<field name="partner_name">Dubois sprl</field>
<field name="street">Avenue de la Liberté 56</field>
<field name="city">Brussels</field>
<field eval="1000" name="zip"/>
<field name="country_id" ref="base.be"/>
</record>
<record id="crm_case_dirtminingltdunits25" model="crm.lead">
<field eval="30" name="probability"/>
@ -370,6 +429,82 @@
<field name="stage_id" ref="crm.stage_lead2"/>
<field eval="'Plan to attend a training'" name="name"/>
<field eval="'Call to give info about next training session'" name="title_action"/>
<field name="partner_name">Axelor</field>
<field name="street">12 rue Albert Einstein</field>
<field name="city">Champs sur Marne</field>
<field eval="77420" name="zip"/>
<field name="country_id" ref="base.fr"/>
</record>
<record id="crm_case_construstazunits0" model="crm.lead">
<field eval="60" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_thymbra"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead1"/>
<field name="partner_id" ref="base.res_partner_thymbra"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'open'" name="state"/>
<field eval="'150000'" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor1"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="'Need customize the solution'" name="name"/>
<field eval="'Conf call with technical service'" name="title_action"/>
<field name="partner_name">Thymbra</field>
<field name="street">Palermo, Capital Federal</field>
<field name="street2">C1414CMS Capital Federal</field>
<field name="city">Buenos Aires</field>
<field eval="1659" name="zip"/>
<field name="country_id" ref="base.ar"/>
</record>
<record id="crm_case_ericdubois4" model="crm.lead">
<field eval="65" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_ericdubois0"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead1"/>
<field name="partner_id" ref="base.res_partner_ericdubois0"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'open'" name="state"/>
<field eval="'1200'" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor1"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="'Interest in your customizable PC'" name="name"/>
<field eval="'Ask for the good receprion of the proposition'" name="title_action"/>
<field name="partner_name">Eric Dubois</field>
<field name="street">Chaussée de Binche, 27</field>
<field name="city">Mons</field>
<field eval="7000" name="zip"/>
<field name="country_id" ref="base.be"/>
</record>
<record id="crm_case_fabiendupont" model="crm.lead">
<field name="partner_address_id" ref="base.res_partner_address_fabiendupont0"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead1"/>
<field name="partner_id" ref="base.res_partner_fabiendupont0"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="'draft'" name="state"/>
<field name="categ_id" ref="crm.categ_oppor4"/>
<field name="stage_id" ref="crm.stage_lead1"/>
<field eval="'Need more info about the onsite intervention'" name="name"/>
</record>
<record id="crm_case_shelvehouse" model="crm.lead">
<field name="partner_address_id" ref="base.res_partner_address_henrychard1"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead1"/>
<field name="partner_id" ref="base.res_partner_theshelvehouse0"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field eval="'draft'" name="state"/>
<field name="categ_id" ref="crm.categ_oppor4"/>
<field name="stage_id" ref="crm.stage_lead1"/>
<field eval="'Need more info about your pc2'" name="name"/>
</record>
</data>
</openerp>

View File

@ -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"/>

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"

View File

@ -4,119 +4,120 @@
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Project-Id-Version: openeobject-addons\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2009-02-03 06:25+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"PO-Revision-Date: 2011-09-20 07:48+0000\n"
"Last-Translator: Jiří Hajda <robie@centrum.cz>\n"
"Language-Team: Czech <openerp-i18n-czech@lists.launchpad.net >\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:31+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2011-09-21 04:50+0000\n"
"X-Generator: Launchpad (build 13996)\n"
"X-Poedit-Language: Czech\n"
#. module: hr_contract
#: view:hr.contract.wage.type:0
msgid "Hourly cost computation"
msgstr ""
msgstr "Výpočet hodinové ceny"
#. module: hr_contract
#: selection:hr.contract.wage.type,type:0
msgid "Gross"
msgstr ""
msgstr "Hrubého"
#. module: hr_contract
#: view:hr.contract:0
msgid "Trial Period"
msgstr ""
msgstr "Zkušební období"
#. module: hr_contract
#: field:hr.contract,trial_date_start:0
msgid "Trial Start Date"
msgstr ""
msgstr "Zkušební počáteční datum"
#. module: hr_contract
#: view:hr.contract:0
msgid "Passport"
msgstr ""
msgstr "Pas"
#. module: hr_contract
#: view:hr.employee:0
msgid "Medical Examination"
msgstr ""
msgstr "Zdravotní vyšetření"
#. module: hr_contract
#: field:hr.employee,vehicle:0
msgid "Company Vehicle"
msgstr ""
msgstr "Firemní vozidlo"
#. module: hr_contract
#: field:hr.contract.wage.type,name:0
msgid "Wage Type Name"
msgstr ""
msgstr "Jméno typu mzdy"
#. module: hr_contract
#: view:hr.employee:0
msgid "Miscellaneous"
msgstr ""
msgstr "Různé"
#. module: hr_contract
#: view:hr.contract:0
msgid "Current"
msgstr ""
msgstr "Aktuální"
#. module: hr_contract
#: field:hr.contract.wage.type,factor_type:0
msgid "Factor for hour cost"
msgstr ""
msgstr "Koeficient pro cenu hodiny"
#. module: hr_contract
#: view:hr.contract:0
msgid "Overpassed"
msgstr ""
msgstr "Uplynulý"
#. module: hr_contract
#: view:hr.contract.wage.type:0
msgid "Wage Types"
msgstr ""
msgstr "Typ mzdy"
#. module: hr_contract
#: field:hr.contract,department_id:0
msgid "Department"
msgstr ""
msgstr "Oddělení"
#. module: hr_contract
#: selection:hr.contract.wage.type,type:0
msgid "Basic"
msgstr ""
msgstr "Základní"
#. module: hr_contract
#: view:hr.contract:0
#: field:hr.contract,employee_id:0
#: model:ir.model,name:hr_contract.model_hr_employee
msgid "Employee"
msgstr ""
msgstr "Zaměstnanec"
#. module: hr_contract
#: selection:hr.contract.wage.type,type:0
msgid "Net"
msgstr ""
msgstr "Čistého"
#. module: hr_contract
#: model:ir.module.module,shortdesc:hr_contract.module_meta_information
msgid "Human Resources Contracts"
msgstr ""
msgstr "Smlouvy lidských zdrojů"
#. module: hr_contract
#: field:hr.contract.wage.type.period,factor_days:0
msgid "Hours in the period"
msgstr ""
msgstr "Hodin v období"
#. module: hr_contract
#: field:hr.employee,vehicle_distance:0
msgid "Home-Work Distance"
msgstr ""
msgstr "Vzdálenost z domu do práce"
#. module: hr_contract
#: view:hr.contract:0
@ -125,32 +126,32 @@ msgstr ""
#: model:ir.actions.act_window,name:hr_contract.action_hr_contract
#: model:ir.ui.menu,name:hr_contract.hr_menu_contract
msgid "Contracts"
msgstr ""
msgstr "Smlouvy"
#. module: hr_contract
#: view:hr.employee:0
msgid "Personal Info"
msgstr ""
msgstr "Osobní informace"
#. module: hr_contract
#: view:hr.contract:0
msgid "Job"
msgstr ""
msgstr "Práce"
#. module: hr_contract
#: view:hr.contract:0
msgid "Search Contract"
msgstr ""
msgstr "Hledat smlouvu"
#. module: hr_contract
#: help:hr.employee,contract_id:0
msgid "Latest contract of the employee"
msgstr ""
msgstr "Poslední smlouva zaměstnance"
#. module: hr_contract
#: field:hr.contract,advantages_net:0
msgid "Deductions"
msgstr ""
msgstr "Odpočty"
#. module: hr_contract
#: model:ir.module.module,description:hr_contract.module_meta_information
@ -163,33 +164,40 @@ msgid ""
" You can assign several contracts per employee.\n"
" "
msgstr ""
"\n"
" Přidává všechny informace zaměstnance ke správě smluv:\n"
" * Rodinný stav,\n"
" * Bezpečnostní číslo,\n"
" * Místo narození, datum narození, ...\n"
" Ke každému zaměstnanci můžete přiřadit několik smluv.\n"
" "
#. module: hr_contract
#: view:hr.contract:0
#: field:hr.contract,advantages:0
msgid "Advantages"
msgstr ""
msgstr "Výhody"
#. module: hr_contract
#: view:hr.contract:0
msgid "Valid for"
msgstr ""
msgstr "Platné pro"
#. module: hr_contract
#: view:hr.contract:0
msgid "Work Permit"
msgstr ""
msgstr "Pracovní povolení"
#. module: hr_contract
#: field:hr.employee,children:0
msgid "Number of Children"
msgstr ""
msgstr "Počet dětí"
#. module: hr_contract
#: model:ir.actions.act_window,name:hr_contract.action_hr_contract_type
#: model:ir.ui.menu,name:hr_contract.hr_menu_contract_type
msgid "Contract Types"
msgstr ""
msgstr "Typy smluv"
#. module: hr_contract
#: field:hr.contract,wage_type_id:0
@ -198,44 +206,44 @@ msgstr ""
#: model:ir.model,name:hr_contract.model_hr_contract_wage_type
#: model:ir.ui.menu,name:hr_contract.hr_menu_contract_wage_type
msgid "Wage Type"
msgstr ""
msgstr "Typ mzdy"
#. module: hr_contract
#: constraint:hr.employee:0
msgid "Error ! You cannot create recursive Hierarchy of Employees."
msgstr ""
msgstr "Chyba ! Nemůžete vytvořit rekurzivní Hiearchii zaměstnanců"
#. module: hr_contract
#: field:hr.contract,date_end:0
msgid "End Date"
msgstr ""
msgstr "Datum ukončení"
#. module: hr_contract
#: field:hr.contract,wage:0
msgid "Wage"
msgstr ""
msgstr "Mzda"
#. module: hr_contract
#: field:hr.contract,name:0
msgid "Contract Reference"
msgstr ""
msgstr "Odkaz smlouvy"
#. module: hr_contract
#: help:hr.employee,vehicle_distance:0
msgid "In kilometers"
msgstr ""
msgstr "V kilometrech"
#. module: hr_contract
#: view:hr.contract:0
#: field:hr.contract,notes:0
msgid "Notes"
msgstr ""
msgstr "Poznámky"
#. module: hr_contract
#: constraint:hr.employee:0
msgid ""
"Error ! You cannot select a department for which the employee is the manager."
msgstr ""
msgstr "Chyba ! Nemůžete vybrat oddělení, kterého je zaměstnance vedoucí."
#. module: hr_contract
#: view:hr.contract:0
@ -243,7 +251,7 @@ msgstr ""
#: model:ir.model,name:hr_contract.model_hr_contract
#: model:ir.ui.menu,name:hr_contract.next_id_56
msgid "Contract"
msgstr ""
msgstr "Smlouva"
#. module: hr_contract
#: view:hr.contract:0
@ -252,92 +260,92 @@ msgstr ""
#: field:hr.contract.type,name:0
#: model:ir.model,name:hr_contract.model_hr_contract_type
msgid "Contract Type"
msgstr ""
msgstr "Typ smlouvy"
#. module: hr_contract
#: view:hr.contract.wage.type.period:0
msgid "Search Wage Period"
msgstr ""
msgstr "Hledat mzdové období"
#. module: hr_contract
#: view:hr.contract:0
#: field:hr.contract,working_hours:0
msgid "Working Schedule"
msgstr ""
msgstr "Pracovní plán"
#. module: hr_contract
#: view:hr.employee:0
msgid "Job Info"
msgstr ""
msgstr "Pracovní informace"
#. module: hr_contract
#: field:hr.contract.wage.type,period_id:0
#: view:hr.contract.wage.type.period:0
#: model:ir.model,name:hr_contract.model_hr_contract_wage_type_period
msgid "Wage Period"
msgstr ""
msgstr "Mzdové období"
#. module: hr_contract
#: field:hr.contract,job_id:0
msgid "Job Title"
msgstr ""
msgstr "Název pozice"
#. module: hr_contract
#: field:hr.employee,manager:0
msgid "Is a Manager"
msgstr ""
msgstr "Je vedoucí"
#. module: hr_contract
#: field:hr.contract,date_start:0
msgid "Start Date"
msgstr ""
msgstr "Počáteční datum"
#. module: hr_contract
#: constraint:hr.contract:0
msgid "Error! contract start-date must be lower then contract end-date."
msgstr ""
msgstr "Chyba! Počáteční datum smlouvy musí být nižší než konečné datum."
#. module: hr_contract
#: view:hr.contract.wage.type:0
msgid "Search Wage Type"
msgstr ""
msgstr "Hledat typ mzdy"
#. module: hr_contract
#: field:hr.contract.wage.type,type:0
msgid "Type"
msgstr ""
msgstr "Typ"
#. module: hr_contract
#: field:hr.contract,trial_date_end:0
msgid "Trial End Date"
msgstr ""
msgstr "Zkušební koncové datum"
#. module: hr_contract
#: view:hr.contract:0
#: view:hr.contract.wage.type:0
msgid "Group By..."
msgstr ""
msgstr "Seskupit podle..."
#. module: hr_contract
#: field:hr.contract.wage.type.period,name:0
msgid "Period Name"
msgstr ""
msgstr "Název období"
#. module: hr_contract
#: view:hr.contract.wage.type:0
msgid "Period"
msgstr ""
msgstr "Období"
#. module: hr_contract
#: field:hr.employee,place_of_birth:0
msgid "Place of Birth"
msgstr ""
msgstr "Místo narození"
#. module: hr_contract
#: model:ir.actions.act_window,name:hr_contract.action_hr_contract_wage_type_period
#: model:ir.ui.menu,name:hr_contract.hr_menu_contract_wage_type_period
msgid "Wage period"
msgstr ""
msgstr "Mzdové období"
#. module: hr_contract
#: help:hr.contract.wage.type,factor_type:0
@ -346,28 +354,30 @@ msgid ""
"This field is used by the timesheet system to compute the price of an hour "
"of work wased on the contract of the employee"
msgstr ""
"Toto pole je použito časovým rozvrhem systému pro výpočet ceny za hodinu "
"práce vynaložené na smlouvu zaměstnance"
#. module: hr_contract
#: view:hr.contract:0
msgid "Duration"
msgstr ""
msgstr "Trvání"
#. module: hr_contract
#: field:hr.employee,medic_exam:0
msgid "Medical Examination Date"
msgstr ""
msgstr "Datum zdravotní prohlídky"
#. module: hr_contract
#: field:hr.contract,advantages_gross:0
msgid "Allowances"
msgstr ""
msgstr "Dávky"
#. module: hr_contract
#: view:hr.contract:0
msgid "Main Data"
msgstr ""
msgstr "Hlavní data"
#. module: hr_contract
#: view:hr.contract.type:0
msgid "Search Contract Type"
msgstr ""
msgstr "Hledat typ smlouvy"

View File

@ -204,14 +204,17 @@ class hr_holidays(osv.osv):
def onchange_sec_id(self, cr, uid, ids, status, context=None):
warning = {}
double_validation = False
obj_holiday_status = self.pool.get('hr.holidays.status')
if status:
brows_obj = self.pool.get('hr.holidays.status').browse(cr, uid, status, context=context)
if brows_obj.categ_id and brows_obj.categ_id.section_id and not brows_obj.categ_id.section_id.allow_unlink:
holiday_status = obj_holiday_status.browse(cr, uid, status, context=context)
double_validation = holiday_status.double_validation
if holiday_status.categ_id and holiday_status.categ_id.section_id and not holiday_status.categ_id.section_id.allow_unlink:
warning = {
'title': "Warning for ",
'message': "You won\'t be able to cancel this leave request because the CRM Sales Team of the leave type disallows."
}
return {'warning': warning}
return {'warning': warning, 'value': {'double_validation': double_validation}}
def set_to_draft(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {

View File

@ -4,45 +4,46 @@
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2009-02-03 20:59+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"Language-Team: \n"
"PO-Revision-Date: 2011-09-20 08:48+0000\n"
"Last-Translator: Jiří Hajda <robie@centrum.cz>\n"
"Language-Team: Czech <openerp-i18n-czech@lists.launchpad.net >\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:24+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2011-09-21 04:50+0000\n"
"X-Generator: Launchpad (build 13996)\n"
"X-Poedit-Language: Czech\n"
#. module: hr_timesheet
#: model:product.template,name:hr_timesheet.product_consultant_product_template
msgid "Service on Timesheet"
msgstr ""
msgstr "SLužby v časovém rozvrhu"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:43
#: code:addons/hr_timesheet/report/users_timesheet.py:77
#, python-format
msgid "Wed"
msgstr ""
msgstr "St"
#. module: hr_timesheet
#: view:hr.sign.out.project:0
msgid "(Keep empty for current_time)"
msgstr ""
msgstr "(Nechejte prázdné pro aktuální čas)"
#. module: hr_timesheet
#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:132
#, python-format
msgid "No employee defined for your user !"
msgstr ""
msgstr "Pro vašeho uživatele nebyl určen zaměstnanec !"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Group By..."
msgstr ""
msgstr "Seskupit podle..."
#. module: hr_timesheet
#: model:ir.actions.act_window,help:hr_timesheet.action_hr_timesheet_sign_in
@ -52,16 +53,20 @@ msgid ""
"analytic account. This feature allows to record at the same time the "
"attendance and the timesheet."
msgstr ""
"Zaměstnanci mohou vkládat své časy strávené na různých projektech. Projekt "
"je analytický účet a čas strávený na projektu generuje ceny na na "
"analytickém účtu. Tato funkce umožňuje zaznamenat ve stejný čas docházku a "
"časový rozvrh."
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Today"
msgstr ""
msgstr "Dnes"
#. module: hr_timesheet
#: field:hr.employee,journal_id:0
msgid "Analytic Journal"
msgstr ""
msgstr "Analytický deník"
#. module: hr_timesheet
#: view:hr.sign.out.project:0
@ -72,31 +77,31 @@ msgstr "Ukončit práci"
#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_employee
#: model:ir.ui.menu,name:hr_timesheet.menu_hr_timesheet_employee
msgid "Employee Timesheet"
msgstr ""
msgstr "Časový rozvrh zaměstnance"
#. module: hr_timesheet
#: view:account.analytic.account:0
msgid "Work done stats"
msgstr ""
msgstr "Statistika dokončené práce"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
#: model:ir.ui.menu,name:hr_timesheet.menu_hr_reporting_timesheet
msgid "Timesheet"
msgstr ""
msgstr "Časový rozvrh"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "janvier"
msgstr ""
msgstr "leden"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:43
#: code:addons/hr_timesheet/report/users_timesheet.py:77
#, python-format
msgid "Mon"
msgstr ""
msgstr "Po"
#. module: hr_timesheet
#: view:hr.sign.in.project:0
@ -111,27 +116,31 @@ msgid ""
"project generates costs on the analytic account. This feature allows to "
"record at the same time the attendance and the timesheet."
msgstr ""
"Zaměstnanci mohou vkládat své časy strávené na různých projektech, ke kterým "
"jsou přiřazeni. Projekt je analytický účet a čas strávený na projektu "
"generuje ceny na na analytickém účtu. Tato funkce umožňuje zaznamenat ve "
"stejný čas docházku a časový rozvrh."
#. module: hr_timesheet
#: field:hr.sign.out.project,analytic_amount:0
msgid "Minimum Analytic Amount"
msgstr ""
msgstr "Minimální analytická částka"
#. module: hr_timesheet
#: view:hr.analytical.timesheet.employee:0
msgid "Monthly Employee Timesheet"
msgstr ""
msgstr "Měsíční časový rozvrh zaměstnance"
#. module: hr_timesheet
#: view:hr.sign.out.project:0
msgid "Work done in the last period"
msgstr ""
msgstr "Dokončená práce v minulém období"
#. module: hr_timesheet
#: constraint:hr.employee:0
msgid ""
"Error ! You cannot select a department for which the employee is the manager."
msgstr ""
msgstr "Chyba ! Nemůžete vybrat oddělení, kterého je zaměstnance vedoucí."
#. module: hr_timesheet
#: field:hr.sign.in.project,state:0
@ -143,39 +152,39 @@ msgstr "Současné datum"
#: field:hr.sign.in.project,name:0
#: field:hr.sign.out.project,name:0
msgid "Employees name"
msgstr ""
msgstr "Jméno zaměstnance"
#. module: hr_timesheet
#: model:ir.model,name:hr_timesheet.model_hr_analytical_timesheet_users
msgid "Print Employees Timesheet"
msgstr ""
msgstr "Tisknou časový rozvrh zaměstnance"
#. module: hr_timesheet
#: code:addons/hr_timesheet/hr_timesheet.py:174
#: code:addons/hr_timesheet/hr_timesheet.py:176
#, python-format
msgid "Warning !"
msgstr ""
msgstr "Varování !"
#. module: hr_timesheet
#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:77
#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:132
#, python-format
msgid "UserError"
msgstr ""
msgstr "UserError"
#. module: hr_timesheet
#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:77
#, python-format
msgid "No cost unit defined for this employee !"
msgstr ""
msgstr "Pro tohoto zaměstnance nebyla určena cenová jednotka !"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:43
#: code:addons/hr_timesheet/report/users_timesheet.py:77
#, python-format
msgid "Tue"
msgstr ""
msgstr "Út"
#. module: hr_timesheet
#: field:hr.sign.out.project,account_id:0
@ -186,32 +195,32 @@ msgstr "Analytický účet"
#: code:addons/hr_timesheet/wizard/hr_timesheet_print_employee.py:42
#, python-format
msgid "Warning"
msgstr ""
msgstr "Varování"
#. module: hr_timesheet
#: model:ir.module.module,shortdesc:hr_timesheet.module_meta_information
msgid "Human Resources (Timesheet encoding)"
msgstr ""
msgstr "Lidské zdroje (Kódování časových rozvrhů)"
#. module: hr_timesheet
#: view:hr.sign.in.project:0
#: view:hr.sign.out.project:0
msgid "Sign In/Out By Project"
msgstr ""
msgstr "Přihlášení/Odhlášení podle projektu"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:43
#: code:addons/hr_timesheet/report/users_timesheet.py:77
#, python-format
msgid "Sat"
msgstr ""
msgstr "So"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:43
#: code:addons/hr_timesheet/report/users_timesheet.py:77
#, python-format
msgid "Sun"
msgstr ""
msgstr "Ne"
#. module: hr_timesheet
#: view:hr.analytical.timesheet.employee:0
@ -222,18 +231,18 @@ msgstr "Tisk"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Timesheet Lines"
msgstr ""
msgstr "Řádky časového rozvrhu"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "juillet"
msgstr ""
msgstr "červenec"
#. module: hr_timesheet
#: view:hr.analytical.timesheet.users:0
msgid "Monthly Employees Timesheet"
msgstr ""
msgstr "Měsíční časový rozvrh zaměstnance"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -242,7 +251,7 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "July"
msgstr ""
msgstr "Červenec"
#. module: hr_timesheet
#: field:hr.sign.in.project,date:0
@ -253,13 +262,13 @@ msgstr "Počáteční datum"
#. module: hr_timesheet
#: view:hr.employee:0
msgid "Categories"
msgstr ""
msgstr "Kategorie"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "novembre"
msgstr ""
msgstr "listopad"
#. module: hr_timesheet
#: model:ir.actions.act_window,help:hr_timesheet.act_hr_timesheet_line_evry1_all_form
@ -267,6 +276,8 @@ msgid ""
"Through Working Hours you can register your working hours by project every "
"day."
msgstr ""
"Pomocí pracovních hodin můžete každý den registrovat vaše pracovní hodiny "
"podle projektu."
#. module: hr_timesheet
#: model:ir.module.module,description:hr_timesheet.module_meta_information
@ -283,6 +294,18 @@ msgid ""
"to set up a management by affair.\n"
" "
msgstr ""
"\n"
"Tento modul realizuje systém časového rozvrhu. Každý zaměstnanec může "
"zadávat a\n"
"sledovat svůj čas strávený na různých projektech. Projekt je \n"
"analytický účet a čas strávený na projektu generuje ceny na\n"
"analytickém účtu.\n"
"\n"
"Je poskytováno mnoho vykazování nad časem a sledováním zaměstnanců.\n"
"\n"
"Je celkově integrováno s module účtování cen. Umožňuje vám\n"
"nastavit správu podle poměru.\n"
" "
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -291,18 +314,18 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "March"
msgstr ""
msgstr "Březen"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Total cost"
msgstr ""
msgstr "Celková cena"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "décembre"
msgstr ""
msgstr "prosinec"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -311,22 +334,22 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "September"
msgstr ""
msgstr "Září"
#. module: hr_timesheet
#: model:ir.model,name:hr_timesheet.model_hr_analytic_timesheet
msgid "Timesheet Line"
msgstr ""
msgstr "Řádek časového rozvrhu"
#. module: hr_timesheet
#: field:hr.analytical.timesheet.users,employee_ids:0
msgid "employees"
msgstr ""
msgstr "zaměstnanci"
#. module: hr_timesheet
#: view:account.analytic.account:0
msgid "Stats by month"
msgstr ""
msgstr "Statistika podle měsíce"
#. module: hr_timesheet
#: view:account.analytic.account:0
@ -343,25 +366,25 @@ msgstr "Popis práce"
#. module: hr_timesheet
#: view:account.analytic.account:0
msgid "To be invoiced"
msgstr ""
msgstr "K fakturaci"
#. module: hr_timesheet
#: model:ir.actions.report.xml,name:hr_timesheet.report_user_timesheet
msgid "Employee timesheet"
msgstr ""
msgstr "Časový rozvrh zaměstnance"
#. module: hr_timesheet
#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_sign_in
#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_sign_out
msgid "Sign in / Sign out by project"
msgstr ""
msgstr "Přihlášení / Odhlášení podle projektu"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:43
#: code:addons/hr_timesheet/report/users_timesheet.py:77
#, python-format
msgid "Fri"
msgstr ""
msgstr ""
#. module: hr_timesheet
#: view:hr.sign.in.project:0
@ -375,27 +398,29 @@ msgid ""
"Analytic journal is not defined for employee %s \n"
"Define an employee for the selected user and assign an analytic journal!"
msgstr ""
"Pro zaměstnance %s není určen Analytický deník \n"
"Určete zaměstnance pro vybraného uživatele a přiřaďte analxtický deník!"
#. module: hr_timesheet
#: view:hr.sign.in.project:0
msgid "(Keep empty for current time)"
msgstr ""
msgstr "(Nechejte prázdné pro aktuální čas)"
#. module: hr_timesheet
#: view:hr.employee:0
msgid "Timesheets"
msgstr ""
msgstr "Časové rozvrhy"
#. module: hr_timesheet
#: help:hr.employee,product_id:0
msgid "Specifies employee's designation as a product with type 'service'."
msgstr ""
msgstr "Určuje zařazení zaměstnance jako výrobek s typem 'služba'."
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "août"
msgstr ""
msgstr "srpen"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -404,7 +429,7 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "August"
msgstr ""
msgstr "Srpen"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -413,23 +438,23 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "June"
msgstr ""
msgstr "Červen"
#. module: hr_timesheet
#: view:hr.analytical.timesheet.employee:0
msgid "Print My Timesheet"
msgstr ""
msgstr "Tisknout můj časový rozvrh"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "mars"
msgstr ""
msgstr "březen"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Date"
msgstr ""
msgstr "Datum"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -438,12 +463,12 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "November"
msgstr ""
msgstr "Listopad"
#. module: hr_timesheet
#: constraint:hr.employee:0
msgid "Error ! You cannot create recursive Hierarchy of Employees."
msgstr ""
msgstr "Chyba ! Nemůžete vytvořit rekurzivní Hierarchii zaměstnanců"
#. module: hr_timesheet
#: field:hr.sign.out.project,date:0
@ -457,7 +482,7 @@ msgstr "Koncové datum"
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "October"
msgstr ""
msgstr "Říjen"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -466,35 +491,35 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "January"
msgstr ""
msgstr "Leden"
#. module: hr_timesheet
#: view:account.analytic.account:0
msgid "Key dates"
msgstr ""
msgstr "Klíčové dny"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:43
#: code:addons/hr_timesheet/report/users_timesheet.py:77
#, python-format
msgid "Thu"
msgstr ""
msgstr "Čt"
#. module: hr_timesheet
#: view:account.analytic.account:0
msgid "Analysis stats"
msgstr ""
msgstr "Statistiká analýza"
#. module: hr_timesheet
#: model:ir.model,name:hr_timesheet.model_hr_analytical_timesheet_employee
msgid "Print Employee Timesheet & Print My Timesheet"
msgstr ""
msgstr "Tisknout Časový rozvrh zaměstnance & Tisknou můj časový rozvrh"
#. module: hr_timesheet
#: field:hr.sign.in.project,emp_id:0
#: field:hr.sign.out.project,emp_id:0
msgid "Employee ID"
msgstr ""
msgstr "ID zaměstnance"
#. module: hr_timesheet
#: view:hr.sign.out.project:0
@ -504,12 +529,12 @@ msgstr "Obecné informace"
#. module: hr_timesheet
#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_my
msgid "My Timesheet"
msgstr ""
msgstr "Moje časové rozvrhy"
#. module: hr_timesheet
#: view:account.analytic.account:0
msgid "Analysis summary"
msgstr ""
msgstr "Souhrn analýzy"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -518,7 +543,7 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "December"
msgstr ""
msgstr "Prosinec"
#. module: hr_timesheet
#: view:hr.analytical.timesheet.employee:0
@ -526,7 +551,7 @@ msgstr ""
#: view:hr.sign.in.project:0
#: view:hr.sign.out.project:0
msgid "Cancel"
msgstr "Storno"
msgstr "Zrušit"
#. module: hr_timesheet
#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_users
@ -534,30 +559,30 @@ msgstr "Storno"
#: model:ir.actions.wizard,name:hr_timesheet.wizard_hr_timesheet_users
#: model:ir.ui.menu,name:hr_timesheet.menu_hr_timesheet_users
msgid "Employees Timesheet"
msgstr ""
msgstr "Časové rozvrhy zaměstnanců"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "février"
msgstr ""
msgstr "únor"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Information"
msgstr ""
msgstr "Informace"
#. module: hr_timesheet
#: field:hr.analytical.timesheet.employee,employee_id:0
#: model:ir.model,name:hr_timesheet.model_hr_employee
msgid "Employee"
msgstr ""
msgstr "Zaměstnanec"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "avril"
msgstr ""
msgstr "duben"
#. module: hr_timesheet
#: field:hr.sign.in.project,server_date:0
@ -568,23 +593,23 @@ msgstr "Současné datum"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Anlytic account"
msgstr ""
msgstr "Analytický účet"
#. module: hr_timesheet
#: view:hr.analytical.timesheet.employee:0
msgid "This wizard will print monthly timesheet"
msgstr ""
msgstr "Tento průvodce bude tisknout měsíční časový rozvrh"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
#: field:hr.employee,product_id:0
msgid "Product"
msgstr ""
msgstr "Výrobek"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Invoicing"
msgstr ""
msgstr "Fakturace"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -593,34 +618,34 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "May"
msgstr ""
msgstr "Květen"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Total time"
msgstr ""
msgstr "Celkový čas"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "juin"
msgstr ""
msgstr "červen"
#. module: hr_timesheet
#: view:hr.sign.in.project:0
msgid "(local time on the server side)"
msgstr "(lokální čas na serveru)"
msgstr "(místní čas na straně serveru)"
#. module: hr_timesheet
#: model:ir.actions.act_window,name:hr_timesheet.act_hr_timesheet_line_evry1_all_form
#: model:ir.ui.menu,name:hr_timesheet.menu_hr_working_hours
msgid "Working Hours"
msgstr ""
msgstr "Pracovní hodiny"
#. module: hr_timesheet
#: model:ir.model,name:hr_timesheet.model_hr_sign_in_project
msgid "Sign In By Project"
msgstr ""
msgstr "Přihlášení podle projektu"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -629,28 +654,28 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "February"
msgstr ""
msgstr "Únor"
#. module: hr_timesheet
#: field:hr.analytic.timesheet,line_id:0
msgid "Analytic line"
msgstr ""
msgstr "Analytický řádek"
#. module: hr_timesheet
#: model:ir.model,name:hr_timesheet.model_hr_sign_out_project
msgid "Sign Out By Project"
msgstr ""
msgstr "Odhlášení podle projektu"
#. module: hr_timesheet
#: view:hr.analytical.timesheet.users:0
msgid "Employees"
msgstr ""
msgstr "Zaměstnanci"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "octobre"
msgstr ""
msgstr "říjen"
#. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40
@ -659,7 +684,7 @@ msgstr ""
#: selection:hr.analytical.timesheet.users,month:0
#, python-format
msgid "April"
msgstr ""
msgstr "Duben"
#. module: hr_timesheet
#: code:addons/hr_timesheet/hr_timesheet.py:176
@ -668,12 +693,14 @@ msgid ""
"No analytic account defined on the project.\n"
"Please set one or we can not automatically fill the timesheet."
msgstr ""
"U projektu nebyl určen analytický účet.\n"
"Prosíme nastavte jej nebo nemůžeme automaticky vyplnit časový rozvrh."
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "mai"
msgstr ""
msgstr "květen"
#. module: hr_timesheet
#: view:account.analytic.account:0
@ -689,13 +716,13 @@ msgstr "Začít pracovat"
#. module: hr_timesheet
#: view:account.analytic.account:0
msgid "Stats by user"
msgstr ""
msgstr "Statistiky podle uživatele"
#. module: hr_timesheet
#: code:addons/hr_timesheet/wizard/hr_timesheet_print_employee.py:42
#, python-format
msgid "No employee defined for this user"
msgstr ""
msgstr "Pro tohoto uživatele nebyl určen zaměstnanec"
#. module: hr_timesheet
#: field:hr.analytical.timesheet.employee,year:0
@ -706,23 +733,23 @@ msgstr "Rok"
#. module: hr_timesheet
#: view:hr.analytic.timesheet:0
msgid "Accounting"
msgstr ""
msgstr "Účetnictví"
#. module: hr_timesheet
#: field:hr.analytic.timesheet,partner_id:0
msgid "Partner Id"
msgstr ""
msgstr "Id partnera"
#. module: hr_timesheet
#: view:hr.sign.out.project:0
msgid "Change Work"
msgstr ""
msgstr "Změnit práci"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet.employee,month:0
#: selection:hr.analytical.timesheet.users,month:0
msgid "septembre"
msgstr ""
msgstr "září"
#~ msgid "Choose Users"
#~ msgstr "Uživatelé"

View File

@ -31,7 +31,7 @@
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': [],
'update_xml': [],
'update_xml': ["import_base_view.xml"],
'demo_xml': [],
'test': [], #TODO provide test
'installable': True,

View File

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data>
<menuitem name="Import" id="menu_import_crm" parent="base.menu_base_partner"/>
</data>
</openerp>

View File

@ -22,11 +22,13 @@ import pprint
import mapper
import pooler
import tools
from tools.translate import _
from threading import Thread
import datetime
import logging
import StringIO
import traceback
pp = pprint.PrettyPrinter(indent=4)
@ -46,8 +48,10 @@ class import_framework(Thread):
"""
DO_NOT_FIND_DOMAIN = [('id', '=', 0)]
#TODO don't use context to pass credential parameters
def __init__(self, obj, cr, uid, instance_name, module_name, email_to_notify=False, context=None):
Thread.__init__(self)
self.external_id_field = 'id'
self.obj = obj
self.cr = cr
self.uid = uid
@ -56,10 +60,9 @@ class import_framework(Thread):
self.context = context or {}
self.email = email_to_notify
self.table_list = []
self.logger = logging.getLogger('import_framework')
self.initialize()
"""
Abstract Method to be implemented in
the real instance
@ -71,6 +74,13 @@ class import_framework(Thread):
"""
pass
def init_run(self):
"""
call after intialize run in the thread, not in the main process
TO use for long initialization operation
"""
pass
def get_data(self, table):
"""
@return: a list of dictionaries
@ -78,6 +88,22 @@ class import_framework(Thread):
"""
return [{}]
def get_link(self, from_table, ids, to_table):
"""
@return: a dictionaries that contains the association between the id (from_table)
and the list (to table) of id linked
"""
return {}
def get_external_id(self, data):
"""
@return the external id
the default implementation return self.external_id_field (that has 'id') by default
if the name of id field is different, you can overwrite this method or change the value
of self.external_id_field
"""
return data[self.external_id_field]
def get_mapping(self):
"""
@return: { TABLE_NAME : {
@ -140,7 +166,7 @@ class import_framework(Thread):
and each data_i have a external id => in data_id['id']
"""
if not datas:
return (0, 'No data in this table')
return (0, 'No data found')
mapping['id'] = 'id_new'
res = []
@ -154,14 +180,15 @@ class import_framework(Thread):
for k, field_name in self_dependencies:
data[k] = data.get(field_name) and self._generate_xml_id(data.get(field_name), table)
data['id_new'] = self._generate_xml_id(data['id'], table)
data['id_new'] = self._generate_xml_id(self.get_external_id(data), table)
fields, values = self._fields_mapp(data, mapping, table)
res.append(values)
model_obj = self.obj.pool.get(model)
if not model_obj:
raise ValueError("%s is not a valid model name" % model)
raise ValueError(_("%s is not a valid model name") % model)
self.logger.debug(_("fields imported : "))
self.logger.debug(fields)
(p, r, warning, s) = model_obj.import_data(self.cr, self.uid, fields, res, mode='update', current_module=self.module_name, noupdate=True, context=self.context)
for (field, field_name) in self_dependencies:
self._import_self_dependencies(model_obj, field, datas)
@ -296,10 +323,14 @@ class import_framework(Thread):
"""
domain_search = not domain_search and [('name', 'ilike', name)] or domain_search
obj = self.obj.pool.get(model)
if not obj: #if the model doesn't exist
return False
xml_id = self._generate_xml_id(name, table)
xml_ref = self.mapped_id_if_exist(model, domain_search, table, name)
fields.append('id')
data.append(xml_id)
obj.import_data(self.cr, self.uid, fields, [data], mode='update', current_module=self.module_name, noupdate=True, context=self.context)
return xml_ref or xml_id
@ -343,8 +374,10 @@ class import_framework(Thread):
"""
self.data_started = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
self.cr = pooler.get_db(self.cr.dbname).cursor()
error = False
result = []
try:
result = []
self.init_run()
imported = set() #to invoid importing 2 times the sames modules
for table in self.table_list:
to_import = self.get_mapping()[table].get('import', True)
@ -352,16 +385,22 @@ class import_framework(Thread):
res = self._resolve_dependencies(self.get_mapping()[table].get('dependencies', []), imported)
result.extend(res)
if to_import:
self.logger.debug(_("import : ") + table )
(position, warning) = self._import_table(table)
result.append((table, position, warning))
imported.add(table)
self.cr.commit()
except Exception, err:
sh = StringIO.StringIO()
traceback.print_exc(file=sh)
error = sh.getvalue()
print error
finally:
self.cr.close()
self.date_ended = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
self._send_notification_email(result)
self._send_notification_email(result, error)
def _resolve_dependencies(self, dep, imported):
"""
@ -375,25 +414,29 @@ class import_framework(Thread):
res = self._resolve_dependencies(self.get_mapping()[dependency].get('dependencies', []), imported)
result.extend(res)
if to_import:
self.logger.debug("import dependency : " + dependency)
r = self._import_table(dependency)
(position, warning) = r
result.append((dependency, position, warning))
imported.add(dependency)
return result
def _send_notification_email(self, result):
if not self.email:
return
def _send_notification_email(self, result, error):
if not self.email or not self.email[0]:
return False
tools.email_send(
'import_sugarcrm@module.openerp',
'import@module.openerp',
self.email,
self.get_email_subject(result),
self.get_email_body(result),
self.get_email_subject(result, error),
self.get_email_body(result, error),
)
logger = logging.getLogger('import_sugarcam')
logger.info("Import finished, notification email sended")
if error:
self.logger.error(_("Import failed due to an unexpected error"))
else:
self.logger.info(_("Import finished, notification email sended"))
def get_email_subject(self, result):
def get_email_subject(self, result, error=False):
"""
This method define the subject of the email send by openerp at the end of import
@param result: a list of tuple
@ -401,9 +444,11 @@ class import_framework(Thread):
@return the subject of the mail
"""
return "Import of your data finished at %s" % self.date_ended
if error:
return _("Data Import failed at %s due to an unexpected error") % self.date_ended
return _("Import of your data finished at %s") % self.date_ended
def get_email_body(self, result):
def get_email_body(self, result, error=False):
"""
This method define the body of the email send by openerp at the end of import. The body is separated in two part
the header (@see get_body_header), and the generate body with the list of table and number of record imported.
@ -414,19 +459,43 @@ class import_framework(Thread):
"""
body = "started at %s and finished at %s \n" % (self.data_started, self.date_ended)
body = _("started at %s and finished at %s \n") % (self.data_started, self.date_ended)
if error:
body += _("but failed, in consequence no data were imported to keep database consistency \n error : \n") + error
for (table, nb, warning) in result:
if not warning:
warning = "with no warning"
warning = _("with no warning")
else:
warning = "with warning : %s" % warning
body += "%s records were imported from table %s, %s \n" % (nb, table, warning)
warning = _("with warning : %s") % warning
body += _("%s has been successfully imported from %s %s, %s \n") % (nb, self.instance_name, table, warning)
return self.get_body_header(result) + "\n\n" + body
def get_body_header(self, result):
"""
@return the first sentences written in the mail's body
"""
return "The import of data \n instance name : %s \n" % self.instance_name
return _("The import of data \n instance name : %s \n") % self.instance_name
#For example of use see import_sugarcrm
#TODO documentation test
def run_test(self):
back_get_data = self.get_data
back_get_link = self.get_link
back_init = self.initialize
self.get_data = self.get_data_test
self.get_link = self.get_link_test
self.initialize = self.intialize_test
self.run()
self.get_data = back_get_data
self.get_link = back_get_link
self.initialize = back_init
def get_data_test(self, table):
return [{}]
def get_link_test(self, from_table, ids, to_table):
return {}
def intialize_test(self):
pass

View File

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
class mapper(object):
"""
@ -50,14 +50,13 @@ class concat(mapper):
Use : contact('field_name1', 'field_name2', delimiter='_')
concat value of fields using the delimiter, delimiter is optional
and by default is a space
"""
def __init__(self, *arg, **delimiter):
self.arg = arg
self.delimiter = delimiter and delimiter.get('delimiter', ' ') or ' '
def __call__(self, external_values):
return self.delimiter.join(map(lambda x : external_values.get(x,''), self.arg))
return self.delimiter.join(map(lambda x : tools.ustr(external_values.get(x,'')), self.arg))
class ppconcat(mapper):
"""
@ -71,7 +70,7 @@ class ppconcat(mapper):
self.delimiter = delimiter and delimiter.get('delimiter', ' ') or '\n\n'
def __call__(self, external_values):
return self.delimiter.join(map(lambda x : x + ": " + external_values.get(x,''), self.arg))
return self.delimiter.join(map(lambda x : x + ": " + tools.ustr(external_values.get(x,'')), self.arg))
class const(mapper):
"""
@ -105,7 +104,6 @@ class value(mapper):
val = external_values.get(self.fallback, self.default)
return val
class map_val(mapper):
"""
@ -169,5 +167,3 @@ class call(mapper):
else:
args.append(arg)
return self.fun(external_values, *args)

View File

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import import_sugarcrm
import sugar
import wizard

View File

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Import SugarCRM Data into OpenERP Module.',
'version': '1.0',
'category': 'Generic Modules',
'description': """This Module Import SugarCRM "Leads", "Opportunities", "Users", "Accounts",
"Contacts", "Employees", Meetings, Phonecalls, Emails, and Project, Project Tasks Data into OpenERP Module.""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['import_base','crm', 'document'],
'init_xml': [],
'update_xml': ["wizard/import_message_view.xml",
"import_sugarcrm_view.xml"],
'demo_xml': [],
'test': [],
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,8 @@
Install the SOAP framwwork for Python :
1. download the soap framework from http://pypi.python.org/pypi/ZSI/
extract the file “ZSI-2.0-rc3.tar.gz” and run following 2 commands
./setup.py build
./setup.py install
this will install soap framework for python.
or use the ZSI package of your distribution

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,105 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- Import Sugarcrm Form View -->
<record model="ir.ui.view" id="view_import_sugarcrm_form">
<field name="name">import.sugarcrm.form</field>
<field name="model">import.sugarcrm</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Import Data From SugarCRM">
<group col="8" >
<group colspan="2" col="1" width="200">
<label colspan="2" string="Import your data from SugarCRM :"/>
<label colspan="2" string="" />
<label colspan="2" string="Use the SugarSoap API URL (read tooltip) and a full access SugarCRM login."/>
<label colspan="2" string="" />
<label colspan="2" string="Choose data you want to import. Click 'Import' to get data manually or 'Schedule Reccurent Imports' to get recurrently and automatically data."/>
<label colspan="2" string="" />
<label colspan="2" string="If you make recurrent or ponctual import, data already in OpenERP will be updated by SugarCRM data."/>
<label colspan="2" string="" />
<label colspan="2" string="Do not forget the email address to be notified of the success of the import."/>
<label colspan="2" />
<label colspan="2" string="Online documentation:"/>
<label colspan="2" string="(Comming Soon)"/>
<label colspan="2" string=""/>
</group>
<separator string="" orientation="vertical" colspan="1" rowspan="24" />
<group colspan="4">
<separator string="Login Information" colspan="3"/>
<field name="url" colspan="4" widget="url"/>
<field name="username"/>
<newline/>
<field name="password" password="True" />
<separator string="" colspan="4"/>
<group colspan="4" col="6">
<group colspan="1" col="2">
<separator string="Address Book" colspan="4"/>
<field name="user" />
<field name= "account" />
<field name= "contact" />
</group>
<group colspan="1" col="1">
<separator string="CRM" colspan="4"/>
<field name="opportunity" />
<field name= "call" />
<field name= "meeting" />
<field name= "claim" />
</group>
<group colspan="2" col="2">
<separator string="Project" colspan="4"/>
<field name= "project" />
<field name= "project_task" />
<field name= "bug"/>
</group>
<group colspan="1" col="2">
<separator string="HR" colspan="4"/>
<field name="employee" />
<separator string="Document" colspan="4"/>
<field name="email_history"/>
<field name= "document" />
</group>
</group>
<group colspan="4">
<separator string="Email Notification When Import is finished" colspan="4"/>
<field name="email_from" widget="email" string="Email Address to Notify"/>
</group>
<group colspan="4" groups="base.group_no_one">
<separator string="Multi Instance Management" colspan="4"/>
<field name="instance_name"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
<button name="import_from_scheduler_all" groups="base.group_extended" string="_Schedule Recurrent Imports"
type="object" icon="gtk-execute" />
<button name="import_all" string="_Import"
type="object" icon="terp-camera_test"/>
</group>
</group>
</group>
</form>
</field>
</record>
<!-- Import Sugarcrm Action -->
<record model="ir.actions.act_window" id="action_import_sugarcrm">
<field name="name">Import SugarCRM</field>
<field name="res_model">import.sugarcrm</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_import_sugarcrm_form"/>
<field name="target">new</field>
</record>
<menuitem name="Import SugarCRM" id="menu_sugarcrm_import" parent="import_base.menu_import_crm" action="action_import_sugarcrm" icon="STOCK_EXECUTE"/>
</data>
</openerp>

View File

@ -0,0 +1,170 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import hashlib
from sugarsoap_services import *
from sugarsoap_services_types import *
from osv import osv
from tools.translate import _
import base64
from lxml import etree
import tools
import import_sugarcrm
import logging
class LoginError(Exception): pass
def login(username, password, url):
setURL(url)
loc = sugarsoapLocator()
portType = loc.getsugarsoapPortType(url)
request = loginRequest()
uauth = ns0.user_auth_Def(request)
request._user_auth = uauth
uauth._user_name = username
uauth._password = hashlib.md5(password).hexdigest()
uauth._version = '1.1'
try:
response = portType.login(request)
except:
raise osv.except_osv(_('Error !'), _('Authentication error !\nBad Username or Password bad SugarSoap Api url !'))
if -1 == response._return._id:
raise LoginError(response._return._error._description)
return (portType, response._return._id)
def relation_search(portType, sessionid, module_name=None, module_id=None, related_module=None, query=None, deleted=None):
se_req = get_relationshipsRequest()
se_req._session = sessionid
se_req._module_name = module_name
se_req._module_id = module_id
se_req._related_module = related_module
se_resp = portType.get_relationships(se_req)
ans_list = []
if se_resp:
list = se_resp._return.get_element_ids()
for i in list:
ans_list.append(i.get_element_id())
return ans_list
def attachment_search(portType, sessionid, module_name, module_id=None):
se_req = get_note_attachmentRequest()
se_req._session = sessionid
se_req._id = module_id
se_req._module_name = module_name
se_resp = portType.get_note_attachment(se_req)
file = se_resp._return._note_attachment.File
filename = se_resp._return._note_attachment.Filename
return file, filename
def user_get_attendee_list(portType, sessionid, module_name=None, module_id=None):
se_req = get_attendee_listRequest()
se_req._session = sessionid
se_req._module_name = module_name
se_req._id = module_id
se_resp = portType.get_attendee_list(se_req)
list = se_resp.get_element_return()
arch = base64.decodestring(list.Result)
eview = etree.XML(arch)
attendee_list = []
for child in eview:
attendee_dict = {}
for ch in child.getchildren():
attendee_dict[ch.tag] = tools.ustr(ch.text)
attendee_list.append(attendee_dict)
return attendee_list
def get_contact_by_email(portType, username, password, email_address=None):
se_req = contact_by_emailRequest()
se_req._user_name = username
se_req._password = password
se_req._email_address = email_address
try:
se_resp = portType.contact_by_email(se_req)
email_list = []
for list in se_resp.get_element_return():
if list.Email_address in email_list:
continue
elif list.Email_address:
email_list.append(list.Email_address)
return email_list
except Exception,e:
logging.getLogger('sugarcrm_soap').error('Exception: %s\n' % (tools.ustr(e)))
return False
def get_document_revision_search(portType, sessionid, module_id=None):
se_req = get_document_revisionRequest()
se_req._session = sessionid
se_req._i = module_id
se_resp = portType.get_document_list(se_req)
file = se_resp._return.Document_revision.File
filename = se_resp._return.Document_revision.Filename
return file, filename
def email_search(portType, sessionid, module_name, module_id, select_fields=None):
se_req = get_entryRequest()
se_req._session = sessionid
se_req._module_name = module_name
se_req._id = module_id
se_req._select_fields = select_fields
se_resp = portType.get_entry(se_req)
ans_list = []
if se_resp:
list = se_resp._return._entry_list
for i in list:
ans_dir = {}
for j in i._name_value_list:
ans_dir[tools.ustr(j._name)] = tools.ustr(j._value)
#end for
ans_list.append(ans_dir)
#end for
return ans_list
def search(portType, sessionid, module_name, offset, max_results, query=None, order_by=None, select_fields=None, deleted=None):
se_req = get_entry_listRequest()
se_req._session = sessionid
se_req._module_name = module_name
if query != None:
se_req._query = query
se_req._order_by = order_by
se_req._offset = offset
se_req._select_fields = select_fields
se_req._max_results = max_results
se_req._deleted = deleted
se_resp = portType.get_entry_list(se_req)
ans_list = []
if se_resp:
list = se_resp._return._entry_list
for i in list:
ans_dir = {}
for j in i._name_value_list:
ans_dir[tools.ustr(j._name)] = import_sugarcrm.unescape_htmlentities(tools.ustr(j._value))
#end for
ans_list.append(ans_dir)
#end for
return ans_list

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,646 @@
##################################################
# sugarsoap_services_types.py
# generated by ZSI.generate.wsdl2python
##################################################
from osv import osv
from tools.translate import _
try:
import ZSI
import ZSI.TCcompound
from ZSI.TC import TypeDefinition
from ZSI.TC import _get_type_definition as GTD
from ZSI.generate.pyclass import pyclass_type
except ImportError:
raise osv.except_osv(_('ZSI Import Error!'), _('Please install SOAP for python - ZSI-2.0-rc3.tar.gz from http://pypi.python.org/pypi/ZSI/'))
##############################
# targetNamespace
# http://www.sugarcrm.com/sugarcrm
##############################
class ns0:
targetNamespace = "http://www.sugarcrm.com/sugarcrm"
class contact_detail_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "contact_detail")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#Unused variable ns.
#ns = ns0.contact_detail_Def.schema
TClist = [ZSI.TC.String(pname="email_address", aname="_email_address", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="name1", aname="_name1", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="name2", aname="_name2", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="association", aname="_association", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="id", aname="_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="msi_id", aname="_msi_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="type", aname="_type", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._email_address = None
self._name1 = None
self._name2 = None
self._association = None
self._id = None
self._msi_id = None
self._type = None
return
Holder.__name__ = "contact_detail_Holder"
self.pyclass = Holder
class contact_detail_array_Def(ZSI.TC.Array, TypeDefinition):
#complexType/complexContent base="SOAP-ENC:Array"
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "contact_detail_array")
def __init__(self, pname, ofwhat=(), extend=False, restrict=False, attributes=None, **kw):
ofwhat = ns0.contact_detail_Def(None, typed=False)
atype = (u'http://www.sugarcrm.com/sugarcrm', u'contact_detail[]')
ZSI.TCcompound.Array.__init__(self, atype, ofwhat, pname=pname, childnames='item', **kw)
class user_detail_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "user_detail")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.user_detail_Def.schema
TClist = [ZSI.TC.String(pname="email_address", aname="_email_address", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="user_name", aname="_user_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="first_name", aname="_first_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="last_name", aname="_last_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="department", aname="_department", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="id", aname="_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="title", aname="_title", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._email_address = None
self._user_name = None
self._first_name = None
self._last_name = None
self._department = None
self._id = None
self._title = None
return
Holder.__name__ = "user_detail_Holder"
self.pyclass = Holder
class user_detail_array_Def(ZSI.TC.Array, TypeDefinition):
#complexType/complexContent base="SOAP-ENC:Array"
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "user_detail_array")
def __init__(self, pname, ofwhat=(), extend=False, restrict=False, attributes=None, **kw):
ofwhat = ns0.user_detail_Def(None, typed=False)
atype = (u'http://www.sugarcrm.com/sugarcrm', u'user_detail[]')
ZSI.TCcompound.Array.__init__(self, atype, ofwhat, pname=pname, childnames='item', **kw)
class note_attachment_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "note_attachment")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
# ns = ns0.note_attachment_Def.schema
TClist = [ZSI.TC.String(pname="id", aname="_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="filename", aname="_filename", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="file", aname="_file", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._id = None
self._filename = None
self._file = None
return
Holder.__name__ = "note_attachment_Holder"
self.pyclass = Holder
class return_note_attachment_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "return_note_attachment")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.return_note_attachment_Def.schema
TClist = [GTD("http://www.sugarcrm.com/sugarcrm","note_attachment",lazy=False)(pname="note_attachment", aname="_note_attachment", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._note_attachment = None
self._error = None
return
Holder.__name__ = "return_note_attachment_Holder"
self.pyclass = Holder
class user_auth_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "user_auth")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.user_auth_Def.schema
TClist = [ZSI.TC.String(pname="user_name", aname="_user_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="password", aname="_password", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="version", aname="_version", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._user_name = None
self._password = None
self._version = None
return
Holder.__name__ = "user_auth_Holder"
self.pyclass = Holder
class field_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "field")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.field_Def.schema
TClist = [ZSI.TC.String(pname="name", aname="_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="type", aname="_type", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="label", aname="_label", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname="required", aname="_required", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","name_value_list",lazy=False)(pname="options", aname="_options", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._name = None
self._type = None
self._label = None
self._required = None
self._options = None
return
Holder.__name__ = "field_Holder"
self.pyclass = Holder
class field_list_Def(ZSI.TC.Array, TypeDefinition):
#complexType/complexContent base="SOAP-ENC:Array"
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "field_list")
def __init__(self, pname, ofwhat=(), extend=False, restrict=False, attributes=None, **kw):
ofwhat = ns0.field_Def(None, typed=False)
atype = (u'http://www.sugarcrm.com/sugarcrm', u'field[]')
ZSI.TCcompound.Array.__init__(self, atype, ofwhat, pname=pname, childnames='item', **kw)
class name_value_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "name_value")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.name_value_Def.schema
TClist = [ZSI.TC.String(pname="name", aname="_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="value", aname="_value", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._name = None
self._value = None
return
Holder.__name__ = "name_value_Holder"
self.pyclass = Holder
class name_value_list_Def(ZSI.TC.Array, TypeDefinition):
#complexType/complexContent base="SOAP-ENC:Array"
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "name_value_list")
def __init__(self, pname, ofwhat=(), extend=False, restrict=False, attributes=None, **kw):
ofwhat = ns0.name_value_Def(None, typed=False)
atype = (u'http://www.sugarcrm.com/sugarcrm', u'name_value[]')
ZSI.TCcompound.Array.__init__(self, atype, ofwhat, pname=pname, childnames='item', **kw)
class name_value_lists_Def(ZSI.TC.Array, TypeDefinition):
#complexType/complexContent base="SOAP-ENC:Array"
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "name_value_lists")
def __init__(self, pname, ofwhat=(), extend=False, restrict=False, attributes=None, **kw):
ofwhat = ns0.name_value_list_Def(None, typed=False)
atype = (u'http://www.sugarcrm.com/sugarcrm', u'name_value_list[]')
ZSI.TCcompound.Array.__init__(self, atype, ofwhat, pname=pname, childnames='item', **kw)
class select_fields_Def(ZSI.TC.Array, TypeDefinition):
#complexType/complexContent base="SOAP-ENC:Array"
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "select_fields")
def __init__(self, pname, ofwhat=(), extend=False, restrict=False, attributes=None, **kw):
ofwhat = ZSI.TC.String(None, typed=False)
atype = (u'http://www.w3.org/2001/XMLSchema', u'string[]')
ZSI.TCcompound.Array.__init__(self, atype, ofwhat, pname=pname, childnames='item', **kw)
class module_fields_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "module_fields")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
# ns = ns0.module_fields_Def.schema
TClist = [ZSI.TC.String(pname="module_name", aname="_module_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","field_list",lazy=False)(pname="module_fields", aname="_module_fields", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._module_name = None
self._module_fields = None
self._error = None
return
Holder.__name__ = "module_fields_Holder"
self.pyclass = Holder
class module_list_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "module_list")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.module_list_Def.schema
TClist = [GTD("http://www.sugarcrm.com/sugarcrm","select_fields",lazy=False)(pname="modules", aname="_modules", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._modules = None
self._error = None
return
Holder.__name__ = "module_list_Holder"
self.pyclass = Holder
class error_value_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "error_value")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.error_value_Def.schema
TClist = [ZSI.TC.String(pname="number", aname="_number", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="name", aname="_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="description", aname="_description", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._number = None
self._name = None
self._description = None
return
Holder.__name__ = "error_value_Holder"
self.pyclass = Holder
class entry_value_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "entry_value")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.entry_value_Def.schema
TClist = [ZSI.TC.String(pname="id", aname="_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="module_name", aname="_module_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","name_value_list",lazy=False)(pname="name_value_list", aname="_name_value_list", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._id = None
self._module_name = None
self._name_value_list = None
return
Holder.__name__ = "entry_value_Holder"
self.pyclass = Holder
class entry_list_Def(ZSI.TC.Array, TypeDefinition):
#complexType/complexContent base="SOAP-ENC:Array"
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "entry_list")
def __init__(self, pname, ofwhat=(), extend=False, restrict=False, attributes=None, **kw):
ofwhat = ns0.entry_value_Def(None, typed=False)
atype = (u'http://www.sugarcrm.com/sugarcrm', u'entry_value[]')
ZSI.TCcompound.Array.__init__(self, atype, ofwhat, pname=pname, childnames='item', **kw)
class get_entry_list_result_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "get_entry_list_result")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.get_entry_list_result_Def.schema
TClist = [ZSI.TCnumbers.Iint(pname="result_count", aname="_result_count", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname="next_offset", aname="_next_offset", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","field_list",lazy=False)(pname="field_list", aname="_field_list", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","entry_list",lazy=False)(pname="entry_list", aname="_entry_list", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._result_count = None
self._next_offset = None
self._field_list = None
self._entry_list = None
self._error = None
return
Holder.__name__ = "get_entry_list_result_Holder"
self.pyclass = Holder
class get_entry_result_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "get_entry_result")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.get_entry_result_Def.schema
TClist = [GTD("http://www.sugarcrm.com/sugarcrm","field_list",lazy=False)(pname="field_list", aname="_field_list", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","entry_list",lazy=False)(pname="entry_list", aname="_entry_list", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._field_list = None
self._entry_list = None
self._error = None
return
Holder.__name__ = "get_entry_result_Holder"
self.pyclass = Holder
class set_entry_result_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "set_entry_result")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.set_entry_result_Def.schema
TClist = [ZSI.TC.String(pname="id", aname="_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._id = None
self._error = None
return
Holder.__name__ = "set_entry_result_Holder"
self.pyclass = Holder
class set_entries_result_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "set_entries_result")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.set_entries_result_Def.schema
TClist = [GTD("http://www.sugarcrm.com/sugarcrm","select_fields",lazy=False)(pname="ids", aname="_ids", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._ids = None
self._error = None
return
Holder.__name__ = "set_entries_result_Holder"
self.pyclass = Holder
class id_mod_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "id_mod")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.id_mod_Def.schema
TClist = [ZSI.TC.String(pname="id", aname="_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="date_modified", aname="_date_modified", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname="deleted", aname="_deleted", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._id = None
self._date_modified = None
self._deleted = None
return
Holder.__name__ = "id_mod_Holder"
self.pyclass = Holder
class ids_mods_Def(ZSI.TC.Array, TypeDefinition):
#complexType/complexContent base="SOAP-ENC:Array"
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "ids_mods")
def __init__(self, pname, ofwhat=(), extend=False, restrict=False, attributes=None, **kw):
ofwhat = ns0.id_mod_Def(None, typed=False)
atype = (u'http://www.sugarcrm.com/sugarcrm', u'id_mod[]')
ZSI.TCcompound.Array.__init__(self, atype, ofwhat, pname=pname, childnames='item', **kw)
class get_relationships_result_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "get_relationships_result")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.get_relationships_result_Def.schema
TClist = [GTD("http://www.sugarcrm.com/sugarcrm","ids_mods",lazy=False)(pname="ids", aname="_ids", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._ids = None
self._error = None
return
Holder.__name__ = "get_relationships_result_Holder"
self.pyclass = Holder
class set_relationship_value_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "set_relationship_value")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.set_relationship_value_Def.schema
TClist = [ZSI.TC.String(pname="module1", aname="_module1", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="module1_id", aname="_module1_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="module2", aname="_module2", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="module2_id", aname="_module2_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._module1 = None
self._module1_id = None
self._module2 = None
self._module2_id = None
return
Holder.__name__ = "set_relationship_value_Holder"
self.pyclass = Holder
class set_relationship_list_Def(ZSI.TC.Array, TypeDefinition):
#complexType/complexContent base="SOAP-ENC:Array"
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "set_relationship_list")
def __init__(self, pname, ofwhat=(), extend=False, restrict=False, attributes=None, **kw):
ofwhat = ns0.set_relationship_value_Def(None, typed=False)
atype = (u'http://www.sugarcrm.com/sugarcrm', u'set_relationship_value[]')
ZSI.TCcompound.Array.__init__(self, atype, ofwhat, pname=pname, childnames='item', **kw)
class set_relationship_list_result_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "set_relationship_list_result")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.set_relationship_list_result_Def.schema
TClist = [ZSI.TCnumbers.Iint(pname="created", aname="_created", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname="failed", aname="_failed", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._created = None
self._failed = None
self._error = None
return
Holder.__name__ = "set_relationship_list_result_Holder"
self.pyclass = Holder
class document_revision_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "document_revision")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.document_revision_Def.schema
TClist = [ZSI.TC.String(pname="id", aname="_id", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="document_name", aname="_document_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="revision", aname="_revision", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="filename", aname="_filename", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="file", aname="_file", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._id = None
self._document_name = None
self._revision = None
self._filename = None
self._file = None
return
Holder.__name__ = "document_revision_Holder"
self.pyclass = Holder
class get_entry_list_result_encoded_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "get_entry_list_result_encoded")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
# ns = ns0.get_entry_list_result_encoded_Def.schema
TClist = [ZSI.TCnumbers.Iint(pname="result_count", aname="_result_count", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname="next_offset", aname="_next_offset", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname="total_count", aname="_total_count", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","select_fields",lazy=False)(pname="field_list", aname="_field_list", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="entry_list", aname="_entry_list", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._result_count = None
self._next_offset = None
self._total_count = None
self._field_list = None
self._entry_list = None
self._error = None
return
Holder.__name__ = "get_entry_list_result_encoded_Holder"
self.pyclass = Holder
class get_sync_result_encoded_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "get_sync_result_encoded")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
# ns = ns0.get_sync_result_encoded_Def.schema
TClist = [ZSI.TC.String(pname="result", aname="_result", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._result = None
self._error = None
return
Holder.__name__ = "get_sync_result_encoded_Holder"
self.pyclass = Holder
class get_quick_sync_result_encoded_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "get_quick_sync_result_encoded")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.get_quick_sync_result_encoded_Def.schema
TClist = [ZSI.TC.String(pname="result", aname="_result", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname="result_count", aname="_result_count", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname="next_offset", aname="_next_offset", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname="total_count", aname="_total_count", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._result = None
self._result_count = None
self._next_offset = None
self._total_count = None
self._error = None
return
Holder.__name__ = "get_quick_sync_result_encoded_Holder"
self.pyclass = Holder
class return_document_revision_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
schema = "http://www.sugarcrm.com/sugarcrm"
type = (schema, "return_document_revision")
def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
#ns = ns0.return_document_revision_Def.schema
TClist = [GTD("http://www.sugarcrm.com/sugarcrm","document_revision",lazy=False)(pname="document_revision", aname="_document_revision", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://www.sugarcrm.com/sugarcrm","error_value",lazy=False)(pname="error", aname="_error", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
self.attribute_typecode_dict = attributes or {}
if extend: TClist += ofwhat
if restrict: TClist = ofwhat
ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
class Holder:
__metaclass__ = pyclass_type
typecode = self
def __init__(self):
# pyclass
self._document_revision = None
self._error = None
return
Holder.__name__ = "return_document_revision_Holder"
self.pyclass = Holder
# end class ns0 (tns: http://www.sugarcrm.com/sugarcrm)

View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import import_message

View File

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
class import_message(osv.osv):
"""Import Message"""
_name = "import.message"
_description = __doc__
import_message()

View File

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- Import Message Form View -->
<record model="ir.ui.view" id="view_import_message_form">
<field name="name">import.message.form</field>
<field name="model">import.message</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Import Message">
<label colspan="4" nolabel="1" string="Data are importing, the process is running in the background, an email will be sent to the given email address if it was defined."/>
<separator string="" colspan="4" />
<button icon="gtk-ok" special="cancel" string="_Ok"/>
</form>
</field>
</record>
</data>
</openerp>

36
addons/l10n_br/i18n/ar.po Normal file
View File

@ -0,0 +1,36 @@
# Arabic 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-07 06:40+0000\n"
"PO-Revision-Date: 2011-09-22 02:56+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-22 04:48+0000\n"
"X-Generator: Launchpad (build 13996)\n"
#. module: l10n_br
#: model:ir.actions.todo,note:l10n_br.config_call_account_template_brazilian_localization
msgid ""
"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
"the name of the company, the chart template to follow, the no. of digits to "
"generate the code for your accounts and Bank account, currency to create "
"Journals. Thus,the pure copy of chart Template is generated.\n"
" This is the same wizard that runs from Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template."
msgstr ""
#. module: l10n_br
#: model:ir.module.module,description:l10n_br.module_meta_information
#: model:ir.module.module,shortdesc:l10n_br.module_meta_information
msgid "Brazilian Localization"
msgstr "النظام للبرازيل"

View File

@ -46,6 +46,7 @@ class StockMove(osv.osv):
procurement_obj = self.pool.get('procurement.order')
product_obj = self.pool.get('product.product')
wf_service = netsvc.LocalService("workflow")
processed_ids = [move.id]
if move.product_id.supply_method == 'produce' and move.product_id.procure_method == 'make_to_order':
bis = bom_obj.search(cr, uid, [
('product_id','=',move.product_id.id),
@ -55,11 +56,10 @@ class StockMove(osv.osv):
factor = move.product_qty
bom_point = bom_obj.browse(cr, uid, bis[0], context=context)
res = bom_obj._bom_explode(cr, uid, bom_point, factor, [])
dest = move.product_id.product_tmpl_id.property_stock_production.id
state = 'confirmed'
if move.state == 'assigned':
state = 'assigned'
for line in res[0]:
for line in res[0]:
valdef = {
'picking_id': move.picking_id.id,
'product_id': line['product_id'],
@ -70,12 +70,12 @@ class StockMove(osv.osv):
'move_dest_id': move.id,
'state': state,
'name': line['name'],
'location_dest_id': dest,
'move_history_ids': [(6,0,[move.id])],
'move_history_ids2': [(6,0,[])],
'procurements': [],
}
mid = move_obj.copy(cr, uid, move.id, default=valdef)
processed_ids.append(mid)
prodobj = product_obj.browse(cr, uid, line['product_id'], context=context)
proc_id = procurement_obj.create(cr, uid, {
'name': (move.picking_id.origin or ''),
@ -92,7 +92,7 @@ class StockMove(osv.osv):
})
wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr)
move_obj.write(cr, uid, [move.id], {
'location_id': move.location_dest_id.id,
'location_dest_id': move.location_id.id, # dummy move for the kit
'auto_validate': True,
'picking_id': False,
'state': 'confirmed'
@ -100,7 +100,7 @@ class StockMove(osv.osv):
for m in procurement_obj.search(cr, uid, [('move_id','=',move.id)], context):
wf_service.trg_validate(uid, 'procurement.order', m, 'button_confirm', cr)
wf_service.trg_validate(uid, 'procurement.order', m, 'button_wait_done', cr)
return True
return processed_ids
def action_consume(self, cr, uid, ids, product_qty, location_id=False, context=None):
""" Consumed product with specific quatity from specific source location.
@ -156,16 +156,13 @@ class StockPicking(osv.osv):
#
# Explode picking by replacing phantom BoMs
#
def action_explode(self, cr, uid, picks, *args):
""" Explodes picking by replacing phantom BoMs
@param picks: Picking ids.
@param *args: Arguments
@return: Picking ids.
"""
def action_explode(self, cr, uid, move_ids, *args):
"""Explodes moves by expanding kit components"""
move_obj = self.pool.get('stock.move')
for move in move_obj.browse(cr, uid, picks):
move_obj._action_explode(cr, uid, move)
return picks
todo = move_ids[:]
for move in move_obj.browse(cr, uid, move_ids):
todo.extend(move_obj._action_explode(cr, uid, move))
return list(set(todo))
StockPicking()

View File

@ -77,7 +77,7 @@ class procurement_order(osv.osv):
report_later += 1
for proc in procurement_obj.browse(cr, uid, ids, context=context):
if proc.state == 'exception':
report.append('PROC %d: on order - %3.2f %-5s - %s' % \
report.append(_('PROC %d: on order - %3.2f %-5s - %s') % \
(proc.id, proc.product_qty, proc.product_uom.name,
proc.product_id.name))
report_except += 1
@ -100,7 +100,7 @@ class procurement_order(osv.osv):
report_total += 1
for proc in procurement_obj.browse(cr, uid, report_ids, context=context):
if proc.state == 'exception':
report.append('PROC %d: from stock - %3.2f %-5s - %s' % \
report.append(_('PROC %d: from stock - %3.2f %-5s - %s') % \
(proc.id, proc.product_qty, proc.product_uom.name,
proc.product_id.name,))
report_except += 1
@ -111,15 +111,15 @@ class procurement_order(osv.osv):
end_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss')
if uid:
request = self.pool.get('res.request')
summary = '''Here is the procurement scheduling report.
summary = _("""Here is the procurement scheduling report.
Start Time: %s
End Time: %s
Total Procurements processed: %d
Procurements with exceptions: %d
Skipped Procurements (scheduled date outside of scheduler range) %d
Start Time: %s
End Time: %s
Total Procurements processed: %d
Procurements with exceptions: %d
Skipped Procurements (scheduled date outside of scheduler range) %d
Exceptions:\n'''% (start_date, end_date, report_total, report_except, report_later)
Exceptions:\n""") % (start_date, end_date, report_total, report_except, report_later)
summary += '\n'.join(report)
request.create(cr, uid,
{'name': "Procurement Processing Report.",

View File

@ -293,7 +293,7 @@
<para style="terp_default_Right_9">[[ formatLang(line.price_unit, digits=get_digits(dp='Purchase Price') ) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price') ) ]] [[ o.pricelist_id.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'), currency_obj=o.pricelist_id.currency_id ) ]]</para>
</td>
</tr>
<tr>
@ -339,7 +339,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='Purchase Price') ) ]] [[ o.pricelist_id.currency_id. symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Purchase Price'), currency_obj=o.pricelist_id.currency_id ) ]]</para>
</td>
</tr>
<tr>
@ -352,7 +352,7 @@
<para style="terp_default_9">Taxes :</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Purchase Price') ]] [[ o.pricelist_id.currency_id. symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Purchase Price', currency_obj=o.pricelist_id.currency_id) ]]</para>
</td>
</tr>
<tr>
@ -365,7 +365,7 @@
<para style="terp_default_Bold_9">Total :</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang(o.amount_total, digits=get_digits(dp='Purchase Price') ) ]] [[ o.pricelist_id.currency_id. symbol ]]</para>
<para style="terp_default_Bold_9_Right">[[ formatLang(o.amount_total, digits=get_digits(dp='Purchase Price') , currency_obj=o.pricelist_id.currency_id) ]]</para>
</td>
</tr>
</blockTable>

View File

@ -283,7 +283,7 @@
<para style="terp_default_Centre_9">[[ formatLang(line.discount) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price'), currency_obj=o.pricelist_id.currency_id) ]] </para>
</td>
</tr>
<tr>
@ -329,7 +329,7 @@
<para style="terp_default_9">Net Total :</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, dp='Sale Price') ]] [[ o.pricelist_id.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]]</para>
</td>
</tr>
<tr>
@ -342,7 +342,7 @@
<para style="terp_default_9">Taxes :</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Sale Price') ]] [[ o.pricelist_id.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]]</para>
</td>
</tr>
<tr>
@ -355,7 +355,7 @@
<para style="terp_default_Bold_9">Total :</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, dp='Sale Price') ]] [[ o.pricelist_id.currency_id.symbol ]] </para>
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]]</para>
</td>
</tr>
</blockTable>

View File

@ -322,6 +322,16 @@ class sale_order(osv.osv):
self.log(cr, uid, id, message)
return True
def onchange_pricelist_id(self, cr, uid, ids, pricelist_id, order_lines, context={}):
print order_lines
if (not pricelist_id) or (not order_lines):
return {}
warning = {
'title': _('Pricelist Warning!'),
'message' : _('If you change the pricelist of this order (and eventually the currency), prices of existing order lines will not be updated.')
}
return {'warning': warning}
def onchange_partner_id(self, cr, uid, ids, part):
if not part:
return {'value': {'partner_invoice_id': False, 'partner_shipping_id': False, 'partner_order_id': False, 'payment_term': False, 'fiscal_position': False}}

View File

@ -112,7 +112,7 @@
<field domain="[('partner_id','=',partner_id)]" name="partner_order_id"/>
<field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id" groups="base.group_extended"/>
<field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id" groups="base.group_extended"/>
<field domain="[('type','=','sale')]" name="pricelist_id" groups="base.group_extended"/>
<field domain="[('type','=','sale')]" name="pricelist_id" groups="base.group_extended" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
<field name="project_id" context="{'partner_id':partner_id, 'contact_id':partner_order_id, 'pricelist_id':pricelist_id, 'default_name':name}" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
<newline/>
<field colspan="4" mode="tree,form,graph" name="order_line" nolabel="1" widget="one2many_list">

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-20 04:54+0000\n"
"X-Generator: Launchpad (build 13980)\n"
"X-Launchpad-Export-Date: 2011-09-21 04:50+0000\n"
"X-Generator: Launchpad (build 13996)\n"
#. module: wiki
#: field:wiki.groups,template:0