[MERGE] trunk

bzr revid: abo@openerp.com-20121105101538-tdgu6bi8vp2lnqru
This commit is contained in:
Antonin Bourguignon 2012-11-05 11:15:38 +01:00
commit 602ed5c7ca
220 changed files with 2596 additions and 51848 deletions

View File

@ -61,7 +61,7 @@ class account_bank_statement(osv.osv):
return res
def _get_period(self, cr, uid, context=None):
periods = self.pool.get('account.period').find(cr, uid)
periods = self.pool.get('account.period').find(cr, uid,context=context)
if periods:
return periods[0]
return False

View File

@ -78,7 +78,7 @@ class account_cash_statement(osv.osv):
"""
res = {}
for statement in self.browse(cr, uid, ids, context=context):
if statement.journal_id.type not in ('cash',):
if (statement.journal_id.type not in ('cash',)) or (not statement.journal_id.cash_control):
continue
start = end = 0
for line in statement.details_ids:
@ -289,13 +289,13 @@ class account_cash_statement(osv.osv):
super(account_cash_statement, self).button_confirm_bank(cr, uid, ids, context=context)
absl_proxy = self.pool.get('account.bank.statement.line')
TABLES = (('Profit', 'profit_account_id'), ('Loss', 'loss_account_id'),)
TABLES = ((_('Profit'), 'profit_account_id'), (_('Loss'), 'loss_account_id'),)
for obj in self.browse(cr, uid, ids, context=context):
if obj.difference == 0.0:
continue
for item_label, item_account in TALBES:
for item_label, item_account in TABLES:
if getattr(obj.journal_id, item_account):
raise osv.except_osv(_('Error!'),
_('There is no %s Account on the journal %s.') % (item_label, obj.journal_id.name,))

View File

@ -509,8 +509,8 @@
<page string="Cash Registers">
<group>
<group string="Accounts">
<field name="profit_account_id"/>
<field name="loss_account_id"/>
<field name="profit_account_id" domain="[('type','!=','view')]"/>
<field name="loss_account_id" domain="[('type','!=','view')]"/>
<field name="internal_account_id"/>
</group>
<group string="Miscellaneous">
@ -1230,8 +1230,8 @@
<field name="move_id" string="Number (Move)"/>
<field name="account_id"/>
<field name="partner_id"/>
<field name="journal_id" context="{'journal_id':self}"/>
<field name="period_id" context="{'period_id':self}"/>
<field name="journal_id" context="{'journal_id':self}" widget="selection"/> <!-- it's important to keep widget='selection' in this filter viewbecause without that the value passed in the context is not the ID but the textual value (name) of the selected journal -->
<field name="period_id" context="{'period_id':self}" widget="selection"/> <!-- it's important to keep the widget='selection' in this field, for the same reason as explained above -->
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>

View File

@ -7,14 +7,15 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-06-20 16:18+0000\n"
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
"PO-Revision-Date: 2012-10-30 15:48+0000\n"
"Last-Translator: Frederic Clementi - Camptocamp.com "
"<frederic.clementi@camptocamp.com>\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: 2012-10-30 05:01+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:03+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: code:addons/account/account_move_line.py:1215
@ -151,7 +152,7 @@ msgstr "Définition des enfants"
#: code:addons/account/account_bank_statement.py:302
#, python-format
msgid "Journal item \"%s\" is not valid."
msgstr "Écriture \"%s\" n'est pas équilibrée"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_report_aged_receivable
@ -1608,10 +1609,9 @@ msgid ""
"entry per accounting document: invoice, refund, supplier payment, bank "
"statements, etc."
msgstr ""
"Une pièce comptable est composée de plusieurs écritures comptables, chacune "
"étant soit un débit soit un crédit. OpenERP crée automatiquement une pièce "
"comptable par document comptable : facture, avoir, paiement de fournisseur, "
"relevés bancaires, etc."
"Un écriture est composée de plusieurs lignes, chacune étant soit un débit "
"soit un crédit. OpenERP crée automatiquement une écriture par document "
"comptable : facture, avoir, paiement de fournisseur, relevés bancaires, etc."
#. module: account
#: view:account.entries.report:0
@ -1703,7 +1703,7 @@ msgstr "Recherche d'un relevé bancaire"
#. module: account
#: view:account.move.line:0
msgid "Unposted Journal Items"
msgstr "Pièces non comptabiliisées"
msgstr "Ecritures brouillon"
#. module: account
#: view:account.chart.template:0
@ -2478,8 +2478,6 @@ msgid ""
"In order to delete a bank statement, you must first cancel it to delete "
"related journal items."
msgstr ""
"Pour supprimer un relevé bancaire vous devez préalablement supprimer les "
"lignes rapprochées."
#. module: account
#: field:account.invoice,payment_term:0
@ -3629,7 +3627,7 @@ msgstr "État des ventes par type de compte"
#. module: account
#: view:account.move.line:0
msgid "Unreconciled Journal Items"
msgstr "Ecritures non lettrées"
msgstr "Ecritures non léttrées"
#. module: account
#: sql_constraint:res.currency:0
@ -3900,7 +3898,7 @@ msgstr ""
#. module: account
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
msgid "Account balance"
msgstr "Balance des comptes"
msgstr "Balance générale"
#. module: account
#: report:account.invoice:0
@ -3972,7 +3970,7 @@ msgstr "Nom"
#. module: account
#: model:ir.model,name:account.model_account_aged_trial_balance
msgid "Account Aged Trial balance Report"
msgstr "Rapport du solde de la balance agée"
msgstr "Balance agée"
#. module: account
#: code:addons/account/account_move_line.py:582
@ -4181,7 +4179,7 @@ msgstr ""
#. module: account
#: view:account.move.line:0
msgid "Posted Journal Items"
msgstr "Ecritures saisies"
msgstr "Ecritures validées"
#. module: account
#: view:account.tax.template:0
@ -4244,7 +4242,7 @@ msgstr "Titulaire du compte bancaire"
#: model:ir.actions.report.xml,name:account.account_account_balance
#: model:ir.ui.menu,name:account.menu_general_Balance_report
msgid "Trial Balance"
msgstr "Balance des comptes"
msgstr "Balance générale"
#. module: account
#: model:ir.model,name:account.model_account_invoice_cancel
@ -4659,7 +4657,7 @@ msgstr "Sert de compte par défaut pour le crédit"
#: view:validate.account.move:0
#: view:validate.account.move.lines:0
msgid "Post Journal Entries"
msgstr "Comptabiliser les pièces comptables dans le journal"
msgstr "Valider les écritures"
#. module: account
#: selection:account.invoice,state:0
@ -4927,7 +4925,7 @@ msgstr ""
#: code:addons/account/account.py:923
#, python-format
msgid "Opening Period"
msgstr "Période ouverte"
msgstr "Période d'ouverture"
#. module: account
#: view:account.move:0
@ -5611,7 +5609,7 @@ msgstr "Quantité de produits"
#: selection:account.move,state:0
#: view:account.move.line:0
msgid "Unposted"
msgstr "Non comptabilisé"
msgstr "Non validée"
#. module: account
#: view:account.change.currency:0
@ -5823,7 +5821,7 @@ msgstr "Journal d'écriture"
#: model:ir.actions.act_window,name:account.action_account_fiscalyear_close
#: model:ir.ui.menu,name:account.menu_wizard_fy_close
msgid "Generate Opening Entries"
msgstr "Générer les écritures d'ouverture"
msgstr "Générer l'écriture d'ouverture"
#. module: account
#: code:addons/account/account_move_line.py:775
@ -7117,7 +7115,7 @@ msgstr "Sélection du journal"
#: code:addons/account/account.py:432
#, python-format
msgid "Opening Balance"
msgstr "Solde initial"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_move_reconcile
@ -7727,8 +7725,7 @@ msgstr "Signes sur les Rapports"
#: code:addons/account/wizard/account_fiscalyear_close.py:88
#, python-format
msgid "The periods to generate opening entries were not found"
msgstr ""
"Les périodes pour générer les écritures d'ouverture n'ont pas été trouvées."
msgstr "Aucune période d'ouverture trouvée"
#. module: account
#: model:account.account.type,name:account.data_account_type_view
@ -7822,7 +7819,7 @@ msgstr "Journal des ventes"
#: code:addons/account/wizard/account_move_journal.py:104
#, python-format
msgid "Open Journal Items !"
msgstr "Écritures ouvertes !"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_invoice_tax
@ -7859,7 +7856,7 @@ msgstr ""
#. module: account
#: view:account.move:0
msgid "Unposted Journal Entries"
msgstr "Pièces non comptabilisées"
msgstr "Ecritures non validées"
#. module: account
#: view:product.product:0
@ -7976,7 +7973,7 @@ msgstr "Code de la case"
#. module: account
#: view:validate.account.move:0
msgid "Post Journal Entries of a Journal"
msgstr "Comptabiliser les pièces comptables d'un journal"
msgstr "Valider les écritures"
#. module: account
#: view:product.product:0
@ -8161,7 +8158,7 @@ msgstr "Ligne de caisse"
#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger_other
#: model:ir.ui.menu,name:account.menu_account_partner_ledger
msgid "Partner Ledger"
msgstr "Grand Livre"
msgstr "Livre des tiers"
#. module: account
#: selection:account.tax.template,type:0
@ -8359,7 +8356,7 @@ msgstr ""
#: help:account.account,reconcile:0
msgid ""
"Check this box if this account allows reconciliation of journal items."
msgstr "Cochez si le compte autorise le lettrage des pièces."
msgstr "Cochez si le compte autorise le lettrage des écritures."
#. module: account
#: help:account.period,state:0
@ -9220,7 +9217,7 @@ msgstr "inconnu"
#: code:addons/account/account.py:3130
#, python-format
msgid "Opening Entries Journal"
msgstr "Journal des écritures d'ouverture"
msgstr "Journal d'ouverture"
#. module: account
#: model:process.transition,note:account.process_transition_customerinvoice0
@ -10006,7 +10003,7 @@ msgstr "Ce compte de tiers remplacera le compte par défaut."
#. module: account
#: field:account.period,special:0
msgid "Opening/Closing Period"
msgstr "Ouverture/clôture d'exercice"
msgstr "Période d'ouverture/clôture"
#. module: account
#: field:account.account,currency_id:0
@ -10336,7 +10333,7 @@ msgstr "Date de fin"
#: model:ir.actions.act_window,name:account.action_account_open_closed_fiscalyear
#: model:ir.ui.menu,name:account.menu_wizard_account_open_closed_fiscalyear
msgid "Cancel Opening Entries"
msgstr "Annuler les écritures d'ouvertures"
msgstr "Annuler l'écriture d'ouverture"
#. module: account
#: field:account.payment.term.line,days2:0
@ -10505,7 +10502,7 @@ msgstr "Signer pour le parent"
#. module: account
#: model:ir.model,name:account.model_account_balance_report
msgid "Trial Balance Report"
msgstr "Rapport sur la balance des comptes"
msgstr "Balance générale"
#. module: account
#: model:ir.actions.act_window,name:account.action_bank_statement_draft_tree
@ -10688,7 +10685,7 @@ msgstr "Intervalle"
#. module: account
#: view:account.analytic.line:0
msgid "Analytic Journal Items related to a purchase journal."
msgstr "Imputations analytiques relatives au journal des achats."
msgstr "Ecritures analytiques relatives au journal des achats."
#. module: account
#: help:account.account,type:0
@ -11213,7 +11210,7 @@ msgstr "Future"
#. module: account
#: view:account.move.line:0
msgid "Search Journal Items"
msgstr "Rechercher des écritures comptables"
msgstr "Recherche par ligne d'écritures"
#. module: account
#: help:account.tax,base_sign:0

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: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-10-26 09:03+0000\n"
"PO-Revision-Date: 2012-10-31 10:41+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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: 2012-10-30 05:04+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:03+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: view:account.invoice.report:0
@ -7939,7 +7939,7 @@ msgstr "Строка кассы"
#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger_other
#: model:ir.ui.menu,name:account.menu_account_partner_ledger
msgid "Partner Ledger"
msgstr "Книгапартнера"
msgstr "Книга партнера"
#. module: account
#: selection:account.tax.template,type:0

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: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-06-20 16:03+0000\n"
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
"PO-Revision-Date: 2012-11-01 18:30+0000\n"
"Last-Translator: Dusan Laznik <laznik@mentis.si>\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: 2012-10-30 05:04+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: view:account.invoice.report:0
@ -1587,7 +1587,7 @@ msgstr "Neobdavčeno"
#. module: account
#: view:account.partner.reconcile.process:0
msgid "Go to Next Partner"
msgstr ""
msgstr "Naslednji parner"
#. module: account
#: view:account.bank.statement:0
@ -3150,7 +3150,7 @@ msgstr "Predloge kontnih načrtov"
#. module: account
#: model:ir.actions.act_window,name:account.action_wizard_multi_chart
msgid "Set Your Accounting Options"
msgstr ""
msgstr "Nastavitve"
#. module: account
#: view:report.account.sales:0
@ -4358,7 +4358,7 @@ msgstr "res_config_contents"
#. module: account
#: view:account.unreconcile:0
msgid "Unreconciliate Transactions"
msgstr ""
msgstr "Neusklajene postavke"
#. module: account
#: help:account.chart.template,visible:0
@ -4558,7 +4558,7 @@ msgstr "Datum dogodka"
#. module: account
#: view:account.unreconcile.reconcile:0
msgid "Unreconciliation Transactions"
msgstr ""
msgstr "Naknadno odprte postavke"
#. module: account
#: field:account.tax,ref_tax_code_id:0
@ -6046,7 +6046,7 @@ msgstr "Davek(%)"
#. module: account
#: view:account.addtmpl.wizard:0
msgid "Create an Account Based on this Template"
msgstr ""
msgstr "Ustvarite konto na osnovi te predloge"
#. module: account
#: view:account.account.type:0
@ -8827,7 +8827,7 @@ msgstr "Prodaja po vrstah"
#. module: account
#: view:account.analytic.cost.ledger.journal.report:0
msgid "Cost Ledger for Period"
msgstr ""
msgstr "Stroški za obdobje"
#. module: account
#: help:account.tax,child_depend:0
@ -10307,7 +10307,7 @@ msgstr "Urejanje vrst dnevnikov."
#. module: account
#: view:account.payment.term:0
msgid "Description on Invoices"
msgstr ""
msgstr "Opis na računih"
#. module: account
#: model:ir.model,name:account.model_account_analytic_chart

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: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-10-25 16:26+0000\n"
"Last-Translator: AllanWong <18895563@qq.com>\n"
"PO-Revision-Date: 2012-11-01 08:44+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\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: 2012-10-30 05:07+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: view:account.invoice.report:0
@ -2330,7 +2330,7 @@ msgstr "筛选"
#: selection:report.invoice.created,state:0
#, python-format
msgid "Open"
msgstr "打开"
msgstr "待支付"
#. module: account
#: model:process.node,note:account.process_node_draftinvoices0
@ -4668,7 +4668,7 @@ msgstr "税适用"
#: model:ir.ui.menu,name:account.menu_eaction_account_moves_sale
#, python-format
msgid "Journal Items"
msgstr "会计凭证"
msgstr "会计凭证明细"
#. module: account
#: code:addons/account/account.py:1095
@ -9642,7 +9642,7 @@ msgstr "本报表让您打印或产生一个由所有账簿生成的总账"
#: selection:account.account.template,type:0
#: selection:account.entries.report,type:0
msgid "Regular"
msgstr "定期"
msgstr "常规科目"
#. module: account
#: view:account.account:0
@ -10557,7 +10557,7 @@ msgstr "前景"
#. module: account
#: view:account.move.line:0
msgid "Search Journal Items"
msgstr "搜索分录"
msgstr "搜索会计凭证明细"
#. module: account
#: help:account.tax,base_sign:0

View File

@ -209,7 +209,7 @@ class res_partner(osv.osv):
relation='account.fiscal.position',
string="Fiscal Position",
view_load=True,
help="The fiscal position will determine taxes and the accounts used for the partner.",
help="The fiscal position will determine taxes and accounts used for the partner.",
),
'property_payment_term': fields.property(
'account.payment.term',

View File

@ -30,14 +30,14 @@ class product_category(osv.osv):
relation='account.account',
string="Income Account",
view_load=True,
help="This account will be used for invoices to value sales for the current product category"),
help="This account will be used for invoices to value sales."),
'property_account_expense_categ': fields.property(
'account.account',
'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
view_load=True,
help="This account will be used for invoices to value expenses for the current product category"),
help="This account will be used for invoices to value expenses."),
}
product_category()
@ -60,14 +60,14 @@ class product_template(osv.osv):
relation='account.account',
string="Income Account",
view_load=True,
help="This account will be used for invoices instead of the default one to value sales for the current product"),
help="This account will be used for invoices instead of the default one to value sales for the current product."),
'property_account_expense': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
view_load=True,
help="This account will be used for invoices instead of the default one to value expenses for the current product"),
help="This account will be used for invoices instead of the default one to value expenses for the current product."),
}
product_template()

View File

@ -49,9 +49,11 @@
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml">
<data>
<xpath expr="/form/sheet//group[@name='account_property']" position="inside">
<field name="property_account_income_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="property_account_expense_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<xpath expr="//group[@name='parent']" position="inside">
<group name="account_property" string="Account Properties" colspan="2">
<field name="property_account_income_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="property_account_expense_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
</group>
</xpath>
</data>
</field>

View File

@ -94,8 +94,8 @@
<field name="state">open</field>
<field name="partner_id" ref="base.res_partner_19"/>
</record>
<record id="analytic_magasin_bml_1" model="account.analytic.account">
<field name="name">Magasin BML 1</field>
<record id="analytic_millennium_industries" model="account.analytic.account">
<field name="name">Millennium Industries</field>
<field name="parent_id" ref="analytic_integration"/>
<field name="type">normal</field>
<field name="partner_id" ref="base.res_partner_15"/>
@ -121,8 +121,8 @@
<field name="parent_id" ref="analytic_customers"/>
<field name="partner_id" ref="base.res_partner_1"/>
</record>
<record id="analytic_distripc" model="account.analytic.account">
<field name="name">DistriPC</field>
<record id="analytic_deltapc" model="account.analytic.account">
<field name="name">Delta PC</field>
<field name="parent_id" ref="analytic_customers"/>
<field name="type">normal</field>
<field name="partner_id" ref="base.res_partner_4"/>
@ -145,8 +145,8 @@
<field name="partner_id" ref="base.res_partner_17"/>
<field name="state">open</field>
</record>
<record id="analytic_leclerc" model="account.analytic.account">
<field name="name">Leclerc</field>
<record id="analytic_luminous_technologies" model="account.analytic.account">
<field name="name">Luminous Technologies</field>
<field eval="time.strftime('%Y-04-24')" name="date_start"/>
<field eval="str(time.localtime()[0] + 1) + '-04-24'" name="date"/>
<field name="type">normal</field>
@ -161,8 +161,8 @@
<field name="parent_id" ref="analytic_partners"/>
<field name="partner_id" ref="base.res_partner_12"/>
</record>
<record id="analytic_tiny_at_work" model="account.analytic.account">
<field name="name">OpenERP SA AT Work</field>
<record id="analytic_think_big_systems" model="account.analytic.account">
<field name="name">Think Big Systems</field>
<field name="type">normal</field>
<field name="parent_id" ref="analytic_partners"/>
<field name="partner_id" ref="base.res_partner_18"/>

View File

@ -35,7 +35,6 @@
<field name="partner_id"/>
<field name="user_id"/>
<group expand="0" string="Group By...">
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Associated Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Parent Account" icon="terp-folder-green" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
@ -144,8 +143,8 @@
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
<label for="unit_amount"/>
<div>
<field name="unit_amount" class="oe_inline"/>
<field name="product_uom_id" class="oe_inline"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
</div>
</group>
<group string="General Accounting">

View File

@ -42,7 +42,7 @@
<field name="arch" type="xml">
<graph string="Invoices Analysis" type="bar">
<field name="product_id"/>
<field name="user_currency_price_total"/>
<field name="price_total"/>
</graph>
</field>
</record>

View File

@ -277,7 +277,7 @@
<font color="white"> </font>
</para>
<section>
<para style="terp_default_Bold_9">[[ getLines(o) and removeParentNode('section')]]There is nothing due with this customer</para>
<para style="terp_default_Bold_9">[[ getLines(o) and removeParentNode('section')]]There is nothing due with this customer.</para>
</section>
<para style="terp_default_9">
<font color="white"> </font>

View File

@ -262,6 +262,7 @@ class account_config_settings(osv.osv_memory):
'sale_tax_rate': config.sale_tax_rate,
'purchase_tax_rate': config.purchase_tax_rate,
'complete_tax_set': config.complete_tax_set,
'currency_id': config.currency_id.id,
}, context)
wizard.execute(cr, uid, [wizard_id], context)

View File

@ -268,7 +268,7 @@
<field name="target">inline</field>
</record>
<menuitem id="menu_account_config" name="Accounting" parent="base.menu_config"
<menuitem id="menu_account_config" name="Invoicing" parent="base.menu_config"
sequence="14" action="action_account_config"/>
</data>

View File

@ -5,6 +5,7 @@
<!-- Top menu item -->
<menuitem name="Accounting"
id="account.menu_finance"/>
<menuitem id="account.menu_account_config" name="Accounting" parent="base.menu_config"/>
</data>

View File

@ -3,13 +3,21 @@
<menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/>
<record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
<field name="name">Time &amp; Costs to Invoice</field>
<field name="name">Time &amp; Materials to Invoice</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('invoice_id','=',False)]</field>
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
<field name="help" type="html">
<p>
You will find here timesheets and purchases you did for
contracts that can be reinvoiced to the customer. If you want
to record new activities to invoice, you should use the timesheet
menu instead.
</p>
</field>
</record>
<menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="base.menu_invoiced" sequence="5"/>

View File

@ -38,7 +38,7 @@ Allows to automatically select analytic accounts based on criterions:
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'images': ['images/analytic_defaults.jpeg'],
'depends': ['sale'],
'depends': ['sale_stock'],
'data': [
'security/ir.model.access.csv',
'security/account_analytic_default_security.xml',

View File

@ -38,14 +38,14 @@ class product_category(osv.osv):
relation='account.account',
string="Income Account",
view_load=True,
help="This account will be used to value outgoing stock for the current product category using sale price"),
help="This account will be used to value outgoing stock using sale price."),
'property_account_expense_categ': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
view_load=True,
help="This account will be used to value outgoing stock for the current product category using cost price"),
help="This account will be used to value outgoing stock using cost price."),
}
product_category()
@ -68,14 +68,14 @@ class product_template(osv.osv):
relation='account.account',
string="Income Account",
view_load=True,
help="This account will be used to value outgoing stock for the current product category using sale price"),
help="This account will be used to value outgoing stock using sale price."),
'property_account_expense': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
view_load=True,
help="This account will be used to value outgoing stock for the current product category using cost price"),
help="This account will be used to value outgoing stock using cost price."),
}
product_template()

View File

@ -29,10 +29,10 @@
<record id="view_category_property_form" model="ir.ui.view">
<field name="name">product.category.property.form.inherit.stock</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="inherit_id" ref="account.view_category_property_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="/form/sheet//group[@name='account_property']" position="inside">
<xpath expr="//field[@name='property_account_income_categ']" position="before">
<field name="property_account_creditor_price_difference_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
</xpath>
</data>

View File

@ -134,10 +134,11 @@ class account_asset_asset(osv.osv):
def compute_depreciation_board(self, cr, uid, ids, context=None):
depreciation_lin_obj = self.pool.get('account.asset.depreciation.line')
currency_obj = self.pool.get('res.currency')
for asset in self.browse(cr, uid, ids, context=context):
if asset.value_residual == 0.0:
continue
posted_depreciation_line_ids = depreciation_lin_obj.search(cr, uid, [('asset_id', '=', asset.id), ('move_check', '=', True)])
posted_depreciation_line_ids = depreciation_lin_obj.search(cr, uid, [('asset_id', '=', asset.id), ('move_check', '=', True)],order='depreciation_date desc')
old_depreciation_line_ids = depreciation_lin_obj.search(cr, uid, [('asset_id', '=', asset.id), ('move_id', '=', False)])
if old_depreciation_line_ids:
depreciation_lin_obj.unlink(cr, uid, old_depreciation_line_ids, context=context)
@ -148,7 +149,12 @@ class account_asset_asset(osv.osv):
else:
# depreciation_date = 1st January of purchase year
purchase_date = datetime.strptime(asset.purchase_date, '%Y-%m-%d')
depreciation_date = datetime(purchase_date.year, 1, 1)
#if we already have some previous validated entries, starting date isn't 1st January but last entry + method period
if (len(posted_depreciation_line_ids)>0):
last_depreciation_date = datetime.strptime(depreciation_lin_obj.browse(cr,uid,posted_depreciation_line_ids[0],context=context).depreciation_date, '%Y-%m-%d')
depreciation_date = (last_depreciation_date+relativedelta(months=+asset.method_period))
else:
depreciation_date = datetime(purchase_date.year, 1, 1)
day = depreciation_date.day
month = depreciation_date.month
year = depreciation_date.year
@ -158,6 +164,10 @@ class account_asset_asset(osv.osv):
for x in range(len(posted_depreciation_line_ids), undone_dotation_number):
i = x + 1
amount = self._compute_board_amount(cr, uid, asset, i, residual_amount, amount_to_depr, undone_dotation_number, posted_depreciation_line_ids, total_days, depreciation_date, context=context)
company_currency = asset.company_id.currency_id.id
current_currency = asset.currency_id.id
# compute amount into company currency
amount = currency_obj.compute(cr, uid, current_currency, company_currency, amount, context=context)
residual_amount -= amount
vals = {
'amount': amount,
@ -191,7 +201,7 @@ class account_asset_asset(osv.osv):
def _amount_residual(self, cr, uid, ids, name, args, context=None):
cr.execute("""SELECT
l.asset_id as id, round(SUM(abs(l.debit-l.credit))) AS amount
l.asset_id as id, SUM(abs(l.debit-l.credit)) AS amount
FROM
account_move_line l
WHERE
@ -349,8 +359,8 @@ class account_asset_depreciation_line(osv.osv):
'sequence': fields.integer('Sequence', required=True),
'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True),
'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
'amount': fields.float('Depreciation Amount', required=True),
'remaining_value': fields.float('Amount to Depreciate', required=True),
'amount': fields.float('Depreciation Amount', digits_compute=dp.get_precision('Account'), required=True),
'remaining_value': fields.float('Amount to Depreciate', digits_compute=dp.get_precision('Account'),required=True),
'depreciated_value': fields.float('Amount Already Depreciated', required=True),
'depreciation_date': fields.date('Depreciation Date', select=1),
'move_id': fields.many2one('account.move', 'Depreciation Entry'),

View File

@ -105,8 +105,7 @@ account_bank_statement_line_global()
class account_bank_statement_line(osv.osv):
_inherit = 'account.bank.statement.line'
_columns = {
'date': fields.date('Entry Date', required=True, states={'confirm': [('readonly', True)]}),
'val_date': fields.date('Valuta Date', states={'confirm': [('readonly', True)]}),
'val_date': fields.date('Value Date', states={'confirm': [('readonly', True)]}),
'globalisation_id': fields.many2one('account.bank.statement.line.global', 'Globalisation ID',
states={'confirm': [('readonly', True)]},
help="Code to identify transactions belonging to the same globalisation level within a batch payment"),

View File

@ -148,7 +148,7 @@
<field name="name">Bank Statement Lines</field>
<field name="res_model">account.bank.statement.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph,form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'block_statement_line_delete' : 1}</field>
<field name="search_view_id" ref="view_bank_statement_line_filter"/>
<field name="view_id" ref="view_bank_statement_line_list"/>

View File

@ -284,13 +284,13 @@
<record model="ir.ui.view" id="view_account_analytic_account_form_inherit_budget">
<field name="name">account.analytic.account.form.inherot.budget</field>
<field name="name">account.analytic.account.form.inherit.budget</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Budget Lines" groups="account.group_account_user">
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree,graph">
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree">
<tree string="Budget Lines" editable="top">
<field name="crossovered_budget_id"/>
<field name="general_budget_id"/>
@ -310,11 +310,6 @@
<field name="paid_date"/>
<field name="planned_amount"/>
</form>
<graph type="bar" string="Lines">
<field name="general_budget_id" />
<field name="planned_amount" operator="+"/>
<field group="True" name="analytic_account_id"/>
</graph>
</field>
</page>
</notebook>

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: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-02-10 15:03+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"PO-Revision-Date: 2012-10-30 15:45+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\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: 2012-10-30 05:13+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account_payment
#: field:payment.order,date_scheduled:0
@ -653,7 +653,7 @@ msgstr "公司币别"
#: view:payment.line:0
#: view:payment.order:0
msgid "Payment"
msgstr "付"
msgstr "付"
#. module: account_payment
#: report:payment.order:0

View File

@ -61,6 +61,7 @@ This module manages:
'account_voucher_data.xml',
],
'test' : [
'test/case5_suppl_usd_usd.yml',
'test/account_voucher.yml',
'test/sales_receipt.yml',
'test/sales_payment.yml',

View File

@ -0,0 +1,185 @@
-
In order to check the Account_voucher module with multi-currency in OpenERP,
I create a supplier invoices in USD and make the payment in USD but with another exchange rate and with a write-off
-
I create a cash account with currency USD
-
!record {model: account.account, id: account_cash_usd_id}:
currency_id: base.USD
name: "cash account in usd"
code: "Xcash usd"
type: 'liquidity'
user_type: "account.data_account_type_cash"
-
I create currency USD in OpenERP for November of 1.8 Rate
-
!record {model: res.currency.rate, id: nov_usd}:
currency_id: base.USD
name: !eval "'%s-11-01' %(datetime.now().year)"
rate: 1.8
-
I create currency USD in OpenERP for December of 1.5 Rate
-
!record {model: res.currency.rate, id: dec_usd}:
currency_id: base.USD
name: !eval "'%s-12-01' %(datetime.now().year)"
rate: 1.5
-
I set the income and expense currency accounts on the main company
-
!python {model: res.company}: |
from datetime import datetime
vals = {
'income_currency_exchange_account_id': ref('account.o_expense'),
'expense_currency_exchange_account_id': ref('account.o_expense')}
self.write(cr, uid, ref('base.main_company'), vals)
-
I create a bank journal with EUR as currency
-
!record {model: account.journal, id: bank_journal_EUR}:
name: Bank Journal(EUR)
code: BEUR
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I create a bank journal with USD as currency
-
!record {model: account.journal, id: bank_journal_USD}:
name: Bank Journal(USD)
code: BUSD
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account_cash_usd_id
default_credit_account_id: account_cash_usd_id
currency: base.USD
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I set the context as would do the action in supplier invoice menuitem
-
!context
'default_type': 'in_invoice'
-
I create the invoice on 1st november for 1000 USD
-
!record {model: account.invoice, id: account_supplier_invoice_november, view: account.invoice_supplier_form}:
account_id: account.a_pay
company_id: base.main_company
currency_id: base.USD
date_invoice: !eval "'%s-11-01' %(datetime.now().year)"
period_id: account.period_1
invoice_line:
- account_id: account.a_expense
name: '[PCSC234] PC Assemble SC234'
price_unit: 1000.0
quantity: 1.0
product_id: product.product_product_3
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: base.res_partner_19
reference_type: none
check_total : 1000
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_supplier_invoice_november}
-
I check that first invoice move is correct for creditor account(debit - credit == -555.56)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_supplier_invoice_november"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == -555.56), "Invoice move is incorrect for creditor account"
assert (move_line.amount_currency == -1000), "Amount currency is incorrect for creditor account"
-
I set the context that will be used for the encoding of all the vouchers of this file
-
!context
'type': 'payment'
-
I create the voucher of payment with values $950, journal USD
-
!record {model: account.voucher, id: account_voucher_case_5_supplier_flow, view: view_vendor_payment_form}:
account_id: account.cash
amount: 950.0
company_id: base.main_company
journal_id: bank_journal_USD
name: 'Payment: Case Basic SUPPLIER USD/USD'
partner_id: base.res_partner_19
period_id: account.period_12
date: !eval time.strftime("%Y-12-01")
payment_option: 'with_writeoff'
writeoff_acc_id: account.a_expense
comment: 'Write Off'
type: 'payment'
-
I fill $1000 for the previously encoded invoice
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
voucher_id = self.browse(cr, uid, ref('account_voucher_case_5_supplier_flow'))
for item in voucher_id.line_dr_ids:
if item.amount_unreconciled == 1000.00:
self.pool.get('account.voucher.line').write(cr, uid, [item.id], {'amount': 1000})
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is -50.0
-
!assert {model: account.voucher, id: account_voucher_case_5_supplier_flow}:
- writeoff_amount == -50.0
-
I confirm the voucher
-
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_case_5_supplier_flow}
-
I check that the move of my voucher is valid and that it is posted
-
!python {model: account.voucher}: |
voucher_id = self.browse(cr, uid, ref('account_voucher_case_5_supplier_flow'))
assert voucher_id.state == 'posted', "Voucher state is not posted"
for move_line in voucher_id.move_id.line_id:
assert move_line.state == 'valid', "Voucher move is not valid"
-
I check that my creditor account is correct
-
I check that the bank entry is -$950 and 633.33€ as amount_currency and credit, respectively.
-
I check that the creditor account has 1 new line with $1000 and 666.67€ as amount_currency and debit, respectively.
-
I check that my currency rate difference is correct (111.11€ in debit/credit with no amount_currency)
-
I check that my writeoff is correct. 33.34€ in credit with -$50 as amount currency
-
!python {model: account.voucher}: |
voucher_id = self.browse(cr, uid, ref('account_voucher_case_5_supplier_flow'))
for move_line in voucher_id.move_id.line_id:
if move_line.amount_currency == -950.00:
assert move_line.credit == 633.33, "Wrong bank entry."
elif move_line.credit == 111.11 or move_line.debit == 111.11:
assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
elif move_line.credit == 33.34:
assert move_line.amount_currency == -50.0, "Writeoff amount is wrong."
elif move_line.debit == 666.67:
assert move_line.amount_currency == 1000.0, "Wrong supplier entry."
else:
assert False, "Wrong entry. Unrecognized account move line"
-
I check the residual amount of invoice, it should be 0 in residual currency and 0 in amount_residual and paid
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_supplier_invoice_november"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for supplier invoice"

View File

@ -290,7 +290,7 @@
<group>
<group>
<field name="state" invisible="1"/>
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'search_default_supplier': 1}"/>
<field name="currency_id" invisible="1"/>
<field name="amount" class="oe_inline"
string="Paid Amount"

View File

@ -180,7 +180,7 @@ class account_analytic_account(osv.osv):
'partner_id': fields.many2one('res.partner', 'Customer'),
'user_id': fields.many2one('res.users', 'Project Manager'),
'manager_id': fields.many2one('res.users', 'Account Manager'),
'date_start': fields.date('Date Start'),
'date_start': fields.date('Start Date'),
'date': fields.date('Date End', select=True),
'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts.
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','To Renew'),('close','Closed')], 'Status', required=True,),
@ -305,7 +305,10 @@ class account_analytic_account(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name),
message = _("Contract <b>created</b>.")
if obj.partner_id:
message = _("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name,)
self.message_post(cr, uid, [obj.id], body=message,
subtype="analytic.mt_account_status", context=context)
account_analytic_account()

View File

@ -23,11 +23,11 @@
<group>
<field name="partner_id" on_change="on_change_partner_id(partner_id, name)"/>
<field name="manager_id"/>
<field name="code"/>
<field name="currency_id" attrs="{'invisible': ['|',('type', '&lt;&gt;', 'view'), ('company_id', '&lt;&gt;', False)]}"/>
</group>
<group>
<field name="type"/>
<field name="code"/>
<field name="type" invisible="context.get('default_type', False)"/>
<field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract','template'])]}"/>
<field name="template_id" on_change="on_change_template(template_id,context)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
<field name="company_id" on_change="on_change_company(company_id)" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/>

View File

@ -20,11 +20,10 @@
##############################################################################
import logging
import werkzeug
import openerp
from openerp.modules.registry import RegistryManager
from openerp.addons.web.controllers.main import login_and_redirect
from ..res_users import SignupError
_logger = logging.getLogger(__name__)
@ -41,22 +40,18 @@ class Controller(openerp.addons.web.http.Controller):
user_info = res_partner.signup_retrieve_info(cr, openerp.SUPERUSER_ID, token)
return user_info
@openerp.addons.web.http.httprequest
def signup(self, req, dbname, token, name, login, password, state=''):
""" sign up a user (new or existing), and log it in """
url = '/'
@openerp.addons.web.http.jsonrequest
def signup(self, req, dbname, token, name, login, password):
""" sign up a user (new or existing)"""
registry = RegistryManager.get(dbname)
with registry.cursor() as cr:
res_users = registry.get('res.users')
values = {'name': name, 'login': login, 'password': password}
try:
res_users = registry.get('res.users')
values = {'name': name, 'login': login, 'password': password}
credentials = res_users.signup(cr, openerp.SUPERUSER_ID, values, token)
cr.commit()
return login_and_redirect(req, *credentials, redirect_url='/#%s'%state)
except Exception as e:
# signup error
_logger.exception('error when signup')
url = "/#action=login&error_message=%s" % werkzeug.urls.url_quote(e.message)
return werkzeug.utils.redirect(url)
res_users.signup(cr, openerp.SUPERUSER_ID, values, token)
except SignupError, e:
return {'error': openerp.tools.exception_to_unicode(e)}
cr.commit()
return {}
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -29,6 +29,9 @@ from openerp import SUPERUSER_ID
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools.safe_eval import safe_eval
class SignupError(Exception):
pass
def random_token():
# the token has an entropy of about 120 bits (6 bits/char * 20 chars)
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
@ -101,12 +104,12 @@ class res_partner(osv.Model):
partner_ids = self.search(cr, uid, [('signup_token', '=', token)], context=context)
if not partner_ids:
if raise_exception:
raise Exception("Signup token '%s' is not valid" % token)
raise SignupError("Signup token '%s' is not valid" % token)
return False
partner = self.browse(cr, uid, partner_ids[0], context)
if check_validity and not partner.signup_valid:
if raise_exception:
raise Exception("Signup token '%s' is no longer valid" % token)
raise SignupError("Signup token '%s' is no longer valid" % token)
return False
return partner
@ -194,7 +197,7 @@ class res_users(osv.Model):
# check that uninvited users may sign up
if 'partner_id' not in values:
if not safe_eval(ir_config_parameter.get_param(cr, uid, 'auth_signup.allow_uninvited', 'False')):
raise Exception('Signup is not allowed for uninvited users')
raise SignupError('Signup is not allowed for uninvited users')
# create a copy of the template user (attached to a specific partner_id if given)
values['active'] = True

View File

@ -8,12 +8,20 @@ openerp.auth_signup = function(instance) {
var d = this._super();
// to switch between the signup and regular login form
this.$('a.oe_signup_signup').click(function() {
this.$('a.oe_signup_signup').click(function(ev) {
if (ev) {
ev.preventDefault();
}
self.$el.addClass("oe_login_signup");
return false;
});
this.$('a.oe_signup_back').click(function() {
this.$('a.oe_signup_back').click(function(ev) {
if (ev) {
ev.preventDefault();
}
self.$el.removeClass("oe_login_signup");
delete self.params.token;
return false;
});
// if there is an error message in params, show it then forget it
@ -90,10 +98,19 @@ openerp.auth_signup = function(instance) {
name: name,
login: login,
password: password,
state: $.param(this.params)
//state: $.param(this.params)
};
var url = "/auth_signup/signup?" + $.param(params);
window.location = url;
var self = this,
super_ = this._super;
this.rpc('/auth_signup/signup', params)
.done(function(result) {
if (result.error) {
self.show_error(result.error);
} else {
super_.apply(self, [ev]);
}
});
} else {
// regular login
this._super(ev);

View File

@ -336,7 +336,7 @@ class calendar_attendee(osv.osv):
('non-participant', 'For information Purpose')], 'Role', \
help='Participation role for the calendar user'),
'state': fields.selection([('needs-action', 'Needs Action'),
('tentative', 'Tentative'),
('tentative', 'Uncertain'),
('declined', 'Declined'),
('accepted', 'Accepted'),
('delegated', 'Delegated')], 'Status', readonly=True, \
@ -559,7 +559,8 @@ property or property parameter."),
for vals in self.browse(cr, uid, ids, context=context):
if vals.ref and vals.ref.user_id:
mod_obj = self.pool.get(vals.ref._name)
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id}
res=mod_obj.read(cr,uid,[vals.ref.id],['duration','class'],context)
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id,'duration':res[0]['duration'],'class':res[0]['class']}
mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
@ -1012,7 +1013,7 @@ class calendar_event(osv.osv):
'Show Time as', states={'done': [('readonly', True)]}),
'base_calendar_url': fields.char('Caldav URL', size=264),
'state': fields.selection([
('tentative', 'Tentative'),
('tentative', 'Uncertain'),
('cancelled', 'Cancelled'),
('confirmed', 'Confirmed'),
], 'Status', readonly=True),

View File

@ -89,7 +89,8 @@
<page string="Meeting Details">
<group>
<group>
<field name="date" string="Starting at"/>
<field name="date" string="Starting at"
on_change="onchange_dates(date, duration, False, allday)"/>
<label for="duration"/>
<div>
<field name="duration" widget="float_time"
@ -100,7 +101,7 @@
<label for="allday" string="All Day?"/>)
</div>
<field name="date_deadline" groups="base.group_no_one"
attrs="{'invisible': [('allday','=',True)]}"
attrs="{'invisible': ['|', ('allday','=',True), ('duration','&lt;', 24)]}"
on_change="onchange_dates(date,False,date_deadline)"/>
</group>
<group>

View File

@ -1146,7 +1146,7 @@ msgstr ""
#: selection:calendar.attendee,state:0
#: selection:calendar.event,state:0
#: selection:calendar.todo,state:0
msgid "Tentative"
msgid "Uncertain"
msgstr ""
#. module: base_calendar

View File

@ -25,7 +25,8 @@
'description': """
Automated Translations through Gengo API
----------------------------------------
This module will install passive scheduler job for automated translations
This module will install passive scheduler job for automated translations
using the Gengo API. To activate it, you must
1) Configure your Gengo authentication parameters under `Settings > Companies > Gengo Parameters`
2) Launch the wizard under `Settings > Application Terms > Gengo: Manual Request of Translation` and follow the wizard.

View File

@ -26,7 +26,7 @@ Re-implement openerp's file import system:
'author': 'OpenERP SA',
'depends': ['base'],
'installable': True,
'auto_install': True,
'auto_install': False,
'css': [
'static/lib/select2/select2.css',
'static/src/css/import.css',

View File

@ -0,0 +1,6 @@
External ID,Name,Parent Category/External ID
a1,Expenses,product.product_category_all
a2,Other Products,product.product_category_all
a3,Sellable Products,product.product_category_all
a4,Tables,a1
a5,Seating furniture,a2
1 External ID Name Parent Category/External ID
2 a1 Expenses product.product_category_all
3 a2 Other Products product.product_category_all
4 a3 Sellable Products product.product_category_all
5 a4 Tables a1
6 a5 Seating furniture a2

View File

@ -0,0 +1,6 @@
External ID,Name,Internal Reference,Category/External ID,Can be Expensed,Can be Purchased,Can be Sold,Sale Price,Cost,Supply Method,Product Type,Procurement Method
a6,Aluminum Stool,ALS,a5,False,True,True,49.00,25.00,Buy,Stockable Product,Make to Stock
a7,Chair,CHR,a5,False,True,True,89.00,40.00,Buy,Stockable Product,Make to Stock
a8,Table,TBL,a4,False,True,True,169.00,100.00,Buy,Stockable Product,Make to Stock
a9,Software Book Tutorial,SBT,a2,False,True,False,19.00,8.00,Buy,Consumable,Make to Stock
a10,Fuel,FL,a1,True,False,False,0.30,0.25,Buy,Service,Make to Stock
1 External ID Name Internal Reference Category/External ID Can be Expensed Can be Purchased Can be Sold Sale Price Cost Supply Method Product Type Procurement Method
2 a6 Aluminum Stool ALS a5 False True True 49.00 25.00 Buy Stockable Product Make to Stock
3 a7 Chair CHR a5 False True True 89.00 40.00 Buy Stockable Product Make to Stock
4 a8 Table TBL a4 False True True 169.00 100.00 Buy Stockable Product Make to Stock
5 a9 Software Book Tutorial SBT a2 False True False 19.00 8.00 Buy Consumable Make to Stock
6 a10 Fuel FL a1 True False False 0.30 0.25 Buy Service Make to Stock

View File

@ -0,0 +1,6 @@
Name,Internal Reference,Can be Expensed,Can be Purchased,Can be Sold,Sale Price,Cost,Supply Method,Product Type,Procurement Method
Aluminum Stool,ALS,False,True,True,49.00,25.00,Buy,Stockable Product,Make to Stock
Chair,CHR,False,True,True,89.00,40.00,Buy,Stockable Product,Make to Stock
Table,TBL,False,True,True,169.00,100.00,Buy,Stockable Product,Make to Stock
Software Book Tutorial,SBT,False,True,False,19.00,8.00,Buy,Consumable,Make to Stock
Fuel,FL,True,False,False,0.30,0.25,Buy,Service,Make to Stock
1 Name Internal Reference Can be Expensed Can be Purchased Can be Sold Sale Price Cost Supply Method Product Type Procurement Method
2 Aluminum Stool ALS False True True 49.00 25.00 Buy Stockable Product Make to Stock
3 Chair CHR False True True 89.00 40.00 Buy Stockable Product Make to Stock
4 Table TBL False True True 169.00 100.00 Buy Stockable Product Make to Stock
5 Software Book Tutorial SBT False True False 19.00 8.00 Buy Consumable Make to Stock
6 Fuel FL True False False 0.30 0.25 Buy Service Make to Stock

View File

@ -0,0 +1,155 @@
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: companies; Type: TABLE; Schema: public; Owner: fp; Tablespace:
--
CREATE TABLE companies (
id integer NOT NULL,
company_name character varying
);
ALTER TABLE public.companies OWNER TO fp;
--
-- Name: companies_id_seq; Type: SEQUENCE; Schema: public; Owner: fp
--
CREATE SEQUENCE companies_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public.companies_id_seq OWNER TO fp;
--
-- Name: companies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: fp
--
ALTER SEQUENCE companies_id_seq OWNED BY companies.id;
--
-- Name: companies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: fp
--
SELECT pg_catalog.setval('companies_id_seq', 3, true);
--
-- Name: persons; Type: TABLE; Schema: public; Owner: fp; Tablespace:
--
CREATE TABLE persons (
id integer NOT NULL,
company_id integer,
person_name character varying
);
ALTER TABLE public.persons OWNER TO fp;
--
-- Name: persons_id_seq; Type: SEQUENCE; Schema: public; Owner: fp
--
CREATE SEQUENCE persons_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public.persons_id_seq OWNER TO fp;
--
-- Name: persons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: fp
--
ALTER SEQUENCE persons_id_seq OWNED BY persons.id;
--
-- Name: persons_id_seq; Type: SEQUENCE SET; Schema: public; Owner: fp
--
SELECT pg_catalog.setval('persons_id_seq', 4, true);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: fp
--
ALTER TABLE ONLY companies ALTER COLUMN id SET DEFAULT nextval('companies_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: fp
--
ALTER TABLE ONLY persons ALTER COLUMN id SET DEFAULT nextval('persons_id_seq'::regclass);
--
-- Data for Name: companies; Type: TABLE DATA; Schema: public; Owner: fp
--
COPY companies (id, company_name) FROM stdin;
1 Bigees
2 Organi
3 Boum
\.
--
-- Data for Name: persons; Type: TABLE DATA; Schema: public; Owner: fp
--
COPY persons (id, company_id, person_name) FROM stdin;
1 1 Fabien
2 1 Laurence
3 2 Eric
4 3 Ramsy
\.
--
-- Name: companies_pkey; Type: CONSTRAINT; Schema: public; Owner: fp; Tablespace:
--
ALTER TABLE ONLY companies
ADD CONSTRAINT companies_pkey PRIMARY KEY (id);
--
-- Name: persons_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: fp
--
ALTER TABLE ONLY persons
ADD CONSTRAINT persons_company_id_fkey FOREIGN KEY (company_id) REFERENCES companies(id);
--
-- PostgreSQL database dump complete
--

View File

@ -0,0 +1,6 @@
Name,Reference,Tags,Customer,Street,City,Country
Credit & Leasing,3,Services,True,Central Avenue 814,Johannesburg,South Africa
Services & Finance,5,"Consultancy Services,IT Services",True,Grove Road 5,London,United Kingdom
Hydra Supplies,6,"Manufacturer,Retailer",True,Palm Street 9,Los Angeles,United States
Bolts & Screws,8,"Wholesaler,Components Buyer",True,Rua Américo 1000,Campinas,Brazil
National Parts & Supplies,18,"Manufacturer,Wholesaler",True,Guangdong Way 20,Shenzen,China
1 Name Reference Tags Customer Street City Country
2 Credit & Leasing 3 Services True Central Avenue 814 Johannesburg South Africa
3 Services & Finance 5 Consultancy Services,IT Services True Grove Road 5 London United Kingdom
4 Hydra Supplies 6 Manufacturer,Retailer True Palm Street 9 Los Angeles United States
5 Bolts & Screws 8 Wholesaler,Components Buyer True Rua Américo 1000 Campinas Brazil
6 National Parts & Supplies 18 Manufacturer,Wholesaler True Guangdong Way 20 Shenzen China

View File

@ -0,0 +1,10 @@
Order Date,Order Reference,Supplier,Destination,Pricelist,Order Lines / Product,Order Lines / Quantity
2012-12-15,PO00008,ASUSTeK,Stock,Default Purchase Pricelist,ADPT,20
,,,,,CARD,30
,,,,,C-Case,40
2012-12-15,PO00009,Axelor,Stock,Default Purchase Pricelist,CD,5
,,,,,CPUa8,15
2012-12-15,PO000010,China Export,Stock,Default Purchase Pricelist,HDD SH-1,10
,,,,,HDD SH-2,20
,,,,,LAP-CUS,35
,,,,,LAP-E5,40
1 Order Date Order Reference Supplier Destination Pricelist Order Lines / Product Order Lines / Quantity
2 2012-12-15 PO00008 ASUSTeK Stock Default Purchase Pricelist ADPT 20
3 CARD 30
4 C-Case 40
5 2012-12-15 PO00009 Axelor Stock Default Purchase Pricelist CD 5
6 CPUa8 15
7 2012-12-15 PO000010 China Export Stock Default Purchase Pricelist HDD SH-1 10
8 HDD SH-2 20
9 LAP-CUS 35
10 LAP-E5 40

View File

@ -0,0 +1,8 @@
Name,Address type,Street,City,Country,Tags,Supplier,Customer,Is a company,Companies that refers to partner / Parent company
Wood y Wood Pecker,,"Snow Street, 25",Kainuu,Finland,Supplier,1,0,1,
Roger Pecker,Default,"Snow Street, 27",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Sharon Pecker,Delivery,"Snow Street, 28",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Thomas Pecker,Contact,"Snow Street, 27",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Vicking Direct,,"Atonium Street, 45a",Brussels,Belgium,Supplier,1,0,1,
Yvan Holiday,Invoice,"Atonium Street, 45b",Brussels,Belgium,Supplier,1,0,0,Vicking Direct
Jack Unsworth,Contact,"Atonium Street, 45a",Brussels,Belgium,Supplier,1,0,0,Vicking Direct
1 Name Address type Street City Country Tags Supplier Customer Is a company Companies that refers to partner / Parent company
2 Wood y Wood Pecker Snow Street, 25 Kainuu Finland Supplier 1 0 1
3 Roger Pecker Default Snow Street, 27 Kainuu Finland Supplier 1 0 0 Wood y Wood Pecker
4 Sharon Pecker Delivery Snow Street, 28 Kainuu Finland Supplier 1 0 0 Wood y Wood Pecker
5 Thomas Pecker Contact Snow Street, 27 Kainuu Finland Supplier 1 0 0 Wood y Wood Pecker
6 Vicking Direct Atonium Street, 45a Brussels Belgium Supplier 1 0 1
7 Yvan Holiday Invoice Atonium Street, 45b Brussels Belgium Supplier 1 0 0 Vicking Direct
8 Jack Unsworth Contact Atonium Street, 45a Brussels Belgium Supplier 1 0 0 Vicking Direct

View File

@ -0,0 +1,6 @@
"Order Reference","Supplier","Destination","Pricelist","Order Lines / Product","Order Lines / Quantity"
"PO000020","ASUSTeK","Stock","Default Purchase Pricelist","ADPT",20
,,,,"CARD",30
,,,,"C-Case",40
"PO000021","Axelor","Stock","Default Purchase Pricelist","CD",5
,,,,"CPUa8",15
1 Order Reference Supplier Destination Pricelist Order Lines / Product Order Lines / Quantity
2 PO000020 ASUSTeK Stock Default Purchase Pricelist ADPT 20
3 CARD 30
4 C-Case 40
5 PO000021 Axelor Stock Default Purchase Pricelist CD 5
6 CPUa8 15

View File

@ -1,14 +1,17 @@
.oe_import{
display: inline-block;
width: 600px;
padding: 16px;
}
.oe_import > p {
margin-left: 8px;
margin-right: 8px;
text-align: justify
}
.oe_import h2 {
margin-top: 0;
margin-bottom: 5px;
}
.oe_padding {
padding: 13px;
}
/* ----------- IMPORT BOX ----------- */
.oe_import .oe_import_box{
@ -17,6 +20,7 @@
background: #F0EEEE;
border-radius: 3px;
border: solid 1px #dddddd;
width: 600px;
}
.oe_import .oe_import_toggle{
margin-top: 8px;

View File

@ -2,20 +2,25 @@
<t t-name="ImportView">
<t t-set="_id" t-value="_.uniqueId('export')"/>
<form action="" method="post" enctype="multipart/form-data" class="oe_import">
<header>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_validate oe_highlight"
>Validate</button>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_import"
>Import</button>
<span class="oe_fade">or</span>
<a class="oe_import_cancel" href="#">Cancel</a>
</header>
<input type="hidden" name="session_id"
t-att-value="widget.session.session_id"/>
<input type="hidden" name="import_id"/>
<h2>Upload your file</h2>
<div class="oe_view_manager oe_view_manager_current">
<div class="oe_view_manager_header oe_padding">
<h2>
Import a CSV File
</h2>
<input type="hidden" name="session_id"
t-att-value="widget.session.session_id"/>
<input type="hidden" name="import_id"/>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_validate oe_highlight"
>Validate</button>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_import"
>Import</button>
<span class="oe_fade">or</span>
<a class="oe_import_cancel" href="#">Cancel</a>
</div>
</div>
<p>Select the <a
href="http://en.wikipedia.org/wiki/Comma-separated_values"
class="oe_import_csv" target="_blank">.CSV</a>
@ -25,7 +30,7 @@
<label t-attf-for="file_#{_id}" autofocus="autofocus">CSV File:</label>
<input type="file" id-attf-id="file_#{_id}"
name="file" class="oe_import_file"/>
<button type="button" class="oe_import_file_reload">
<button type="button" class="oe_import_file_reload" title="Reload data to check changes.">
<img src="/web/static/src/img/icons/gtk-refresh.png"/>
</button>
<div class="oe_import_with_file">
@ -44,7 +49,7 @@
</div>
</div>
<div class="oe_import_with_file">
<div class="oe_import_with_file oe_padding">
<h2>Map your data to OpenERP</h2>
<input type="checkbox" class="oe_import_has_header"
id="oe_import_has_header" checked="checked"/>
@ -59,6 +64,7 @@
<table class="oe_import_grid" />
<h2>Frequently Asked Questions</h2>
<dl>
<dt><a href="#" class="oe_import_toggle">
Need to import data from an other application?</a></dt>
@ -78,9 +84,259 @@
whenever possible</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What can I do when the Import preview table isn't
displayed correctly?</a></dt>
<dd>
<p>By default the Import preview is set on commas as
field separators and quotation marks as text
delimiters. If your csv file does not have these
settings, you can modify the File Format Options
(displayed under the Browse CSV file bar after you
select your file).</p> <p>Note that if your CSV file
has a tabulation as separator, OpenERP will not
detect the separations. You will need to change the
file format options in your spreadsheet application.
See the following question.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How can I change the CSV file format options when
saving in my spreadsheet application?</a></dt>
<dd>
<p>If you edit and save CSV files in speadsheet
applications, your computer's regional settings will
be applied for the separator and delimiter.
We suggest you use OpenOffice or LibreOffice Calc
as they will allow you to modify all three options
(in 'Save As' dialog box > Check the box 'Edit filter
settings' > Save).</p> <p>Microsoft Excel will allow
you to modify only the encoding when saving
(in 'Save As' dialog box > click 'Tools' dropdown
list > Encoding tab).</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What's the difference between Database ID and
External ID?</a></dt>
<dd>
<p>Some fields define a relationship with another
object. For example, the country of a contact is a
link to a record of the 'Country' object. When you
want to import such fields, OpenERP will have to
recreate links between the different records.
To help you import such fields, OpenERP provides 3
mechanisms. You must use one and only one mechanism
per field you want to import.</p> <p>For example, to
reference the country of a contact, OpenERP proposes
you 3 different fields to import: <ul>
<li>Country: the name or code of the country</li>
<li>Country/Database ID: the unique OpenERP ID for a
record, defined by the ID postgresql column</li>
<li>Country/External ID: the ID of this record
referenced in another application (or the .XML file
that imported it)</li> </ul></p> <p>For the country
Belgium, you can use one of these 3 ways to import:
<ul> <li>Country: Belgium</li> <li>Country/Database
ID: 21</li> <li>Country/External ID: base.be</li>
</ul></p> <p>According to your need, you should use
one of these 3 ways to reference records in relations.
Here is when you should use one or the other,
according to your need: <ul> <li>Use Country: This is
the easiest way when your data come from CSV files
that have been created manually.</li> <li>Use
Country/Database ID: You should rarely use this
notation. It's mostly used by developers as it's main
advantage is to never have conflicts (you may have
several records with the same name, but they always
have a unique Database ID)</li> <li>Use
Country/External ID: Use External ID when you import
data from a third party application.</li> </ul></p>
<p>When you use External IDs, you can import CSV files
with the "External ID" column to define the External
ID of each record you import. Then, you will be able
to make a reference to that record with columns like
"Field/External ID". The following two CSV files give
you an example for Products and their Categories.</p>
<a href="/base_import/static/csv/External_id_3rd_party_application_product_categories.csv">CSV file for categories</a><br/>
<a href="/base_import/static/csv/External_id_3rd_party_application_products.csv">CSV file for Products</a>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What can I do if I have multiple matches for a field?
</a></dt>
<dd>
<p>If for example you have two product categories
with the child name "Sellable" (ie. "Misc.
Products/Sellable" &amp; "Other Products/Sellable"),
your validation is halted but you may still import
your data. However, we recommend you do not import the
data because they will all be linked to the first
'Sellable' category found in the Product Category list
("Misc. Products/Sellable"). We recommend you modify
one of the duplicates' values or your product category
hierarchy.<br/>
However if you do not wish to change your
configuration of product categories, we recommend you
use make use of the external ID for this field
'Category'.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How can I import a many2many relationship field
(e.g. a customer that has multiple tags)?</a></dt>
<dd>
<p>The tags should be separated by a comma without any
spacing. For example, if you want you customer to be
lined to both tags 'Manufacturer' and 'Retailer'
then you will encode it as follow "Manufacturer,
Retailer" in the same column of your CSV file.</p>
<a href="/base_import/static/csv/m2m_customers_tags.csv">
CSV file for Manufacturer, Retailer</a><br/>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How can I import a one2many relationship (e.g. several
Order Lines of a Sale Order)?</a></dt>
<dd>
<p>If you want to import sales order having several
order lines; for each order line, you need to reserve
a specific row in the CSV file. The first order line
will be imported on the same row as the information
relative to order. Any additional lines will need an
addtional row that does not have any information in
the fields relative to the order.</p>
<p>As an example, here is
purchase.order_functional_error_line_cant_adpat.CSV
file of some quotations you can import, based on demo
data.</p>
<a href="/base_import/static/csv/purchase.order_functional_error_line_cant_adpat.csv">File for some Quotations</a>
<p>The following CSV file shows how to import purchase
orders with their respective purchase order lines:</p>
<a href="/base_import/static/csv/o2m_purchase_order_lines.csv">Purchase orders with their respective purchase order lines</a>
<p>The following CSV file shows how to import
suppliers and their respective contacts</p>
<a href="/base_import/static/csv/o2m_suppliers_contacts.csv">Suppliers and their respective contacts</a>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
Can I import several times the same record?</a></dt>
<dd>
<p>If you import a file that contains one of the
column "External ID" or "Database ID", records that
have already been imported will be modified instead of
being created. This is very usefull as it allows you
to import several times the same CSV file while having
made some changes in between two imports. OpenERP will
take care of creating or modifying each record
depending if it's new or not.</p> <p> This feature
allows you to use the Import/Export tool of OpenERP to
modify a batch of records in your favorite spreadsheet
application.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What happens if I do not provide a value for a
specific field?</a></dt>
<dd>
<p>If you do not set all fields in your CSV file,
OpenERP will assign the default value for every non
defined fields. But if you
set fields with empty values in your CSV file, OpenERP
will set the EMPTY value in the field, instead of
assigning the default value.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How to export/import different tables from an SQL
application to OpenERP?</a></dt>
<dd>
<p>If you need to import data from different tables,
you will have to recreate relations between records
belonging to different tables. (e.g. if you import
companies and persons, you will have to recreate the
link between each person and the company they work
for).</p> <p>To manage relations between tables,
you can use the "External ID" facilities of OpenERP.
The "External ID" of a record is the unique identifier
of this record in another application. This "External
ID" must be unique accoss all the records of all
objects, so it's a good practice to prefix this
"External ID" with the name of the application or
table. (like 'company_1', 'person_1' instead of '1')
</p> <p>As an example, suppose you have a SQL database
with two tables you want to import: companies and
persons. Each person belong to one company, so you
will have to recreate the link between a person and
the company he work for. (If you want to test this
example, here is a <a href="/base_import/static/csv/database_import_test.sql">
dump of such a PostgreSQL database</a>).</p>
<p>We will first export all companies and their
"External ID". In PSQL, write the following command:
</p> <p>&#160;&#160;&#160;&#160;copy
(select 'company_'||id as "External ID",company_name
as "Name",'True' as "Is a Company" from companies) TO
'/tmp/company.csv' with CSV HEADER;</p>
<p>This SQL command will create the following CSV file:
<br/>&#160;&#160;&#160;&#160;External ID,Name,Is a Company
<br/>&#160;&#160;&#160;&#160;company_1,Bigees,True
<br/>&#160;&#160;&#160;&#160;company_2,Organi,True
<br/>&#160;&#160;&#160;&#160;company_3,Boum,True</p>
<p>To create the CSV file for persons, linked to
companies, we will use the following SQL command in
PSQL:</p> <p>&#160;&#160;&#160;&#160;copy (select
'person_'||id as "External ID",person_name as
"Name",'False' as "Is a Company",'company_'||company_id
as "Related Company/External ID" from persons) TO
'/tmp/person.csv' with CSV</p>
<p>It will produce the following CSV file:
<br/>&#160;&#160;&#160;&#160;External ID,Name,Is a
Company,Related Company/External ID
<br/>&#160;&#160;&#160;&#160;person_1,Fabien,False,company_1
<br/>&#160;&#160;&#160;&#160;person_2,Laurence,False,company_1
<br/>&#160;&#160;&#160;&#160;person_3,Eric,False,company_2
<br/>&#160;&#160;&#160;&#160;person_4,Ramsy,False,company_3</p>
<p>As you can see in this file, Fabien and Laurence
are working for the Bigees company (company_1) and
Eric is working for the Organi company. The relation
between persons and companies is done using the
External ID of the companies. We had to prefix the
"External ID" by the name of the table to avoid a
conflict of ID between persons and companies (person_1
and company_1 who shared the same ID 1 in the orignial
database).</p>
<p>The two files produced are ready to be imported in
OpenERP without any modifications. After having
imported these two CSV files, you will have 4 contacts
and 3 companies. (the firsts two contacts are linked
to the first company). You must first import the
companies and then the persons.</p>
</dd>
</dl>
</div>
</form>
</t>
<t t-name="ImportView.preview">
<tr t-if="headers" class="oe_import_grid-header">
<td t-foreach="headers" t-as="header" class="oe_import_grid-cell"

View File

@ -9,7 +9,7 @@
<field name="arch" type="xml">
<field name="property_account_position" position="after" version="7.0">
<label for="vat"/>
<div>
<div name="vat_info">
<field name="vat" on_change="vat_change(vat)" placeholder="e.g. BE0477472701" class="oe_inline"/>
<button colspan="2" name="button_check_vat" string="Check Validity" type="object" icon="gtk-execute" class="oe_inline"/>
<field name="vat_subjected" class="oe_inline"/>

View File

@ -188,7 +188,7 @@ class crm_lead(base_stage, format_address, osv.osv):
_columns = {
'partner_id': fields.many2one('res.partner', 'Partner', ondelete='set null',
select=True, help="Optional linked partner, usually after conversion of the lead"),
select=True, help="Linked partner (optional). Usually created when converting the lead."),
'id': fields.integer('ID', readonly=True),
'name': fields.char('Subject', size=64, required=True, select=1),
@ -236,7 +236,7 @@ class crm_lead(base_stage, format_address, osv.osv):
'ref': fields.reference('Reference', selection=crm._links_get, size=128),
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
'phone': fields.char("Phone", size=64),
'date_deadline': fields.date('Expected Closing'),
'date_deadline': fields.date('Expected Closing', help="Estimate of the date on which the opportunity will be won."),
'date_action': fields.date('Next Action Date', select=True),
'title_action': fields.char('Next Action', size=64),
'color': fields.integer('Color Index'),
@ -251,7 +251,7 @@ class crm_lead(base_stage, format_address, osv.osv):
'street2': fields.char('Street2', size=128),
'zip': fields.char('Zip', change_default=True, size=24),
'city': fields.char('City', size=128),
'state_id': fields.many2one("res.country.state", 'State', domain="[('country_id','=',country_id)]"),
'state_id': fields.many2one("res.country.state", 'State'),
'country_id': fields.many2one('res.country', 'Country'),
'phone': fields.char('Phone', size=64),
'fax': fields.char('Fax', size=64),
@ -896,6 +896,10 @@ class crm_lead(base_stage, format_address, osv.osv):
lead.message_post(body=message)
return True
crm_lead()
def onchange_state(self, cr, uid, ids, state_id, context=None):
if state_id:
country_id=self.pool.get('res.country.state').browse(cr, uid, state_id, context).country_id.id
return {'value':{'country_id':country_id}}
return {}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -160,7 +160,7 @@
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
<field name="state_id" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
<field name="state_id" on_change="onchange_state(state_id)" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
@ -477,7 +477,7 @@
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
<field name="state_id" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
<field name="state_id" options='{"no_open": True}' on_change="onchange_state(state_id)" placeholder="State" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>

View File

@ -2,14 +2,6 @@
<openerp>
<data>
<act_window
id="crm_case_categ_phone_create_partner"
name="Schedule a Call"
res_model="crm.phonecall"
view_mode="tree,form,calendar"
context="{'search_default_partner_id': active_id, 'default_duration': 1.0, 'default_partner_id': active_id}"
groups="base.group_sale_salesman"
/>
<!-- TO CONFIRM: This is fine -->
<!-- act_window

View File

@ -115,7 +115,7 @@
name="%(base_calendar.action_crm_meeting)d"
context="{'search_default_partner_ids': active_id, 'default_partner_ids' : [active_id]}"/>
<button type="action" string="Calls"
name="%(crm.crm_case_categ_phone_create_partner)d"
name="%(crm.crm_case_categ_phone_incoming0)d"
context="{'search_default_partner_id': active_id, 'default_duration': 1.0}" />
<button type="action" string="Opportunities" attrs="{'invisible': [('customer', '=', False)]}"
name="%(crm.crm_case_category_act_oppor11)d" context="{'search_default_partner_id': active_id}"/>

View File

@ -96,13 +96,13 @@ class crm_claim(base_stage, osv.osv):
'user_id': fields.many2one('res.users', 'Responsible'),
'user_fault': fields.char('Trouble Responsible', size=64),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help="Sales team to which Case belongs to."\
"Define Responsible user and Email account for"\
select=True, help="Responsible sales team."\
" Define Responsible user and Email account for"\
" mail gateway."),
'company_id': fields.many2one('res.company', 'Company'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'email_cc': fields.text('Watchers Emails', size=252, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'email_from': fields.char('Email', size=128, help="Destination email for email gateway."),
'partner_phone': fields.char('Phone', size=32),
'stage_id': fields.many2one ('crm.claim.stage', 'Stage',
domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),

View File

@ -106,12 +106,6 @@
states="draft,pending" groups="base.group_user"/>
<button name="case_close" string="Done" type="object" class="oe_highlight"
states="open,pending" groups="base.group_user"/>
<button name="case_refuse" string="Refuse" type="object" class="oe_highlight"
states="draft,open,pending" groups="base.group_user"/>
<button name="stage_previous" string="Previous Stage" type="object" groups="base.group_user"
states="open,pending" icon="gtk-go-back" attrs="{'invisible': [('stage_id','=', False)]}"/>
<button name="stage_next" string="Next Stage" type="object" groups="base.group_user"
states="open,pending" icon="gtk-go-forward" attrs="{'invisible': [('stage_id','=', False)]}"/>
<button name="case_reset" string="Reset to Draft" type="object" groups="base.group_user"
states="cancel,done"/>
<button name="case_cancel" string="Cancel" type="object" groups="base.group_user"
@ -124,13 +118,12 @@
<field name="name"/>
<field name="date"/>
</group>
<group colspan="4" col="6">
<group colspan="4" col="4">
<field name="user_id"/>
<field name="section_id" widget="selection"/>
<field name="state" groups="base.group_no_one"/>
<newline/>
<field name="priority" groups="base.group_user"/>
<field name="section_id"/>
<field name="date_deadline"/>
<field name="state" groups="base.group_no_one"/>
</group>
<group colspan="4" col="4">
<notebook>

View File

@ -53,13 +53,12 @@ class crm_helpdesk(base_state, base_stage, osv.osv):
'date_deadline': fields.date('Deadline'),
'user_id': fields.many2one('res.users', 'Responsible'),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help='Sales team to which Case belongs to.\
Define Responsible user and Email account for mail gateway.'),
select=True, help='Responsible sales team. Define Responsible user and Email account for mail gateway.'),
'company_id': fields.many2one('res.company', 'Company'),
'date_closed': fields.datetime('Closed', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner'),
'email_cc': fields.text('Watchers Emails', size=252 , help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'email_from': fields.char('Email', size=128, help="Destination email for email gateway"),
'date': fields.datetime('Date'),
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),

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: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-02-17 03:56+0000\n"
"Last-Translator: Jeff Wang <wjfonhand@hotmail.com>\n"
"PO-Revision-Date: 2012-11-02 01:52+0000\n"
"Last-Translator: Joshua Jan(SHINEIT) <popkar77@gmail.com>\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: 2012-10-30 04:51+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:03+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: delivery
#: report:sale.shipping:0
@ -332,13 +332,13 @@ msgstr "重量"
msgid ""
"Check this box if you want to manage delivery prices that depends on the "
"destination, the weight, the total of the order, etc."
msgstr "如果要根据目的地、重量、订单总价来管理运费,请勾选这里。"
msgstr "如果要根据目的地、重量、订单总价来管理运费,请勾选这里。"
#. module: delivery
#: help:delivery.carrier,normal_price:0
msgid ""
"Keep empty if the pricing depends on the advanced pricing per destination"
msgstr "如果价格基于每个目的地的固定价格,这里留空。"
msgstr "默认的运费的价格,如果根据目的地定价,这里留空。"
#. module: delivery
#: constraint:stock.move:0
@ -576,7 +576,7 @@ msgstr "一次性交货"
#. module: delivery
#: field:delivery.carrier,use_detailed_pricelist:0
msgid "Advanced Pricing per Destination"
msgstr "每个目的地的固定价格"
msgstr "根据目的地定价"
#. module: delivery
#: view:delivery.carrier:0

View File

@ -5,6 +5,19 @@ openerp.document = function (instance) {
this._super.apply(this, arguments);
this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), });
this.items['files'] = [];
}
},
on_attachments_loaded: function(attachments) {
//to display number in name if more then one attachment which has same name.
var self = this;
_.chain(attachments.reverse())
.groupBy(function(attachment) { return attachment.name})
.each(function(attachment){
if(attachment.length > 1)
_.map(attachment, function(attachment, i){
attachment.name = _.str.sprintf(_t("%s (%s)"), attachment.name, i+1)
})
})
self._super(attachments);
},
});
};
};

View File

@ -338,7 +338,7 @@ class event_registration(osv.osv):
'date_closed': fields.datetime('Attended Date', readonly=True),
'date_open': fields.datetime('Registration Date', readonly=True),
'reply_to': fields.related('event_id','reply_to',string='Reply-to Email', type='char', size=128, readonly=True,),
'log_ids': fields.one2many('mail.message', 'res_id', 'Logs', domain=[('email_from', '=', False),('model','=',_name)]),
'log_ids': fields.one2many('mail.message', 'res_id', 'Logs', domain=[('model','=',_name)]),
'event_end_date': fields.related('event_id','date_end', type='datetime', string="Event End Date", readonly=True),
'event_begin_date': fields.related('event_id', 'date_begin', type='datetime', string="Event Start Date", readonly=True),
'user_id': fields.many2one('res.users', 'User', states={'done': [('readonly', True)]}),

View File

@ -101,7 +101,7 @@
<form string="Events" version="7.0">
<header>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Event Ended" name="button_done" states="confirm" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Finish Event" name="button_done" states="confirm" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object" groups="base.group_user"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" groups="base.group_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
@ -288,7 +288,7 @@
<t t-if="record.is_subscribed.raw_value">
<button type="object" name="unsubscribe_to_event" class="oe_unsubscribe_button ">
<span>Subscribed</span>
<span class="unsubscribe">Unsubscribe</span>
<span class="oe_unsubscribe">Unsubscribe</span>
</button>
</t>
</div>
@ -313,20 +313,6 @@
</field>
</record>
<!-- Event Graph view -->
<record model="ir.ui.view" id="view_event_graph">
<field name="name">Event Graph</field>
<field name="model">event.event</field>
<field name="arch" type="xml">
<graph string="Event by Registration" type="bar" orientation="horizontal">
<field name="name"/>
<field name="register_current" operator="+"/>
<field name="register_prospect" operator="+"/>
</graph>
</field>
</record>
<!-- Event Search View -->
<record model="ir.ui.view" id="view_event_search">
@ -362,7 +348,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,calendar,tree,form,graph</field>
<field name="view_mode">kanban,calendar,tree,form</field>
<field name="context">{"search_default_upcoming":1}</field>
<field name="search_view_id" ref="view_event_search"/>
<field name="help" type="html">

View File

@ -25,7 +25,7 @@ class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'speaker': fields.boolean('Speaker'),
'speaker': fields.boolean('Speaker', help="Check this box if this contact is a speaker."),
'event_ids': fields.one2many('event.event','main_speaker_id', readonly=True),
'event_registration_ids': fields.one2many('event.registration','partner_id', readonly=True),
}

View File

@ -23,7 +23,7 @@
<separator string="Connection with username and password" colspan="4"/>
<label string="Another approach is to create a user for OpenERP in Moodle. If you do so, make sure that this user has appropriate access rights." colspan="4"/>
<field name="moodle_username"/>
<field name="moodle_password"/>
<field name="moodle_password" password="True"/>
</group>
</form>
</field>

View File

@ -24,9 +24,9 @@
<field name="arch" type="xml">
<form string="Incoming Mail Server" version="7.0">
<header attrs="{'invisible' : [('type', '=', 'local')]}">
<button string="Test &amp; Confirm" type="object" name="button_confirm_login" states="draft" icon="gtk-apply"/>
<button string="Fetch Now" type="object" name="fetch_mail" states="done" icon="gtk-network"/>
<button string="Reset Confirmation" type="object" name="set_draft" icon="gtk-convert" states="done"/>
<button string="Test &amp; Confirm" type="object" name="button_confirm_login" states="draft"/>
<button string="Fetch Now" type="object" name="fetch_mail" states="done"/>
<button string="Reset Confirmation" type="object" name="set_draft" states="done"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>

View File

@ -0,0 +1,121 @@
# Polish translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-11-02 14:30+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: google_base_account
#: field:res.users,gmail_user:0
msgid "Username"
msgstr ""
#. module: google_base_account
#: model:ir.actions.act_window,name:google_base_account.act_google_login_form
msgid "Google Login"
msgstr ""
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:29
#, python-format
msgid "Google Contacts Import Error!"
msgstr ""
#. module: google_base_account
#: view:res.users:0
msgid " Synchronization "
msgstr ""
#. module: google_base_account
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr ""
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:75
#, python-format
msgid "Error"
msgstr ""
#. module: google_base_account
#: view:google.login:0
msgid "Google login"
msgstr ""
#. module: google_base_account
#: model:ir.model,name:google_base_account.model_res_users
msgid "res.users"
msgstr "res.users"
#. module: google_base_account
#: field:google.login,password:0
msgid "Google Password"
msgstr ""
#. module: google_base_account
#: view:google.login:0
msgid "_Cancel"
msgstr ""
#. module: google_base_account
#: view:res.users:0
msgid "Google Account"
msgstr ""
#. module: google_base_account
#: field:google.login,user:0
msgid "Google Username"
msgstr ""
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:29
#, python-format
msgid ""
"Please install gdata-python-client from http://code.google.com/p/gdata-"
"python-client/downloads/list"
msgstr ""
"Zainstaluj gdata-python-client z http://code.google.com/p/gdata-python-"
"client/downloads/list"
#. module: google_base_account
#: model:ir.model,name:google_base_account.model_google_login
msgid "Google Contact"
msgstr ""
#. module: google_base_account
#: view:google.login:0
msgid "_Login"
msgstr ""
#. module: google_base_account
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
#. module: google_base_account
#: field:res.users,gmail_password:0
msgid "Password"
msgstr ""
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:75
#, python-format
msgid "Authentication fail check the user and password !"
msgstr ""
#. module: google_base_account
#: view:google.login:0
msgid "ex: user@gmail.com"
msgstr "np: user@gmail.com"

View File

@ -28,11 +28,12 @@
'installable': True,
'auto_install': False,
'js': ['static/src/js/gdocs.js'],
'qweb': ['static/src/xml/gdocs.xml'],
'data': [
'security/ir.model.access.csv',
'res_config_user_view.xml'
],
'depends': ['google_base_account'],
'depends': ['google_base_account','document'],
'description': """
Module to attach a google document to any model.
================================================

View File

@ -17,7 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from datetime import datetime
from tools import DEFAULT_SERVER_DATETIME_FORMAT
from osv import osv, fields
from tools.translate import _
try:
@ -61,7 +62,8 @@ class google_docs_ir_attachment(osv.osv):
#login with the base account google module
client = self._auth(cr, uid, context=context)
# create the document in google docs
local_resource = gdata.docs.data.Resource(gdata.docs.data.DOCUMENT_LABEL)
title = "%s %s" % (context.get("name","Untitled Document."), datetime.today().strftime(DEFAULT_SERVER_DATETIME_FORMAT))
local_resource = gdata.docs.data.Resource(gdata.docs.data.DOCUMENT_LABEL,title=title)
#create a new doc in Google Docs
gdocs_resource = client.post(entry=local_resource, uri='https://docs.google.com/feeds/default/private/full/')
# create an ir.attachment into the db
@ -69,10 +71,12 @@ class google_docs_ir_attachment(osv.osv):
'res_model': res_model,
'res_id': res_id,
'type': 'url',
'name': _('Google Doc'),
'name': title,
'url': gdocs_resource.get_alternate_link().href,
}, context=context)
return gdocs_resource.resource_id.text
return {'resource_id': gdocs_resource.resource_id.text,
'title': title,
'url': gdocs_resource.get_alternate_link().href}
def copy_gdoc(self, cr, uid, res_model, res_id, name_gdocs, gdoc_template_id, context=None):
'''
@ -89,7 +93,7 @@ class google_docs_ir_attachment(osv.osv):
try:
original_resource = client.get_resource_by_id(gdoc_template_id)
#copy the document you choose in the configuration
copy_resource = client.copy_resource(original_resource, 'copy_%s' % original_resource.title.text)
copy_resource = client.copy_resource(original_resource, name_gdocs)
except:
raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL."))
# create an ir.attachment
@ -114,7 +118,8 @@ class google_docs_ir_attachment(osv.osv):
a length of 1 element only (batch processing is not supported in the code, though nothing really prevent it)
:return: the google document object created
'''
assert len(ids) == 1, 'Creating google docs may only be done by one at a time'
if len(ids) != 1:
raise osv.except_osv(_('Google Docs Error!'), _("Creating google docs may only be done by one at a time."))
res_id = ids[0]
pool_ir_attachment = self.pool.get('ir.attachment')
pool_gdoc_config = self.pool.get('google.docs.config')
@ -125,7 +130,10 @@ class google_docs_ir_attachment(osv.osv):
google_docs_config = pool_gdoc_config.search(cr, uid, [('model_id', '=', res_model)], context=context)
if google_docs_config:
name_gdocs = pool_gdoc_config.browse(cr, uid, google_docs_config, context=context)[0].name_template
name_gdocs = name_gdocs % model_fields_dic
try:
name_gdocs = name_gdocs % model_fields_dic
except:
raise osv.except_osv(_('Key Error!'), _("Your Google Doc Name Pattern's key does not found in object."))
google_template_id = pool_gdoc_config.browse(cr, uid, google_docs_config[0], context=context).gdocs_resource_id
google_document = pool_ir_attachment.copy_gdoc(cr, uid, res_model, res_id, name_gdocs, google_template_id, context=context)
else:
@ -138,15 +146,15 @@ class config(osv.osv):
_columns = {
'model_id': fields.many2one('ir.model', 'Model', required=True),
'gdocs_resource_id': fields.char('Google Resource ID to Use as Template', size=64,help='''
'gdocs_resource_id': fields.char('Google Resource ID to Use as Template', size=64, help='''
This is the id of the template document, on google side. You can find it thanks to its URL:
*for a text document with url like `https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is `document:123456789`
*for a spreadsheet document with url like `https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, the ID is `spreadsheet:123456789`
*for a presentation (slide show) document with url like `https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id.p`, the ID is `presentation:123456789`
*for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789`
...
'''),
'name_template': fields.char('Google Doc Name Pattern', size=64, help='Choose how the new google docs will be named, on google side'),
''', required=True),
'name_template': fields.char('Google Doc Name Pattern', size=64, help='Choose how the new google docs will be named, on google side. Eg. gdoc_%(field_name)s', required=True),
}
_defaults = {

View File

@ -1,41 +1,40 @@
openerp.google_docs = function(instance, m) {
var _t = instance.web._t;
var _t = instance.web._t,
QWeb = instance.web.qweb;
instance.web.Sidebar = instance.web.Sidebar.extend({
on_attachments_loaded: function(attachments) {
instance.web.Sidebar.include({
redraw: function() {
var self = this;
self._super(attachments);
// if attachment contains a google doc url do nothing
// else display a button to create a google doc
var flag = false;
_.each(attachments, function(i) {
if (i.url && i.url.match('/docs.google.com/')) { flag = true; }
this._super.apply(this, arguments);
self.$el.find('.oe_sidebar_add_attachment').after(QWeb.render('AddGoogleDocumentItem', {widget: self}))
self.$el.find('.oe_sidebar_add_google_doc').on('click', function (e) {
self.on_google_doc();
});
if (! flag) {
this.add_items('files', [
{ label: _t('Add Google Doc...'), callback: self.on_google_doc },
]);
}
},
on_google_doc: function() {
var self = this;
var form = self.getParent();
form.sidebar_context().then(function (context) {
var ds = new instance.web.DataSet(this, 'ir.attachment', context);
ds.call('google_doc_get', [form.dataset.model, [form.datarecord.id], context]).then(function(r) {
if (r == 'False') {
var params = {
error: response,
message: _t("The user google credentials are not set yet. Contact your administrator for help.")
var view = self.getParent();
var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ];
if( !_.isEmpty(ids) ){
view.sidebar_context().then(function (context) {
var ds = new instance.web.DataSet(this, 'ir.attachment', context);
ds.call('google_doc_get', [view.dataset.model, ids, context]).then(function(r) {
if (r == 'False') {
var params = {
error: response,
message: _t("The user google credentials are not set yet. Contact your administrator for help.")
}
$(openerp.web.qweb.render("DialogWarning", params)).dialog({
title: _t("User Google credentials are not yet set."),
modal: true,
});
}
$(openerp.web.qweb.render("DialogWarning", params)).dialog({
title: _t("User Google credentials are not yet set."),
modal: true,
});
}
form.reload();
}).done(function(r){
window.open(r.url,"_blank");
view.reload();
});
});
});
}
}
});
};

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- vim:fdl=1:
-->
<templates id="template" xml:space="preserve">
<t t-name="AddGoogleDocumentItem">
<li class="oe_sidebar_add_google_doc"><span><b>Add Google Doc...</b></span></li>
</t>
</templates>

View File

@ -29,7 +29,7 @@
'summary': 'Jobs, Departments, Employees Details',
'description': """
Human Resources Management
=========================
==========================
This application enables you to manage important aspects of your company's staff and other details such as their skills, contacts, working time...

View File

@ -93,14 +93,14 @@ class hr_job(osv.osv):
_inherit = ['mail.thread']
_columns = {
'name': fields.char('Job Name', size=128, required=True, select=True),
'expected_employees': fields.function(_no_of_employee, string='Total Employees',
'expected_employees': fields.function(_no_of_employee, string='Total Forecasted Employees',
help='Expected number of employees for this job position after new recruitment.',
store = {
'hr.job': (lambda self,cr,uid,ids,c=None: ids, ['no_of_recruitment'], 10),
'hr.employee': (_get_job_position, ['job_id'], 10),
},
multi='no_of_employee'),
'no_of_employee': fields.function(_no_of_employee, string="Number of Employees",
'no_of_employee': fields.function(_no_of_employee, string="Current Number of Employees",
help='Number of employees currently occupying this job position.',
store = {
'hr.employee': (_get_job_position, ['job_id'], 10),

View File

@ -57,6 +57,7 @@ class report_custom(report_rml):
if emp_ids:
for emp in obj_emp.read(cr, uid, emp_ids, ['name']):
stop, days_xml = False, []
total_wh = 0.0
user_repr = '''
<user>
<name>%s</name>
@ -92,11 +93,15 @@ class report_custom(report_rml):
else:
ldt = dt
# Week xml representation
total_wh += wh
wh = hour2str(wh)
today_xml = '<day num="%s"><wh>%s</wh></day>' % ((today - month).days+1, (wh))
dy=(today - month).days+1
days_xml.append(today_xml)
today, tomor = tomor, tomor + one_day
total_wh = hour2str(total_wh)
today_xml = '<day num="Total"><wh>%s</wh></day>' % (total_wh)
days_xml.append(today_xml)
user_xml.append(user_repr % '\n'.join(days_xml))
rpt_obj = pooler.get_pool(cr.dbname).get('hr.employee')
@ -174,8 +179,9 @@ class report_custom(report_rml):
cell=cell+x
width_dict[j]=x
day_diff1=day_diff1-x
date_xml += ['<dayy name="Total" cell="Total"/>']
date_xml.append('</days>')
date_xml.append('<cols>3.5cm%s</cols>\n' % (',0.74cm' * (int(dy))))
date_xml.append('<cols>3.5cm%s,1.2cm</cols>\n' % (',0.74cm' * (int(dy))))
xml = '''<?xml version="1.0" encoding="UTF-8" ?>
<report>
%s
@ -183,7 +189,7 @@ class report_custom(report_rml):
%s
%s
</report>
''' % (header_xml,_('Attendances By Month'),'\n'.join(user_xml),date_xml)
''' % (header_xml,_('Attendances by Month'),'\n'.join(user_xml),date_xml)
return xml
report_custom('report.hr.attendance.bymonth', 'hr.employee', '', 'addons/hr_attendance/report/bymonth.xsl')

View File

@ -20,12 +20,15 @@
##############################################################################
import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
import pooler
from report.interface import report_rml
from report.interface import toxml
from report import report_sxw
from tools.translate import _
import tools
one_week = relativedelta(days=7)
@ -38,7 +41,8 @@ class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
ids = datas['active_ids']
emp_ids = datas['active_ids']
start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d')
end_date = datetime.strptime(datas['form']['end_date'], '%Y-%m-%d')
first_monday = start_date - relativedelta(days=start_date.date().weekday())
@ -47,9 +51,16 @@ class report_custom(report_rml):
if last_monday < first_monday:
first_monday, last_monday = last_monday, first_monday
rpt_obj = pooler.get_pool(cr.dbname).get('hr.employee')
rml_obj=report_sxw.rml_parse(cr, uid, rpt_obj._name,context)
header_xml = '''
<header>
<date>%s</date>
<company>%s</company>
</header>
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name)
user_xml = []
for employee_id in ids:
for employee_id in emp_ids:
emp = obj_emp.read(cr, uid, [employee_id], ['id', 'name'])[0]
monday, n_monday = first_monday, first_monday + one_week
stop, week_xml = False, []
@ -88,7 +99,7 @@ class report_custom(report_rml):
ldt = dt
# Week xml representation
week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime('%Y-%m-%d'), '<weekend>%s</weekend>' % n_monday.strftime('%Y-%m-%d')]
week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime('%Y-%m-%d'), '<weekend>%s</weekend>' % (n_monday - relativedelta(days=1)).strftime('%Y-%m-%d')]
for idx in range(7):
week_repr.append('<%s>' % num2day[idx])
if idx in week_wh:
@ -98,17 +109,17 @@ class report_custom(report_rml):
week_repr.append('<worked>%sh%02d</worked>' % to_hour(reduce(lambda x,y:x+y, week_wh.values(), 0)))
week_repr.append('</total>')
week_repr.append('</week>')
if len(week_repr) > 21: # 21 = minimal length of week_repr
week_xml.append('\n'.join(week_repr))
week_xml.append('\n'.join(week_repr))
monday, n_monday = n_monday, n_monday + one_week
user_xml.append(user_repr % '\n'.join(week_xml))
xml = '''<?xml version="1.0" encoding="UTF-8" ?>
<report>
%s
<title>%s</title>
%s
</report>
''' % '\n'.join(user_xml)
''' % (header_xml,_('Attendances by Week'),'\n'.join(user_xml))
xml = tools.ustr(xml).encode('utf8')
return self.post_process_xml_data(cr, uid, xml, context)

View File

@ -3,12 +3,15 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import href="hr_custom_default.xsl"/>
<xsl:import href="hr_custom_rml.xsl"/>
<xsl:template match="/">
<xsl:call-template name="rml" />
</xsl:template>
<xsl:template name="rml">
<xsl:template name="stylesheet">
<document filename="timesheet.pdf">
<template pageSize="29.7cm,21cm" leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Timesheets" author="Generated by Open ERP, Fabien Pinckaers" allowSplitting="20">
<pageTemplate id="first">
@ -20,11 +23,17 @@
</template>
<stylesheet>
<paraStyle name="title" fontName="Helvetica-Bold" fontSize="15.0" leading="17" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="emp" fontSize="13.0"/>
<blockTableStyle id="week">
<blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="-1,0"/>
<blockBackground colorName="grey" start="0,0" stop="-1,0"/>
<blockTextColor colorName="red" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="grey" start="-1,0" stop="-1,-1"/>
<blockFont name="Helvetica" size="9" start="0,0" stop="-1,-1"/>
<blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="0,0"/>
<blockBackground colorName="lightgrey" start="1,0" stop="-1,0"/>
<blockFont name="Helvetica-BoldOblique" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,0" />
<lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
<lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
</stylesheet>
@ -36,32 +45,37 @@
</xsl:template>
<xsl:template name="story">
<spacer length="1cm" />
<xsl:apply-templates select="report/title"/>
<xsl:apply-templates select="report/user"/>
</xsl:template>
<xsl:template match="title">
<para style="title">
<xsl:value-of select="."/>
</para>
<spacer length="1cm"/>
</xsl:template>
<xsl:template match="user">
<para>
<b>Name:</b>
<spacer length="1cm" />
<para style="emp">
<b>Employee: </b>
<i><xsl:value-of select="name" /></i>
</para>
<blockTable colWidths="4cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm" style="week">
<tr>
<td></td>
<td>Mon</td>
<td>Tue</td>
<td>Wed</td>
<td>Thu</td>
<td>Fri</td>
<td>Sat</td>
<td>Sun</td>
<td>Tot</td>
</tr>
<xsl:for-each select="week">
<tr></tr>
<spacer length="0.5cm" />
<xsl:for-each select="week">
<blockTable colWidths="8cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm" style="week">
<tr>
<td>Week:</td>
<td></td>
<td>from <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
<td>From <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
<td>Mon</td>
<td>Tue</td>
<td>Wed</td>
<td>Thu</td>
<td>Fri</td>
<td>Sat</td>
<td>Sun</td>
<td>Total</td>
</tr>
<tr>
<td>Worked hours</td>
@ -70,7 +84,7 @@
<xsl:when test="Monday/workhours">
<xsl:value-of select="Monday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@ -78,7 +92,7 @@
<xsl:when test="Tuesday/workhours">
<xsl:value-of select="Tuesday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@ -86,7 +100,7 @@
<xsl:when test="Wednesday/workhours">
<xsl:value-of select="Wednesday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@ -94,7 +108,7 @@
<xsl:when test="Thursday/workhours">
<xsl:value-of select="Thursday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@ -102,7 +116,7 @@
<xsl:when test="Friday/workhours">
<xsl:value-of select="Friday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@ -110,7 +124,7 @@
<xsl:when test="Saturday/workhours">
<xsl:value-of select="Saturday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
@ -118,14 +132,24 @@
<xsl:when test="Sunday/workhours">
<xsl:value-of select="Sunday/workhours" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
<xsl:otherwise>0h00</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:value-of select="total/worked" />
</td>
</tr>
</xsl:for-each>
</blockTable>
</blockTable>
<xsl:if test="position() != last()">
<blockTable colWidths="24cm" style="week">
<tr>
<td colspan="6"></td>
</tr>
</blockTable>
</xsl:if>
</xsl:for-each>
<xsl:if test="position() != last()">
<pageBreak/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View File

@ -18,7 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
from osv import osv, fields
@ -30,8 +31,8 @@ class hr_attendance_byweek(osv.osv_memory):
'end_date': fields.date('Ending Date', required=True)
}
_defaults = {
'init_date': lambda *a: time.strftime('%Y-%m-%d'),
'end_date': lambda *a: time.strftime('%Y-%m-%d'),
'init_date': (datetime.today() - relativedelta(days=datetime.date(datetime.today()).weekday())).strftime('%Y-%m-%d'),
'end_date': (datetime.today() + relativedelta(days=6 - datetime.date(datetime.today()).weekday())).strftime('%Y-%m-%d'),
}
def print_report(self, cr, uid, ids, context=None):

View File

@ -233,7 +233,7 @@ hr_expense_expense()
class product_product(osv.osv):
_inherit = "product.product"
_columns = {
'hr_expense_ok': fields.boolean('Can be Expensed', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
'hr_expense_ok': fields.boolean('Can be Expensed', help="Specify if the product can be selected in an HR expense line."),
}
def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok):

View File

@ -188,8 +188,6 @@
</field>
</record>
<menuitem id="next_id_49" name="Expenses" sequence="15" parent="hr.menu_hr_root"/>
<menuitem action="expense_all" id="menu_expense_all" name="Expenses" parent="next_id_49"/>
<record id="view_product_hr_expense_form" model="ir.ui.view">
<field name="name">product.product.expense.form</field>
@ -203,5 +201,20 @@
</field>
</record>
<record id="hr_expense_product" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.product</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{"default_hr_expense_ok":1}</field>
<field name="domain">[('hr_expense_ok','=',True)]</field>
<field name="search_view_id" ref="product.product_search_form_view"/>
</record>
<menuitem id="menu_product_hr_config_expense" name="Expenses" parent="hr.menu_hr_configuration"/>
<menuitem id="menu_hr_product" name="Products" parent="menu_product_hr_config_expense" action="hr_expense_product"/>
<menuitem id="next_id_49" name="Expenses" sequence="15" parent="hr.menu_hr_root"/>
<menuitem action="expense_all" id="menu_expense_all" name="Expenses" parent="next_id_49"/>
</data>
</openerp>

View File

@ -46,7 +46,7 @@
<field name="date_from"/>
<separator/>
<filter icon="terp-check" domain="[('state','=','draft')]" string="To Confirm"/>
<filter icon="terp-camera_test" domain="[('state','=','confirm')]" string="To Approve" name="approve"/>
<filter icon="terp-camera_test" domain="[('state','in',('confirm','validate1'))]" string="To Approve" name="approve"/>
<filter icon="terp-camera_test" domain="[('state','=','validate')]" string="Validated" name="validated"/>
<separator/>
<filter icon="terp-go-year" name="year" string="Year" domain="[('holiday_status_id.active','=',True)]" help="Filters only on allocations and requests that belong to an holiday type that is 'active' (active field is True)"/>

View File

@ -235,7 +235,6 @@ class hr_applicant(base_stage, osv.Model):
'email_from': lambda s, cr, uid, c: s._get_default_email(cr, uid, c),
'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
'department_id': lambda s, cr, uid, c: s._get_default_department_id(cr, uid, c),
'priority': lambda *a: '',
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'hr.applicant', context=c),
'color': 0,
}

View File

@ -50,6 +50,7 @@ reports.""",
],
'demo': ['hr_timesheet_invoice_demo.xml'],
'test': ['test/test_hr_timesheet_invoice.yml',
'test/test_hr_timesheet_invoice_no_prod_tax.yml',
'test/hr_timesheet_invoice_report.yml',
],
'installable': True,

View File

@ -26,8 +26,9 @@ from tools.translate import _
class hr_timesheet_invoice_factor(osv.osv):
_name = "hr_timesheet_invoice.factor"
_description = "Invoice Rate"
_order = 'factor'
_columns = {
'name': fields.char('Internal name', size=128, required=True, translate=True),
'name': fields.char('Internal Name', size=128, required=True, translate=True),
'customer_name': fields.char('Name', size=128, help="Label for the customer"),
'factor': fields.float('Discount (%)', required=True, help="Discount in percentage"),
}
@ -94,13 +95,13 @@ class account_analytic_account(osv.osv):
def set_close(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'close'}, context=context)
message = _("Contract has been <b>closed</b>.")
self.message_post(cr, uid, ids, body=message, subtype="mt_account_closed", context=context)
self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_closed", context=context)
return True
def set_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'cancelled'}, context=context)
message = _("Contract has been <b>canceled</b>.")
self.message_post(cr, uid, ids, body=message, subtype="mt_account_canceled", context=context)
self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_canceled", context=context)
return True
def set_open(self, cr, uid, ids, context=None):
@ -122,7 +123,7 @@ class account_analytic_line(osv.osv):
_inherit = 'account.analytic.line'
_columns = {
'invoice_id': fields.many2one('account.invoice', 'Invoice', ondelete="set null"),
'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Type of Invoicing', help="It allows to set the discount while making invoice"),
'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Invoiceable', help="It allows to set the discount while making invoice, keep empty if the activities should not be invoiced."),
}
def _default_journal(self, cr, uid, context=None):

View File

@ -21,5 +21,16 @@
<field name="customer_name">80%</field>
<field name="factor">20.0</field>
</record>
<!-- mail: subtypes -->
<record id="mt_account_closed" model="mail.message.subtype">
<field name="name">finished</field>
<field name="res_model">account.analytic.account</field>
</record>
<record id="mt_account_canceled" model="mail.message.subtype">
<field name="name">canceled</field>
<field name="res_model">account.analytic.account</field>
</record>
</data>
</openerp>

View File

@ -19,10 +19,10 @@
<xpath expr="/form/sheet" position='before'>
<header>
<button name="set_pending" string="Pending" type="object" states="open" />
<button name="set_close" string="Close" type="object" states="open,pending" />
<button name="set_close" string="Contract Finished" type="object" states="open,pending" />
<button name="set_open" string="Re-open project" type="object" states="pending,close" />
<button name="set_open" string="Re-open project" type="object" states="cancelled,draft"/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending"/>
<button name="set_cancel" string="Cancel Contract" type="object" states="open,pending"/>
<field name="state" readonly="1" widget="statusbar"
statusbar_visible="open,pending,close" statusbar_colors='{"pending":"red", "template":"blue"}'/>
</header>

View File

@ -30,6 +30,42 @@
-
!python {model: hr.analytic.timesheet}: |
self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule0')], ref('account.analytic_agrolait'))
-
I create a Tax Codes
-
!record {model: account.tax.code, id: tax_case}:
name: Tax_case
company_id: base.main_company
sign: 1
-
I create a Tax
-
!record {model: account.tax, id: tax10}:
name: Tax 10.0
amount: 10.0
type: fixed
sequence: 1
company_id: base.main_company
type_tax_use: all
tax_code_id: tax_case
-
I create an Account with the tax
-
!record {model: account.account, id: account_income_i000}:
name: "income account"
code: "I000"
type: 'other'
user_type: "account.data_account_type_income"
tax_ids: [tax10]
-
I set the account as property_account_income on the product and I set the tax on the product
-
!record {model: product.product, id: product.product_product_consultant}:
property_account_income: account_income_i000
uom_id: product.product_uom_hour
taxes_id: [tax10]
list_price: 75
-
I create invoice on analytic Line using "Invoice analytic Line" wizard.
-
@ -39,13 +75,11 @@
price: 1
product: product.product_product_consultant
time: 1
-
I click on "Create Invoice" button of "Invoice analytic Line" wizard to create invoice.
-
!python {model: hr.timesheet.invoice.create}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule0")]})
-
I check that Invoice is created for this timesheet.
-
@ -67,8 +101,8 @@
assert product == product_exp
assert aline.invoice_id, "Invoice created, but analytic line wasn't updated."
assert aline.invoice_id == invoice_id, "Invoice doesn't match the one at analytic line"
# The expected amount is hard coded here, please keep updated:
assert invoice_id.amount_untaxed == 187.5, "Invoice amount mismatch: %s" % invoice_id.amount_untaxed
assert invoice_id.amount_tax == 50, "Invoice tax mismatch: %s" % invoice_id.amount_tax
-
I create final invoice for this analytic account.
-

View File

@ -0,0 +1,119 @@
-
In order to test hr_timesheet_invoice in OpenERP, I create account line to manage invoice based on costs.
-
I create an account analytic line.
-
!record {model: account.analytic.line, id: account_analytic_line_developyamlforhrmodule1 }:
account_id: account.analytic_agrolait
amount: -1.0
general_account_id: account.a_expense
journal_id: hr_timesheet.analytic_journal
name: develop yaml for hr module
product_id: product.product_product_consultant
product_uom_id: product.product_uom_hour
to_invoice: hr_timesheet_invoice.timesheet_invoice_factor2
unit_amount: 5.00
-
Assign partner name and price list in analytic account.
-
!record {model: account.analytic.account, id: account.analytic_agrolait}:
partner_id: base.res_partner_2
pricelist_id: product.list0
-
I open this account and make the state as pending.
-
!python {model: account.analytic.account}: |
self.set_open(cr, uid, [ref('account.analytic_agrolait')], None)
self.set_pending(cr, uid, [ref('account.analytic_agrolait')], None)
-
I assign account on analytic account line.
-
!python {model: hr.analytic.timesheet}: |
self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule1')], ref('account.analytic_agrolait'))
-
I create a Tax Code
-
!record {model: account.tax.code, id: tax_case}:
name: Tax_case
company_id: base.main_company
sign: 1
-
I create a Tax
-
!record {model: account.tax, id: tax8}:
name: Tax 8.0
amount: 8.0
type: fixed
sequence: 1
company_id: base.main_company
type_tax_use: all
tax_code_id: tax_case
-
I create an Account with the tax
-
!record {model: account.account, id: account_income_i000}:
name: "income account"
code: "I000"
type: 'other'
user_type: "account.data_account_type_income"
tax_ids: [tax8]
-
I set the account as property_account_income on the product and I set no tax on the product (so default tax from the account will be used)
-
!record {model: product.product, id: product.product_product_consultant}:
property_account_income: account_income_i000
uom_id: product.product_uom_hour
taxes_id: []
list_price: 75
-
I create invoice on analytic Line using "Invoice analytic Line" wizard.
-
!record {model: hr.timesheet.invoice.create, id: hr_timesheet_invoice_create_0}:
date: 1
name: 1
price: 1
product: product.product_product_consultant
time: 1
-
I click on "Create Invoice" button of "Invoice analytic Line" wizard to create invoice.
-
!python {model: hr.timesheet.invoice.create}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule1")]})
-
I check that Invoice is created for this timesheet.
-
!python {model: account.analytic.line}: |
aline = self.browse(cr, uid, ref('account_analytic_line_developyamlforhrmodule1'))
analytic_account_obj = self.pool.get('account.analytic.account')
data = self.pool.get('hr.timesheet.invoice.create').read(cr, uid, [ref("hr_timesheet_invoice_create_0")], [], context)[0]
partner = aline.account_id.partner_id.id
invoice_obj = self.pool.get('account.invoice')
invoice_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner)])
invoice_id = invoice_obj.browse(cr, uid, invoice_ids)[0]
for invoice in invoice_id.invoice_line:
product = invoice.product_id.id
product_exp = data['product'][0]
assert product == product_exp
assert aline.invoice_id, "Invoice created, but analytic line wasn't updated."
assert aline.invoice_id == invoice_id, "Invoice doesn't match the one at analytic line"
assert invoice_id.amount_untaxed == 187.5, "Invoice amount mismatch: %s" % invoice_id.amount_untaxed
assert invoice_id.amount_tax == 40, "Invoice tax mismatch: %s" % invoice_id.amount_tax
-
I create final invoice for this analytic account.
-
!record {model: hr.timesheet.invoice.create.final, id: hr_timesheet_invoice_create_final_0}:
date: 1
name: 1
price: 1
time: 1
-
I click on "Create Invoice" button to create Invoice and validate the invoice.
-
!python {model: hr.timesheet.invoice.create.final}: |
import netsvc
wkf_service = netsvc.LocalService("workflow")
res = self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_final_0")], {"active_ids": [ref("account.analytic_agrolait")]})

View File

@ -49,7 +49,6 @@ class account_analytic_line(osv.osv):
# }
def invoice_cost_create(self, cr, uid, ids, data=None, context=None):
analytic_account_obj = self.pool.get('account.analytic.account')
res_partner_obj = self.pool.get('res.partner')
account_payment_term_obj = self.pool.get('account.payment.term')
invoice_obj = self.pool.get('account.invoice')
product_obj = self.pool.get('product.product')
@ -115,7 +114,7 @@ class account_analytic_line(osv.osv):
for product_id, user_id, factor_id, qty, uom, line_name in cr.fetchall():
if data.get('product'):
product_id = data['product'][0]
product_id = data['product'][0]
product = product_obj.browse(cr, uid, product_id, context=context2)
if not product:
raise osv.except_osv(_('Error!'), _('There is no product defined for the line %s. Please select one or force the product through the wizard.') % (line_name))
@ -132,7 +131,7 @@ class account_analytic_line(osv.osv):
general_account = product.product_tmpl_id.property_account_income or product.categ_id.property_account_income_categ
if not general_account:
raise osv.except_osv(_("Configuration Error!"), _("Please define income account for product '%s'.") % product.name)
taxes = product.taxes_id
taxes = product.taxes_id or general_account.tax_ids
tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
curr_line = {
'price_unit': price,
@ -211,7 +210,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
data = context and context.get('active_ids', [])
for analytic in analytic_obj.browse(cr, uid, data, context=context):
if analytic.invoice_id:
raise osv.except_osv(_('Warning!'), _("Invoice is already linked to some of the analytic line(s)!"))
raise osv.except_osv(_('Warning!'), _("Invoice is already linked to some of the analytic line(s)!"))
def do_create(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, [], context=context)[0]

View File

@ -70,7 +70,7 @@ class hr_timesheet_sheet(osv.osv):
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link the employee to a product, like \'Consultant\'.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign the employee to an analytic journal, like \'Timesheet\'.'))
raise osv.except_osv(_('Configuration Error!'), _('In order to create a timesheet for this employee, you must assign an analytic journal to the employee, like \'Timesheet Journal\'.'))
return super(hr_timesheet_sheet, self).create(cr, uid, vals, *args, **argv)
def write(self, cr, uid, ids, vals, *args, **argv):
@ -83,7 +83,7 @@ class hr_timesheet_sheet(osv.osv):
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link the employee to a product.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign the employee to an analytic journal.'))
raise osv.except_osv(_('Configuration Error!'), _('In order to create a timesheet for this employee, you must assign an analytic journal to the employee, like \'Timesheet Journal\'.'))
return super(hr_timesheet_sheet, self).write(cr, uid, ids, vals, *args, **argv)
def button_confirm(self, cr, uid, ids, context=None):

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: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-02-20 09:55+0000\n"
"PO-Revision-Date: 2012-11-02 10:13+0000\n"
"Last-Translator: Erwin van der Ploeg (Endian Solutions) <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: 2012-10-30 05:14+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: hr_timesheet_sheet
#: field:hr.analytic.timesheet,sheet_id:0 field:hr.attendance,sheet_id:0
@ -1008,7 +1008,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
msgid "Submit to Manager"
msgstr ""
msgstr "Aanbieden aan manager"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,account_ids:0

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: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-08-18 17:34+0000\n"
"Last-Translator: Heling Yao <Unknown>\n"
"PO-Revision-Date: 2012-11-01 08:13+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\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: 2012-10-30 05:14+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: hr_timesheet_sheet
#: field:hr.analytic.timesheet,sheet_id:0 field:hr.attendance,sheet_id:0
@ -967,7 +967,7 @@ msgstr "你只能做今天的签入/签出"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
msgid "Submit to Manager"
msgstr ""
msgstr "提交给经理"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,account_ids:0

View File

@ -26,7 +26,6 @@
<field name="product_id" invisible="1"/>
<field name="account_id" invisible="1" groups="analytic.group_analytic_accounting"/>
<field name="general_account_id" invisible="1"/>
<field name="quantity" sum="Hours"/>
<field name="cost" sum="Total Cost"/>
</tree>

View File

@ -32,6 +32,7 @@ class timesheet_report(osv.osv):
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'date': fields.date('Date', readonly=True),
'name': fields.char('Description', size=64,readonly=True),
'product_id' : fields.many2one('product.product', 'Product'),
'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
@ -63,6 +64,7 @@ class timesheet_report(osv.osv):
select
min(aal.id) as id,
htss.name,
aal.date as date,
htss.date_from,
htss.date_to,
to_char(htss.date_from, 'YYYY-MM-DD') as day,
@ -96,6 +98,7 @@ class timesheet_report(osv.osv):
left join hr_timesheet_sheet_sheet as htss ON (hat.line_id=htss.id)
group by
aal.account_id,
aal.date,
htss.date_from,
htss.date_to,
aal.unit_amount,

View File

@ -17,6 +17,7 @@
<field name="model">timesheet.report</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';black:state in ('confirm','new');gray:state == 'cancel'" string="Timesheet">
<field name="date" invisible="1"/>
<field name="name" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="date_from" invisible="1"/>

View File

@ -0,0 +1,46 @@
# Chinese (Simplified) translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2012-11-02 15:23+0000\n"
"Last-Translator: 杨清云 <13836962@qq.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: l10n_ar
#: model:ir.module.module,description:l10n_ar.module_meta_information
msgid ""
"\n"
" Argentinian Accounting : chart of Account\n"
" "
msgstr ""
"\n"
" 阿根廷会计:会计科目表\n"
" "
#. module: l10n_ar
#: model:ir.module.module,shortdesc:l10n_ar.module_meta_information
msgid "Argentinian Chart of Account"
msgstr "阿根廷科目表"
#. module: l10n_ar
#: model:ir.actions.todo,note:l10n_ar.config_call_account_template_in_minimal
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"
"\tThis is the same wizard that runs from Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template."
msgstr ""

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: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-04-21 06:27+0000\n"
"PO-Revision-Date: 2012-11-03 03:35+0000\n"
"Last-Translator: chiachen <Unknown>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:25+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-04 04:55+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_09_21
@ -25,27 +25,27 @@ msgstr "信用卡取现"
#. module: account_coda
#: model:account.coda.trans.category,description:account_coda.actrca_412
msgid "Advice of expiry charges"
msgstr ""
msgstr "费用逾期建议"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_09_11
msgid "Your purchase of luncheon vouchers"
msgstr ""
msgstr "你购买的午餐券"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_11_05
msgid "Partial payment subscription"
msgstr ""
msgstr "分期付款认购"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_01_54
msgid "Unexecutable transfer order"
msgstr ""
msgstr "未执行的转帐"
#. module: account_coda
#: model:account.coda.trans.code,description:account_coda.actcc_01_02
msgid "Individual transfer order initiated by the bank"
msgstr ""
msgstr "银行初始化个人转帐"
#. module: account_coda
#: model:account.coda.trans.code,comment:account_coda.actcc_80_21

View File

@ -473,7 +473,7 @@
<field name="name">CODA Statement Lines</field>
<field name="res_model">coda.bank.statement.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph,form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'block_statement_line_delete' : 1}</field>
<field name="search_view_id" ref="view_coda_bank_statement_line_filter"/>
<field name="view_id" ref="view_coda_bank_statement_line_list"/>

View File

@ -0,0 +1,43 @@
# Chinese (Simplified) translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2012-11-02 14:51+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: l10n_cl
#: model:ir.module.module,description:l10n_cl.module_meta_information
msgid ""
"\n"
" Chilean Accounting : chart of Account\n"
" "
msgstr ""
#. module: l10n_cl
#: model:ir.module.module,shortdesc:l10n_cl.module_meta_information
msgid "Chilean Chart of Account"
msgstr ""
#. module: l10n_cl
#: model:ir.actions.todo,note:l10n_cl.config_call_account_template_in_minimal
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"
"\tThis is the same wizard that runs from Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template."
msgstr ""

View File

@ -6,9 +6,9 @@
<field name="inherit_id" ref="base_vat.view_partner_form"/>
<field name="model">res.partner</field>
<field name="arch" type="xml">
<field name="vat" position="after">
<xpath expr="//div[@name='vat_info']" position="after">
<field name="nrc"/>
</field>
</xpath>
</field>
</record>
</data>

83
addons/l10n_ve/i18n/de.po Normal file
View File

@ -0,0 +1,83 @@
# German translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-23 09:56+0000\n"
"PO-Revision-Date: 2012-10-31 15:43+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_receivable
msgid "Receivable"
msgstr "Forderungen"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_expense
msgid "Expense"
msgstr "Ausgaben"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_equity
msgid "Equity"
msgstr ""
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_tax
msgid "Tax"
msgstr "Steuer"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_cash
msgid "Cash"
msgstr "Barkasse"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_payable
msgid "Payable"
msgstr "Verbindlichkeiten"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_asset
msgid "Asset"
msgstr "Anlagegüter"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_income
msgid "Income"
msgstr "Einnahmen"
#. module: l10n_ve
#: model:ir.actions.todo,note:l10n_ve.config_call_account_template_ve_chart
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.\n"
"Genere el Plan de cuentas de una Plantilla de Carta. Le pedirán pasar el "
"nombre de la compania, la plantilla de carta para seguir, el no. de digitos "
"para generar el codigo para sus cuentas y cuenta Bancaria, dinero para crear "
"Diarios. Asi, la copia pura de la carta la Plantilla es generada.\n"
"Esto es el mismo wizard que corre de la Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template.\n"
" "
msgstr ""
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_view
msgid "View"
msgstr "Sicht"

View File

@ -28,7 +28,7 @@
</record>
<record id="mt_comment" model="mail.message.subtype">
<field name="name">comment</field>
<field name="name">Discussions</field>
</record>
</data>
</openerp>

View File

@ -8,20 +8,20 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-09 00:36+0000\n"
"PO-Revision-Date: 2012-10-26 17:02+0000\n"
"PO-Revision-Date: 2012-10-30 09:52+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:33+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-03 05:04+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: mail
#: field:mail.compose.message,subtype:0 field:mail.message,subtype:0
#: field:mail.message.common,subtype:0
msgid "Message Type"
msgstr ""
msgstr "Тип сообщения"
#. module: mail
#: help:mail.compose.message,auto_delete:0
@ -51,7 +51,7 @@ msgstr "История общения"
#. module: mail
#: view:mail.message:0
msgid "Group By..."
msgstr "Объеденить по..."
msgstr "Группировать по ..."
#. module: mail
#: model:ir.actions.act_window,name:mail.action_email_compose_message_wizard
@ -80,7 +80,7 @@ msgstr "Получатели сообщения"
#: field:mail.compose.message,body_text:0 field:mail.message,body_text:0
#: field:mail.message.common,body_text:0
msgid "Text Contents"
msgstr ""
msgstr "Текстовое содержимое"
#. module: mail
#: view:mail.message:0 selection:mail.message,state:0
@ -196,7 +196,7 @@ msgstr "Получатели"
#. module: mail
#: model:ir.model,name:mail.model_mail_compose_message
msgid "Email composition wizard"
msgstr ""
msgstr "Мастер составления эл. почты"
#. module: mail
#: field:mail.compose.message,res_id:0 field:mail.message,res_id:0
@ -219,7 +219,7 @@ msgstr "Ответ:"
#: field:mail.compose.message,model:0 field:mail.message,model:0
#: field:mail.message.common,model:0
msgid "Related Document Model"
msgstr ""
msgstr "Модель связанного документа"
#. module: mail
#: view:mail.message:0
@ -287,7 +287,7 @@ msgstr "%(sender_name)s написал:"
#: field:mail.compose.message,body_html:0 field:mail.message,body_html:0
#: field:mail.message.common,body_html:0
msgid "Rich-text Contents"
msgstr ""
msgstr "Форматированное содержимое"
#. module: mail
#: field:mail.message,original:0
@ -359,7 +359,7 @@ msgstr "[OpenERP-Forward-Failed] %s"
#. module: mail
#: field:mail.message,user_id:0
msgid "Related User"
msgstr ""
msgstr "Относится к пользователю"
#. module: mail
#: help:mail.compose.message,headers:0 help:mail.message,headers:0
@ -454,7 +454,7 @@ msgstr "Сообщения"
#: field:mail.compose.message,headers:0 field:mail.message,headers:0
#: field:mail.message.common,headers:0
msgid "Message Headers"
msgstr ""
msgstr "Заголовки сообщений"
#. module: mail
#: field:mail.compose.message,email_bcc:0 field:mail.message,email_bcc:0

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