@@ -466,7 +466,7 @@ class account_move_line(osv.osv):
|
||||
val['account_id'] = id2
|
||||
elif jt=='purchase':
|
||||
val['account_id'] = id1
|
||||
if val['account_id']:
|
||||
if val.get('account_id', False):
|
||||
d = self.onchange_account_id(cr, uid, ids, val['account_id'])
|
||||
val.update(d['value'])
|
||||
return {'value':val}
|
||||
@@ -857,8 +857,8 @@ class account_move_line(osv.osv):
|
||||
'journal_id': journal.analytic_journal_id.id,
|
||||
'ref': vals['ref'],
|
||||
})]
|
||||
else:
|
||||
raise osv.except_osv(_('No analytic journal !'), _('Please set an analytic journal on this financial journal !'))
|
||||
#else:
|
||||
# raise osv.except_osv(_('No analytic journal !'), _('Please set an analytic journal on this financial journal !'))
|
||||
|
||||
#if not 'currency_id' in vals:
|
||||
# vals['currency_id'] = account.company_id.currency_id.id
|
||||
|
||||
+122
-99
@@ -8,7 +8,9 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2008-11-28 16:57:27+0000\n"
|
||||
"PO-Revision-Date: 2008-11-28 16:57:27+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"POT-Creation-Date: 2008-11-28 17:09+0000\n"
|
||||
"PO-Revision-Date: 2008-12-04 14:33+0000\n"
|
||||
"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -17,10 +19,10 @@ msgstr ""
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "Integrity Error !"
|
||||
msgstr ""
|
||||
msgstr "Erreur d'Intégrité !"
|
||||
|
||||
#. module: account
|
||||
#: view:account.move:0
|
||||
@@ -64,10 +66,14 @@ msgid "Asset"
|
||||
msgstr "Actif (avoirs)"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_validate_account_move.py:0
|
||||
msgid "Specified Journal does not have any account move entries in draft state for this period"
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Specified Journal does not have any account move entries in draft state for "
|
||||
"this period"
|
||||
msgstr ""
|
||||
"Le Journal Spécifié ne possède aucune écriture de compte à l'état brouillon pour "
|
||||
"cette période"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.tax,tax_group:0
|
||||
@@ -100,12 +106,12 @@ msgstr "Nouvelle facture client"
|
||||
#. module: account
|
||||
#: view:account.account:0
|
||||
msgid "Account Statistics"
|
||||
msgstr ""
|
||||
msgstr "Statistiques du Compte"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.general.ledger.report,checktype,date_from:0
|
||||
msgid " Start date"
|
||||
msgstr ""
|
||||
msgstr " Date de début"
|
||||
|
||||
#. module: account
|
||||
#: field:account.account,parent_id:0
|
||||
@@ -116,12 +122,12 @@ msgstr "Parent"
|
||||
#. module: account
|
||||
#: selection:account.move,type:0
|
||||
msgid "Journal Voucher"
|
||||
msgstr ""
|
||||
msgstr "Pièce Justificative"
|
||||
|
||||
#. module: account
|
||||
#: field:account.invoice,residual:0
|
||||
msgid "Residual"
|
||||
msgstr ""
|
||||
msgstr "Résiduel"
|
||||
|
||||
#. module: account
|
||||
#: field:account.subscription,date_start:0
|
||||
@@ -129,15 +135,15 @@ msgid "Starting date"
|
||||
msgstr "Début de la période"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_refund.py:0
|
||||
#, python-format
|
||||
msgid "Can not %s draft invoice."
|
||||
msgstr ""
|
||||
msgstr "Impossible de %s une facture brouillon."
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.general.ledger.report,checktype,sortbydate:0
|
||||
msgid "Sort by:"
|
||||
msgstr ""
|
||||
msgstr "Trier sur:"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.wizard,name:account.wizard_unreconcile_select
|
||||
@@ -181,7 +187,7 @@ msgstr "Quantité"
|
||||
#. module: account
|
||||
#: view:account.move:0
|
||||
msgid "Total Credit"
|
||||
msgstr ""
|
||||
msgstr "Crédit Total"
|
||||
|
||||
#. module: account
|
||||
#: field:account.analytic.line,product_uom_id:0
|
||||
@@ -192,13 +198,13 @@ msgstr "UdM"
|
||||
#. module: account
|
||||
#: rml:account.account.balance:0
|
||||
msgid "Account Balance -"
|
||||
msgstr ""
|
||||
msgstr "Balance du Compte -"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.wizard,name:account.wizard_general_journal
|
||||
#: model:ir.ui.menu,name:account.menu_general_journal
|
||||
msgid "Print General journal"
|
||||
msgstr ""
|
||||
msgstr "Imprimer le Journal Général"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.third_party_ledger:0
|
||||
@@ -224,8 +230,8 @@ msgid "Compute Code (if type=code)"
|
||||
msgstr "Code de Calcul (si type=code)"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "You have to provide an account for the write off entry !"
|
||||
msgstr ""
|
||||
|
||||
@@ -243,7 +249,7 @@ msgstr "Echéancier"
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_finance_recurrent_entries
|
||||
msgid "Recurrent Entries"
|
||||
msgstr ""
|
||||
msgstr "Écritures récurrentes"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.invoice:0
|
||||
@@ -273,17 +279,17 @@ msgstr "Taxes fournisseurs"
|
||||
#. module: account
|
||||
#: view:account.move:0
|
||||
msgid "Total Debit"
|
||||
msgstr ""
|
||||
msgstr "Débit Total"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.tax.code.entries:0
|
||||
msgid "Accounting Entries-"
|
||||
msgstr ""
|
||||
msgstr "Écritures Comptable"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.move,type:0
|
||||
msgid "Bank Receipt"
|
||||
msgstr ""
|
||||
msgstr "Reçu Bancaire"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.vat.declaration:0
|
||||
@@ -297,16 +303,16 @@ msgid "Fixed"
|
||||
msgstr "Fixe"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/invoice.py:0
|
||||
#, python-format
|
||||
msgid "Warning !"
|
||||
msgstr ""
|
||||
msgstr "Avertissement !"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "You can not delete posted movement: \"%s\"!"
|
||||
msgstr ""
|
||||
msgstr "Vous ne pouvez pas effacer de mouvement posté: \"%s\" !"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.analytic.account.analytic.check.report,init:0
|
||||
@@ -365,15 +371,15 @@ msgid "Tax"
|
||||
msgstr "Impôts et taxes"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "No analytic journal !"
|
||||
msgstr ""
|
||||
msgstr "Pas de journal analytique !"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.general.journal:0
|
||||
msgid "Debit Trans."
|
||||
msgstr ""
|
||||
msgstr "Débit Trans."
|
||||
|
||||
#. module: account
|
||||
#: field:account.analytic.line,account_id:0
|
||||
@@ -408,7 +414,7 @@ msgstr "Partenaire"
|
||||
#. module: account
|
||||
#: field:account.fiscal.position.account,account_src_id:0
|
||||
msgid "Account Source"
|
||||
msgstr ""
|
||||
msgstr "Source Comptable"
|
||||
|
||||
#. module: account
|
||||
#: field:account.journal,update_posted:0
|
||||
@@ -419,13 +425,13 @@ msgstr "Autoriser l'annulation des entrées"
|
||||
#: model:process.transition,name:account.process_transition_paymentorderbank0
|
||||
#: model:process.transition,name:account.process_transition_paymentorderreconcilation0
|
||||
msgid "Payment Reconcilation"
|
||||
msgstr ""
|
||||
msgstr "Réconciliation du Paiement"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Wrong Accounting Entry!"
|
||||
msgstr ""
|
||||
msgstr "Écriture Comptable Incorrecte !"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal
|
||||
@@ -479,15 +485,15 @@ msgid "State"
|
||||
msgstr "État"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Entry is already reconciled"
|
||||
msgstr ""
|
||||
msgstr "L'Écriture est déjà réconciliée"
|
||||
|
||||
#. module: account
|
||||
#: view:account.bank.statement:0
|
||||
msgid "Import Invoice"
|
||||
msgstr ""
|
||||
msgstr "Importer la Facture"
|
||||
|
||||
#. module: account
|
||||
#: help:account.tax,base_code_id:0
|
||||
@@ -510,7 +516,7 @@ msgstr "Calcul particulier"
|
||||
#. module: account
|
||||
#: model:process.transition,note:account.process_transition_confirmstatementfromdraft0
|
||||
msgid "Confirm statement with/without reconciliation from draft statement"
|
||||
msgstr ""
|
||||
msgstr "Veuillez confirmer le relevé avec/sans réconciliation du relevé brouillon"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.move.bank.reconcile,init:0
|
||||
@@ -628,8 +634,8 @@ msgid "Mvt"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "You can not use this general account in this journal !"
|
||||
msgstr ""
|
||||
|
||||
@@ -671,8 +677,8 @@ msgid "Contact"
|
||||
msgstr "Contact"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "You can not validate a non balanced entry !"
|
||||
msgstr ""
|
||||
|
||||
@@ -710,12 +716,13 @@ msgid "Start of period"
|
||||
msgstr "Début de la période"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "You can not add/modify entries in a closed journal."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You can not do this modification on a reconciled entry ! Please note that "
|
||||
@@ -764,8 +771,8 @@ msgid "_Customer invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/invoice.py:0
|
||||
#, python-format
|
||||
msgid "You must first select a partner !"
|
||||
msgstr ""
|
||||
|
||||
@@ -788,8 +795,8 @@ msgid "Tax Code Sign"
|
||||
msgstr "Facteur multiplicateur"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_bank_statement.py:0
|
||||
#, python-format
|
||||
msgid "Account move line \"%s\" is not valid"
|
||||
msgstr ""
|
||||
|
||||
@@ -995,8 +1002,8 @@ msgid "Fiscal Positions"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Both Credit and Debit cannot be zero!"
|
||||
msgstr ""
|
||||
|
||||
@@ -1160,7 +1167,7 @@ msgstr "Montant payé"
|
||||
#. module: account
|
||||
#: selection:account.account.type,sign:0
|
||||
msgid "Positive"
|
||||
msgstr ""
|
||||
msgstr "Positif"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.open_closed_fiscalyear,init:0
|
||||
@@ -1325,9 +1332,10 @@ msgid "Reconcile With Write-Off"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_bank_statement.py:0
|
||||
msgid "The expected balance (%.2f) is different than the computed one. (%.2f)"
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The expected balance (%.2f) is different than the computed one. (%.2f)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
@@ -1426,9 +1434,11 @@ msgid "Analytic lines"
|
||||
msgstr "Lignes analytiques"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
msgid "You can not do this modification on a confirmed entry ! Please note that you can just change some non important fields !"
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You can not do this modification on a confirmed entry ! Please note that you "
|
||||
"can just change some non important fields !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
@@ -1498,7 +1508,7 @@ msgstr ""
|
||||
#. module: account
|
||||
#: field:account.chart.template,property_account_receivable:0
|
||||
msgid "Receivable Account"
|
||||
msgstr ""
|
||||
msgstr "Compte Recevable"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.move.line.reconcile,init_partial:0
|
||||
@@ -1557,7 +1567,7 @@ msgstr "Creer periodes par trimestre"
|
||||
#. module: account
|
||||
#: wizard_view:account.general.journal.report,init:0
|
||||
msgid "Print General Journal"
|
||||
msgstr ""
|
||||
msgstr "Imprimer le Journal Général"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_account_chart_template_form
|
||||
@@ -1575,11 +1585,11 @@ msgstr "Transactions"
|
||||
#: model:ir.ui.menu,name:account.menu_wizard
|
||||
#: view:wizard.multi.charts.accounts:0
|
||||
msgid "Generate Chart of Accounts from a Chart Template"
|
||||
msgstr ""
|
||||
msgstr "Générer le Plan de Comptes à partir d'un Modèle de Plan"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_bank_statement.py:0
|
||||
#, python-format
|
||||
msgid "The statement balance is incorrect !\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -1702,8 +1712,8 @@ msgid "Starting Balance"
|
||||
msgstr "Solde de début"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/invoice.py:0
|
||||
#, python-format
|
||||
msgid "No Partner Defined !"
|
||||
msgstr ""
|
||||
|
||||
@@ -1721,13 +1731,13 @@ msgid "Unreconciliation"
|
||||
msgstr "Déréconciliation"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/invoice.py:0
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#: code:addons/account/account.py:0
|
||||
#: code:addons/account/wizard/wizard_open_closed_fiscalyear.py:0
|
||||
#: code:addons/account/wizard/wizard_fiscalyear_close.py:0
|
||||
#: code:addons/account/wizard/wizard_journal.py:0
|
||||
#, python-format
|
||||
msgid "UserError"
|
||||
msgstr ""
|
||||
|
||||
@@ -1785,7 +1795,9 @@ msgstr "Ré-Ouvrir"
|
||||
|
||||
#. module: account
|
||||
#: help:account.invoice,number:0
|
||||
msgid "Uniq number of the invoice, computed automatically when the invoice is created."
|
||||
msgid ""
|
||||
"Uniq number of the invoice, computed automatically when the invoice is "
|
||||
"created."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
@@ -1850,8 +1862,8 @@ msgid "Account code"
|
||||
msgstr "Code du compte"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "You can not use an inactive account!"
|
||||
msgstr ""
|
||||
|
||||
@@ -1880,7 +1892,9 @@ msgstr "Journal des ajustements"
|
||||
|
||||
#. module: account
|
||||
#: help:res.partner,property_account_position:0
|
||||
msgid "The fiscal position will determine taxes and the accounts used for the the partner."
|
||||
msgid ""
|
||||
"The fiscal position will determine taxes and the accounts used for the the "
|
||||
"partner."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
@@ -1889,8 +1903,8 @@ msgid "Account Manager"
|
||||
msgstr "Comptable"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Entries are not of the same account or already reconciled ! "
|
||||
msgstr ""
|
||||
|
||||
@@ -2022,8 +2036,8 @@ msgid "Total amount this customer owns you."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/invoice.py:0
|
||||
#, python-format
|
||||
msgid "Invalid action !"
|
||||
msgstr ""
|
||||
|
||||
@@ -2093,8 +2107,8 @@ msgid "Journal-Period Name"
|
||||
msgstr "Nom de la période du journal"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_fiscalyear_close.py:0
|
||||
#, python-format
|
||||
msgid "There are no periods defined on New Fiscal Year."
|
||||
msgstr ""
|
||||
|
||||
@@ -2267,8 +2281,8 @@ msgid "Root Account"
|
||||
msgstr "Compte Racine"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_bank_statement.py:0
|
||||
#, python-format
|
||||
msgid "Configration Error !"
|
||||
msgstr ""
|
||||
|
||||
@@ -2315,8 +2329,8 @@ msgid "x Checks Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_pay_invoice.py:0
|
||||
#, python-format
|
||||
msgid "Your journal must have a default credit and debit account."
|
||||
msgstr ""
|
||||
|
||||
@@ -2369,9 +2383,11 @@ msgid "Date"
|
||||
msgstr "Date"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
msgid "No period defined for this date !\nPlease create a fiscal year."
|
||||
#, python-format
|
||||
msgid ""
|
||||
"No period defined for this date !\n"
|
||||
"Please create a fiscal year."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
@@ -2397,8 +2413,8 @@ msgid "Statement Entries"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_fiscalyear_close.py:0
|
||||
#, python-format
|
||||
msgid "The journal must have default credit and debit account"
|
||||
msgstr ""
|
||||
|
||||
@@ -2433,12 +2449,14 @@ msgstr "Réconciliation automatique"
|
||||
|
||||
#. module: account
|
||||
#: constraint:account.period:0
|
||||
msgid "Error ! The date duration of the Period(s) should be within the limit of the Fiscal year. "
|
||||
msgid ""
|
||||
"Error ! The date duration of the Period(s) should be within the limit of the "
|
||||
"Fiscal year. "
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Some entries are already reconciled !"
|
||||
msgstr ""
|
||||
|
||||
@@ -2510,8 +2528,8 @@ msgid "Print Central journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/invoice.py:0
|
||||
#, python-format
|
||||
msgid "No Analytic Journal !"
|
||||
msgstr ""
|
||||
|
||||
@@ -2636,7 +2654,9 @@ msgstr "Annuler"
|
||||
|
||||
#. module: account
|
||||
#: help:account.account.type,sign:0
|
||||
msgid "Allows to change the displayed amount of the balance in the reports, in order to see positive results instead of negative ones in expenses accounts."
|
||||
msgid ""
|
||||
"Allows to change the displayed amount of the balance in the reports, in "
|
||||
"order to see positive results instead of negative ones in expenses accounts."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
@@ -2700,8 +2720,8 @@ msgstr ""
|
||||
"est important."
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Already Reconciled"
|
||||
msgstr ""
|
||||
|
||||
@@ -2734,9 +2754,11 @@ msgid "In dispute"
|
||||
msgstr "En litige"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
msgid "No fiscal year defined for this date !\nPlease create one."
|
||||
#, python-format
|
||||
msgid ""
|
||||
"No fiscal year defined for this date !\n"
|
||||
"Please create one."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
@@ -2755,8 +2777,8 @@ msgid "Power"
|
||||
msgstr "Puissance"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_bank_statement.py:0
|
||||
#, python-format
|
||||
msgid "The account entries lines are not in valid state."
|
||||
msgstr ""
|
||||
|
||||
@@ -2802,8 +2824,8 @@ msgid "O_k"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_fiscalyear_close.py:0
|
||||
#, python-format
|
||||
msgid "Closing of fiscal year canceled, please check the box !"
|
||||
msgstr ""
|
||||
|
||||
@@ -2966,8 +2988,8 @@ msgid "Supplier Refund"
|
||||
msgstr "Note de Crédit Fournisseur"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_bank_statement.py:0
|
||||
#, python-format
|
||||
msgid "Unable to reconcile entry \"%s\": %.2f"
|
||||
msgstr ""
|
||||
|
||||
@@ -2977,8 +2999,8 @@ msgid "Ending Balance"
|
||||
msgstr "Solde final"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Please set an analytic journal on this financial journal !"
|
||||
msgstr ""
|
||||
|
||||
@@ -3028,8 +3050,8 @@ msgid "Analytic Journal -"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "EXJ"
|
||||
msgstr ""
|
||||
|
||||
@@ -3050,10 +3072,10 @@ msgid "Draft Customer Refunds"
|
||||
msgstr "Note de Crédit Client Brouillon"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "Sales Journal"
|
||||
msgstr ""
|
||||
msgstr "Journal des ventes"
|
||||
|
||||
#. module: account
|
||||
#: field:account.journal.column,readonly:0
|
||||
@@ -3156,8 +3178,8 @@ msgid "("
|
||||
msgstr "("
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "You can not modify/delete a journal with entries for this period !"
|
||||
msgstr ""
|
||||
|
||||
@@ -3284,8 +3306,8 @@ msgid "Taxes"
|
||||
msgstr "Taxes"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "BNK"
|
||||
msgstr ""
|
||||
|
||||
@@ -3311,15 +3333,15 @@ msgid "Templates for Accounts"
|
||||
msgstr "Modèles pour les Comptes"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#: code:addons/account/account_analytic_line.py:0
|
||||
#, python-format
|
||||
msgid "Entries: "
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "The account is not defined to be reconcile !"
|
||||
msgstr ""
|
||||
|
||||
@@ -3361,8 +3383,8 @@ msgid "30 Days End of Month"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "Couldn't create move between different companies"
|
||||
msgstr ""
|
||||
|
||||
@@ -3406,8 +3428,8 @@ msgid "Bank Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Entry \"%s\" is not valid !"
|
||||
msgstr ""
|
||||
|
||||
@@ -3562,13 +3584,13 @@ msgid "Central Journal"
|
||||
msgstr "Journal centralisé"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#: code:addons/account/account_analytic_line.py:0
|
||||
#: code:addons/account/account_bank_statement.py:0
|
||||
#: code:addons/account/account.py:0
|
||||
#: code:addons/account/wizard/wizard_pay_invoice.py:0
|
||||
#: code:addons/account/wizard/wizard_refund.py:0
|
||||
#, python-format
|
||||
msgid "Error !"
|
||||
msgstr ""
|
||||
|
||||
@@ -3635,8 +3657,8 @@ msgid "Project line"
|
||||
msgstr "Ligne de projet"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "SAJ"
|
||||
msgstr ""
|
||||
|
||||
@@ -3758,9 +3780,9 @@ msgid "Invoice Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_open_closed_fiscalyear.py:0
|
||||
#: code:addons/account/wizard/wizard_fiscalyear_close.py:0
|
||||
#, python-format
|
||||
msgid "The journal must have centralised counterpart"
|
||||
msgstr ""
|
||||
|
||||
@@ -3783,8 +3805,8 @@ msgid "Open for unreconciliation"
|
||||
msgstr "Ouvrir pour déréconciliation"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/invoice.py:0
|
||||
#, python-format
|
||||
msgid "Bad total !"
|
||||
msgstr ""
|
||||
|
||||
@@ -3896,8 +3918,8 @@ msgid "Active"
|
||||
msgstr "Actif"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "Purchase Journal"
|
||||
msgstr ""
|
||||
|
||||
@@ -4073,8 +4095,8 @@ msgid "Payable Limit"
|
||||
msgstr "Limite de paiement"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/invoice.py:0
|
||||
#, python-format
|
||||
msgid "Global taxes defined, but not in invoice lines !"
|
||||
msgstr ""
|
||||
|
||||
@@ -4149,7 +4171,7 @@ msgstr "Facture"
|
||||
#: selection:account.analytic.account,state:0
|
||||
#: selection:account.invoice,state:0
|
||||
msgid "Open"
|
||||
msgstr "Ouvrir"
|
||||
msgstr "Ouverte"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.next_id_29
|
||||
@@ -4410,9 +4432,10 @@ msgid "JNRL"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_fiscalyear_close.py:0
|
||||
msgid "The new fiscal year should have a journal for new entries define on it"
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The new fiscal year should have a journal for new entries define on it"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
@@ -4435,7 +4458,7 @@ msgstr "Recevables & payables"
|
||||
#. module: account
|
||||
#: rml:account.general.ledger:0
|
||||
msgid "General Ledger -"
|
||||
msgstr ""
|
||||
msgstr "Grand livre -"
|
||||
|
||||
#. module: account
|
||||
#: field:account.analytic.account,date_start:0
|
||||
@@ -4529,8 +4552,8 @@ msgid "Entries Encoding by Move"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account.py:0
|
||||
#, python-format
|
||||
msgid "You can not deactivate an account that contains account moves."
|
||||
msgstr ""
|
||||
|
||||
@@ -4754,9 +4777,9 @@ msgid "The optionnal other currency if it is a multi-currency entry."
|
||||
msgstr "L'autre devise optionnelle si c'est une entrée multi-devise."
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#: code:addons/account/wizard/wizard_validate_account_move.py:0
|
||||
#, python-format
|
||||
msgid "Warning"
|
||||
msgstr ""
|
||||
|
||||
@@ -4766,8 +4789,8 @@ msgid "Skip"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_open_closed_fiscalyear.py:0
|
||||
#, python-format
|
||||
msgid "No journal for ending writings have been defined for the fiscal year"
|
||||
msgstr ""
|
||||
|
||||
@@ -4836,8 +4859,8 @@ msgid "Supplier Invoice"
|
||||
msgstr "Facture fournisseur"
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_bank_statement.py:0
|
||||
#, python-format
|
||||
msgid "Please verify that an account is defined in the journal."
|
||||
msgstr ""
|
||||
|
||||
@@ -5171,8 +5194,8 @@ msgid "Sign on Reports"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/wizard/wizard_journal.py:0
|
||||
#, python-format
|
||||
msgid "This period is already closed !"
|
||||
msgstr ""
|
||||
|
||||
@@ -5271,8 +5294,8 @@ msgid "Open Entries"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#, python-format
|
||||
#: code:addons/account/account_move_line.py:0
|
||||
#, python-format
|
||||
msgid "Bad account!"
|
||||
msgstr ""
|
||||
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -617,8 +617,9 @@ class account_analytic_account_summary_month(osv.osv):
|
||||
string='Total Time'),
|
||||
'month': fields.char('Month', size=25, readonly=True),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
cr.execute('DROP VIEW IF EXISTS account_analytic_analysis_summary_month')
|
||||
cr.drop_view_if_exists('account_analytic_analysis_summary_month')
|
||||
cr.execute('CREATE VIEW account_analytic_analysis_summary_month AS (' \
|
||||
'SELECT ' \
|
||||
'(TO_NUMBER(TO_CHAR(d.month, \'YYYYMM\'), \'999999\') + (d.account_id * 1000000))::integer AS id, ' \
|
||||
|
||||
@@ -168,7 +168,7 @@ class crossovered_budget_lines(osv.osv):
|
||||
date_from = context['wizard_date_from']
|
||||
if context.has_key('wizard_date_to'):
|
||||
date_to = context['wizard_date_to']
|
||||
cr.execute('select sum(amount) from account_analytic_line where account_id=%s and (date between to_date(%s,'yyyy-mm-dd') and to_date(%s,'yyyy-mm-dd')) and general_account_id in (%s)', (line.analytic_account_id.id,date_from,date_to,acc_ids))
|
||||
cr.execute("select sum(amount) from account_analytic_line where account_id=%s and (date between to_date(%s,'yyyy-mm-dd') and to_date(%s,'yyyy-mm-dd')) and general_account_id in (%s)", (line.analytic_account_id.id,date_from,date_to,acc_ids))
|
||||
result=cr.fetchone()[0]
|
||||
if result==None:
|
||||
result=0.00
|
||||
|
||||
@@ -20,21 +20,38 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
|
||||
class abstract_quality_check(object):
|
||||
'''
|
||||
This Class provide...
|
||||
'''
|
||||
|
||||
_score = 0.0
|
||||
_result = ""
|
||||
_result_details = ""
|
||||
#This float have to store the rating of the module.
|
||||
#Used to compute the final score (average of all scores).
|
||||
score = 0.0
|
||||
|
||||
def __init__(self, module_path=""):
|
||||
#This char have to store the result.
|
||||
#Used to display the result of the test.
|
||||
result = ""
|
||||
|
||||
#This char have to store the result with more details.
|
||||
#Used to provide more details if necessary.
|
||||
result_details = ""
|
||||
|
||||
#This bool defines if the test can be run only if the module is installed.
|
||||
#True => the module have to be installed.
|
||||
#False => the module can be uninstalled.
|
||||
bool_installed_only = True
|
||||
|
||||
def __init__(self):
|
||||
'''
|
||||
this method should do the test and fill the _score, _result and _result_details var
|
||||
this method should initialize the var
|
||||
'''
|
||||
raise 'Not Implemented'
|
||||
|
||||
def run_test(self, module_path=""):
|
||||
'''
|
||||
this method should do the test and fill the score, result and result_details var
|
||||
'''
|
||||
raise 'Not Implemented'
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
|
||||
import os
|
||||
from tools import config
|
||||
|
||||
@@ -30,8 +29,8 @@ from base_module_quality import base_module_quality
|
||||
|
||||
class quality_test(base_module_quality.abstract_quality_check):
|
||||
|
||||
def __init__(self, module_path):
|
||||
self._result = """
|
||||
def __init__(self):
|
||||
self.result = """
|
||||
Pylint Test:
|
||||
------------
|
||||
|
||||
@@ -39,36 +38,41 @@ Pylint Test:
|
||||
|
||||
|
||||
"""
|
||||
self.bool_installed_only = False
|
||||
return None
|
||||
|
||||
def run_test(self, module_path):
|
||||
config_file_path = config['addons_path']+'/base_module_quality/pylint_test/pylint_test_config.txt'
|
||||
list_files = os.listdir(module_path)
|
||||
new_list = []
|
||||
subfolder = {}
|
||||
for i in list_files:
|
||||
path = os.path.join(module_path, i)
|
||||
if os.path.isdir(path):
|
||||
for j in os.listdir(path):
|
||||
list_files.append(os.path.join(i, j))
|
||||
|
||||
dict_files = {}
|
||||
n =0
|
||||
n = 0
|
||||
score = 0.0
|
||||
print list_files
|
||||
for file in list_files:
|
||||
if file.split('.')[-1] == 'py' and not file.endswith('__init__.py') and not file.endswith('__terp__.py'):
|
||||
file_path = os.path.join(module_path, file)
|
||||
res = os.popen('pylint --rcfile='+config_file_path+' '+file_path).read()
|
||||
res = os.popen('pylint --rcfile=' + config_file_path + ' ' + file_path).read()
|
||||
n += 1
|
||||
leftchar = -1
|
||||
while res[leftchar:leftchar+1] != ' ' and leftchar-1 <= 0:
|
||||
leftchar -=1
|
||||
leftchar -= 1
|
||||
rightchar = -10
|
||||
while res[rightchar:rightchar+1] != '/' and rightchar+1 <= 0:
|
||||
rightchar +=1
|
||||
rightchar += 1
|
||||
|
||||
score += float(res[leftchar+1:rightchar])
|
||||
self._result_details += res
|
||||
self._result += file+": "+ res[leftchar+1:rightchar]+"/10\n"
|
||||
self._score = score / n
|
||||
try:
|
||||
score += float(res[leftchar+1:rightchar])
|
||||
self.result += file + ": " + res[leftchar+1:rightchar] + "/10\n"
|
||||
except:
|
||||
score += 0
|
||||
self.result += file + ": Unable to parse the result. Check the details.\n"
|
||||
|
||||
self.result_details += res
|
||||
self.score = n and score / n or score
|
||||
return None
|
||||
|
||||
|
||||
|
||||
@@ -56,8 +56,7 @@ load-plugins=
|
||||
#enable-msg=
|
||||
|
||||
# Disable the message(s) with the given id(s).
|
||||
#disable-msg=
|
||||
|
||||
disable-msg=C0103,F0401,E0611,R0903,W0232,W0102,E1002,R0913,R0904
|
||||
|
||||
[REPORTS]
|
||||
|
||||
@@ -66,7 +65,7 @@ load-plugins=
|
||||
output-format=text
|
||||
|
||||
# Include message's id in output
|
||||
include-ids=no
|
||||
include-ids=yes
|
||||
|
||||
# Put messages in a separate file for each module / package specified on the
|
||||
# command line instead of printing them on stdout. Reports (if any) will be
|
||||
|
||||
@@ -30,8 +30,8 @@ from base_module_quality import base_module_quality
|
||||
|
||||
class quality_test(base_module_quality.abstract_quality_check):
|
||||
|
||||
def __init__(self, module_path):
|
||||
self._result = """
|
||||
def __init__(self):
|
||||
self.result = """
|
||||
Speed Test:
|
||||
------------
|
||||
|
||||
@@ -41,8 +41,11 @@ Speed Test:
|
||||
to be continued...
|
||||
|
||||
"""
|
||||
self.bool_installed_only = True
|
||||
return None
|
||||
|
||||
def run_test(self, module_path):
|
||||
return None
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -21,14 +21,20 @@
|
||||
##############################################################################
|
||||
import wizard
|
||||
import pooler
|
||||
import osv
|
||||
import netsvc
|
||||
|
||||
import sys
|
||||
import tools
|
||||
import os
|
||||
|
||||
|
||||
#TODO: (utiliser les nouveaux wizards pour heriter la vue et rajouter un onglet par test?)
|
||||
#TODO: configure pylint
|
||||
#TODO: implement the speed test
|
||||
#TODO: implement the simple test
|
||||
#TODO: add cheks: do the class quality_check inherits the class abstract_quality_check?
|
||||
#TODO: improve translability
|
||||
|
||||
|
||||
#To keep or not? to be discussed...
|
||||
#~ form_check = '''<?xml version="1.0"?>
|
||||
#~ <form string="Quality check">
|
||||
#~ <field name="test" />
|
||||
@@ -50,47 +56,49 @@ view_form = """<?xml version="1.0"?>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>"""
|
||||
#TODO: utiliser les nouveaux wizards pour heriter la vue et rajouter un onglet par test?
|
||||
#TODO: remove the first screen which is unused
|
||||
|
||||
|
||||
view_field = {
|
||||
"general_info": {'type': 'text', 'string': 'General Info', 'readonly':True},
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class wiz_quality_check(wizard.interface):
|
||||
|
||||
|
||||
def _check(self, cr, uid, data, context):
|
||||
def _check(self, cr, uid, data, context={}):
|
||||
string_ret = ""
|
||||
from tools import config
|
||||
list_folders=os.listdir(config['addons_path']+'/base_module_quality/')
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
module_data = pool.get('ir.module.module').browse(cr, uid, data['ids'])
|
||||
|
||||
list_folders = os.listdir(config['addons_path']+'/base_module_quality/')
|
||||
for item in list_folders:
|
||||
path = config['addons_path']+'/base_module_quality/'+item
|
||||
if os.path.exists(path+'/'+item+'.py') and item not in ['report','wizard', 'security']:
|
||||
pool=pooler.get_pool(cr.dbname)
|
||||
module_data = pool.get('ir.module.module').browse(cr, uid, data['ids'])
|
||||
|
||||
if os.path.exists(path+'/'+item+'.py') and item not in ['report', 'wizard', 'security']:
|
||||
ad = tools.config['addons_path']
|
||||
module_path = os.path.join(ad, module_data[0].name)
|
||||
|
||||
from base_module_quality import base_module_quality
|
||||
|
||||
item2='base_module_quality.'+item+'.'+item
|
||||
item2 = 'base_module_quality.'+item+'.'+item
|
||||
x = __import__(item2)
|
||||
x2 = getattr(x,item)
|
||||
x3 = getattr(x2,item)
|
||||
val = x3.quality_test(str(module_path))
|
||||
x2 = getattr(x, item)
|
||||
x3 = getattr(x2, item)
|
||||
val = x3.quality_test()
|
||||
if not val.bool_installed_only or module_data[0].state == "installed":
|
||||
val.run_test(str(module_path))
|
||||
else:
|
||||
val.result += "The module has to be installed before running this test."
|
||||
|
||||
string_ret += val._result
|
||||
string_ret += val.result
|
||||
print val.result_details
|
||||
|
||||
return {'general_info':string_ret}
|
||||
|
||||
|
||||
|
||||
states = {
|
||||
|
||||
#To keep or not? to be discussed...
|
||||
|
||||
#~ 'init': {
|
||||
#~ 'actions': [],
|
||||
#~ 'result': {'type':'form', 'arch':form_check, 'fields':fields_check, 'state':[('end','Cancel'),('do','Do Test')]}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -30,7 +30,7 @@ import StringIO
|
||||
import tools
|
||||
import pooler
|
||||
|
||||
from report.render import render
|
||||
from report.render import render
|
||||
from report.interface import report_int
|
||||
from pychart import *
|
||||
|
||||
@@ -43,7 +43,7 @@ class external_pdf(render):
|
||||
render.__init__(self)
|
||||
self.pdf = pdf
|
||||
self.output_type='pdf'
|
||||
|
||||
|
||||
def _render(self):
|
||||
return self.pdf
|
||||
|
||||
@@ -64,13 +64,13 @@ class report_custom(report_int):
|
||||
cost = row['planned_cost'] or 0
|
||||
revenue = row['planned_revenue'] or 0
|
||||
userid = row['user_id'] or 0
|
||||
|
||||
|
||||
benefit = revenue - cost
|
||||
if benefit > maxbenef:
|
||||
maxbenef = benefit
|
||||
if benefit < minbenef:
|
||||
minbenef = benefit
|
||||
|
||||
|
||||
tuple = (proba * 100, benefit)
|
||||
responsible_data.setdefault(userid, [])
|
||||
responsible_data[userid].append(tuple)
|
||||
@@ -82,19 +82,19 @@ class report_custom(report_int):
|
||||
|
||||
minbenef -= maxbenef * 0.05
|
||||
maxbenef *= 1.2
|
||||
|
||||
|
||||
ratio = 0.5
|
||||
minmaxdiff2 = (maxbenef - minbenef)/2
|
||||
|
||||
|
||||
for l in responsible_data.itervalues():
|
||||
for i in range(len(l)):
|
||||
percent, benef = l[i]
|
||||
proba = percent/100
|
||||
|
||||
current_ratio = 1 + (ratio-1) * proba
|
||||
|
||||
|
||||
newbenef = minmaxdiff2 + ((benef - minbenef - minmaxdiff2) * current_ratio)
|
||||
|
||||
|
||||
l[i] = (percent, newbenef)
|
||||
|
||||
#TODO:
|
||||
@@ -103,23 +103,29 @@ class report_custom(report_int):
|
||||
|
||||
pdf_string = StringIO.StringIO()
|
||||
can = canvas.init(fname=pdf_string, format='pdf')
|
||||
|
||||
|
||||
chart_object.set_defaults(line_plot.T, line_style=None)
|
||||
|
||||
|
||||
xaxis = axis.X(label=None, format="%d%%", tic_interval=20)
|
||||
yaxis = axis.Y()
|
||||
|
||||
x_range_a, x_range_b = (0,100)
|
||||
y_range_a, y_range_b = (minbenef, maxbenef)
|
||||
if y_range_a == 0.0:
|
||||
y_range_a += 0.0001
|
||||
|
||||
ar = area.T(
|
||||
size = (300,200),
|
||||
y_grid_interval = 10000,
|
||||
y_grid_style=None,
|
||||
x_range = (0,100),
|
||||
y_range = (minbenef, maxbenef),
|
||||
x_range = (x_range_a, x_range_b),
|
||||
y_range = (y_range_a, y_range_b),
|
||||
x_axis = xaxis,
|
||||
y_axis = None,
|
||||
legend = legend.T()
|
||||
)
|
||||
|
||||
#import pydb; pydb.debugger()
|
||||
for k, d in responsible_data.iteritems():
|
||||
fill = fill_style.Plain(bgcolor=color.T(r=random.random(), g=random.random(), b=random.random()))
|
||||
tick = tick_mark.Square(size=6, fill_style=fill)
|
||||
@@ -131,7 +137,7 @@ class report_custom(report_int):
|
||||
ar = area.T(legend = legend.T(),
|
||||
size = (200,100),
|
||||
loc=(100,250),
|
||||
x_grid_interval = lambda min, max: [40,60,80,100],
|
||||
x_grid_interval = lambda min, max: [40,60,80,100],
|
||||
x_grid_style=line_style.gray70_dash1,
|
||||
x_range = (33, 100),
|
||||
x_axis = axis.X(label=None, minor_tic_interval=lambda min,max: [50, 70, 90], format=lambda x: ""),
|
||||
|
||||
@@ -28,6 +28,7 @@ AVAILABLE_STATES = [
|
||||
('done', 'Closed'),
|
||||
('pending','Pending')
|
||||
]
|
||||
|
||||
class report_crm_case_section_categ2(osv.osv):
|
||||
_name = "report.crm.case.section.categ2"
|
||||
_description = "Cases by section and category2"
|
||||
@@ -46,8 +47,9 @@ class report_crm_case_section_categ2(osv.osv):
|
||||
_order = 'category2_id, section_id'
|
||||
|
||||
def init(self, cr):
|
||||
cr.drop_view_if_exists("report_crm_case_section_categ2")
|
||||
cr.execute("""
|
||||
create or replace view report_crm_case_section_categ2 as (
|
||||
create view report_crm_case_section_categ2 as (
|
||||
select
|
||||
min(c.id) as id,
|
||||
to_char(c.create_date,'YYYY-MM')||'-01' as name,
|
||||
@@ -84,8 +86,9 @@ class report_crm_case_section_stage(osv.osv):
|
||||
_order = 'stage_id, section_id'
|
||||
|
||||
def init(self, cr):
|
||||
cr.drop_view_if_exists("report_crm_case_section_stage")
|
||||
cr.execute("""
|
||||
create or replace view report_crm_case_section_stage as (
|
||||
create view report_crm_case_section_stage as (
|
||||
select
|
||||
min(c.id) as id,
|
||||
to_char(c.create_date,'YYYY-MM')||'-01' as name,
|
||||
@@ -120,8 +123,9 @@ class report_crm_case_section_categ_stage(osv.osv):
|
||||
_order = 'stage_id, section_id, categ_id'
|
||||
|
||||
def init(self, cr):
|
||||
cr.drop_view_if_exists("report_crm_case_section_categ_stage")
|
||||
cr.execute("""
|
||||
create or replace view report_crm_case_section_categ_stage as (
|
||||
create view report_crm_case_section_categ_stage as (
|
||||
select
|
||||
min(c.id) as id,
|
||||
to_char(c.create_date,'YYYY-MM')||'-01' as name,
|
||||
@@ -157,8 +161,9 @@ class report_crm_case_section_categ_categ2(osv.osv):
|
||||
_order = 'section_id, categ_id, category2_id'
|
||||
|
||||
def init(self, cr):
|
||||
cr.drop_view_if_exists("report_crm_case_section_categ_categ2")
|
||||
cr.execute("""
|
||||
create or replace view report_crm_case_section_categ_categ2 as (
|
||||
create view report_crm_case_section_categ_categ2 as (
|
||||
select
|
||||
min(c.id) as id,
|
||||
to_char(c.create_date, 'YYYY-MM')||'-01' as name,
|
||||
|
||||
@@ -107,7 +107,7 @@ class node_class(object):
|
||||
where.append( ('parent_id','=',self.object.id) )
|
||||
where.append( ('res_id','=',False) )
|
||||
if nodename:
|
||||
where.append( (fobj._rec_name,'=',nodename) )
|
||||
where.append( (fobj._rec_name,'=like',nodename) )
|
||||
ids = fobj.search(self.cr, self.uid, where+[ ('parent_id','=',self.object and self.object.id or False) ], context=self.context)
|
||||
if self.object and self.root and (self.object.type=='ressource'):
|
||||
ids += fobj.search(self.cr, self.uid, where+[ ('parent_id','=',False) ], context=self.context)
|
||||
@@ -118,7 +118,7 @@ class node_class(object):
|
||||
pool = pooler.get_pool(self.cr.dbname)
|
||||
where = []
|
||||
if nodename:
|
||||
where.append(('name','=',nodename))
|
||||
where.append(('name','=like',nodename))
|
||||
if (self.object and self.object.type=='directory') or not self.object2:
|
||||
where.append(('parent_id','=',self.object and self.object.id or False))
|
||||
else:
|
||||
@@ -144,7 +144,7 @@ class node_class(object):
|
||||
fobj = pool.get('ir.attachment')
|
||||
vargs = [('parent_id','=',False),('res_id','=',False)]
|
||||
if nodename:
|
||||
vargs.append(('name','=',nodename))
|
||||
vargs.append(('name','=like',nodename))
|
||||
file_ids=fobj.search(self.cr,self.uid,vargs)
|
||||
|
||||
res = fobj.browse(self.cr, self.uid, file_ids, context=self.context)
|
||||
@@ -174,7 +174,7 @@ class node_class(object):
|
||||
for invalid in INVALID_CHARS:
|
||||
if nodename.find(INVALID_CHARS[invalid]) :
|
||||
nodename=nodename.replace(INVALID_CHARS[invalid],invalid)
|
||||
where.append(('name','=',nodename))
|
||||
where.append(('name','=like',nodename))
|
||||
ids = obj.search(self.cr, self.uid, where, self.context)
|
||||
res = obj.browse(self.cr, self.uid, ids,self.context)
|
||||
for r in res:
|
||||
@@ -290,7 +290,7 @@ class document_directory(osv.osv):
|
||||
def _get_childs(self, cr, uid, node, nodename=False, context={}):
|
||||
where = []
|
||||
if nodename:
|
||||
where.append(('name','=',nodename))
|
||||
where.append(('name','=like',nodename))
|
||||
if object:
|
||||
where.append(('parent_id','=',object.id))
|
||||
ids = self.search(cr, uid, where, context)
|
||||
|
||||
@@ -9,7 +9,7 @@ PORT = config.get('ftp_server_port', 8021)
|
||||
HOST = ''
|
||||
|
||||
class ftp_server(threading.Thread):
|
||||
def log(self, level, message):
|
||||
def log(self, level, message):
|
||||
logger = netsvc.Logger()
|
||||
logger.notifyChannel('FTP', level, message)
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ class abstracted_fs:
|
||||
|
||||
# Ok
|
||||
def fs2ftp(self, node):
|
||||
res = node and ('/' + node.cr.dbname + '/' + node.path) or '/'
|
||||
res = node and ('/' + node.cr.dbname + '/' + node.path.encode('ascii','replace').replace('?','_')) or '/'
|
||||
return res
|
||||
|
||||
# Ok
|
||||
@@ -688,7 +688,7 @@ class abstracted_fs:
|
||||
|
||||
# formatting is matched with proftpd ls output
|
||||
yield "%s %3s %-8s %-8s %8s %s %s\r\n" %(perms, nlinks, uname, gname,
|
||||
size, mtime, file.path.encode('ascii','replace').split('/')[-1])
|
||||
size, mtime, file.path.encode('ascii','replace').replace('?','_').split('/')[-1])
|
||||
|
||||
# Ok
|
||||
def format_mlsx(self, basedir, listing, perms, facts, ignore_err=True):
|
||||
|
||||
@@ -1768,7 +1768,7 @@ class FTPHandler(asynchat.async_chat):
|
||||
self.__out_dtp_queue = (data, isproducer, file)
|
||||
|
||||
def log(self, msg):
|
||||
"""Log a message, including additional identifying session data."""
|
||||
"""Log a message, including additional identifying session data."""
|
||||
log("[%s]@%s:%s %s" %(self.username, self.remote_ip,
|
||||
self.remote_port, msg))
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ fields = {
|
||||
}
|
||||
msg_form = """<?xml version="1.0"?>
|
||||
<form string="Notification">
|
||||
<separator string="XML File has been Created." colspan="4"/>
|
||||
<field name="msg" colspan="4" nolabel="1"/>
|
||||
<field name="file_save" />
|
||||
<separator string="XML File has been Created." colspan="4"/>
|
||||
<field name="msg" colspan="4" nolabel="1"/>
|
||||
<field name="file_save" />
|
||||
</form>"""
|
||||
|
||||
msg_fields = {
|
||||
|
||||
+122
-85
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -225,7 +225,14 @@ membership_line()
|
||||
class Partner(osv.osv):
|
||||
'''Partner'''
|
||||
|
||||
def _membership_state_search_inv(self, cr, uid, ids, context=None):
|
||||
def _get_partner_id(self, cr, uid, ids, context=None):
|
||||
data_inv = self.pool.get('membership.membership_line').browse(cr, uid, ids, context)
|
||||
list_partner = []
|
||||
for data in data_inv:
|
||||
list_partner.append(data.partner.id)
|
||||
return list_partner
|
||||
|
||||
def _get_invoice_partner(self, cr, uid, ids, context=None):
|
||||
data_inv = self.pool.get('account.invoice').browse(cr, uid, ids, context)
|
||||
list_partner = []
|
||||
for data in data_inv:
|
||||
@@ -237,7 +244,6 @@ class Partner(osv.osv):
|
||||
for id in ids:
|
||||
res[id] = 'none'
|
||||
today = time.strftime('%Y-%m-%d')
|
||||
|
||||
for id in ids:
|
||||
partner_data = self.browse(cr,uid,id)
|
||||
if partner_data.membership_cancel and today > partner_data.membership_cancel:
|
||||
@@ -334,24 +340,24 @@ class Partner(osv.osv):
|
||||
res[partner.id] = False
|
||||
return res
|
||||
|
||||
def _membership_start_search(self, cr, uid, obj, name, args):
|
||||
'''Search on membership start date'''
|
||||
if not len(args):
|
||||
return []
|
||||
where = ' AND '.join(['date_from '+x[1]+' \''+str(x[2])+'\''
|
||||
for x in args])
|
||||
cr.execute('SELECT partner, MIN(date_from) \
|
||||
FROM ( \
|
||||
SELECT partner, MIN(date_from) AS date_from \
|
||||
FROM membership_membership_line \
|
||||
GROUP BY partner \
|
||||
) AS foo \
|
||||
WHERE '+where+' \
|
||||
GROUP BY partner')
|
||||
res = cr.fetchall()
|
||||
if not res:
|
||||
return [('id', '=', '0')]
|
||||
return [('id', 'in', [x[0] for x in res])]
|
||||
# def _membership_start_search(self, cr, uid, obj, name, args):
|
||||
# '''Search on membership start date'''
|
||||
# if not len(args):
|
||||
# return []
|
||||
# where = ' AND '.join(['date_from '+x[1]+' \''+str(x[2])+'\''
|
||||
# for x in args])
|
||||
# cr.execute('SELECT partner, MIN(date_from) \
|
||||
# FROM ( \
|
||||
# SELECT partner, MIN(date_from) AS date_from \
|
||||
# FROM membership_membership_line \
|
||||
# GROUP BY partner \
|
||||
# ) AS foo \
|
||||
# WHERE '+where+' \
|
||||
# GROUP BY partner')
|
||||
# res = cr.fetchall()
|
||||
# if not res:
|
||||
# return [('id', '=', '0')]
|
||||
# return [('id', 'in', [x[0] for x in res])]
|
||||
|
||||
def _membership_stop(self, cr, uid, ids, name, args, context=None):
|
||||
'''Return the stop date of membership'''
|
||||
@@ -373,25 +379,25 @@ class Partner(osv.osv):
|
||||
else:
|
||||
res[partner.id] = False
|
||||
return res
|
||||
|
||||
def _membership_stop_search(self, cr, uid, obj, name, args):
|
||||
'''Search on membership stop date'''
|
||||
if not len(args):
|
||||
return []
|
||||
where = ' AND '.join(['date_to '+x[1]+' \''+str(x[2])+'\''
|
||||
for x in args])
|
||||
cr.execute('SELECT partner, MAX(date_to) \
|
||||
FROM ( \
|
||||
SELECT partner, MAX(date_to) AS date_to \
|
||||
FROM membership_membership_line \
|
||||
GROUP BY partner \
|
||||
) AS foo \
|
||||
WHERE '+where+' \
|
||||
GROUP BY partner')
|
||||
res = cr.fetchall()
|
||||
if not res:
|
||||
return [('id', '=', '0')]
|
||||
return [('id', 'in', [x[0] for x in res])]
|
||||
#
|
||||
# def _membership_stop_search(self, cr, uid, obj, name, args):
|
||||
# '''Search on membership stop date'''
|
||||
# if not len(args):
|
||||
# return []
|
||||
# where = ' AND '.join(['date_to '+x[1]+' \''+str(x[2])+'\''
|
||||
# for x in args])
|
||||
# cr.execute('SELECT partner, MAX(date_to) \
|
||||
# FROM ( \
|
||||
# SELECT partner, MAX(date_to) AS date_to \
|
||||
# FROM membership_membership_line \
|
||||
# GROUP BY partner \
|
||||
# ) AS foo \
|
||||
# WHERE '+where+' \
|
||||
# GROUP BY partner')
|
||||
# res = cr.fetchall()
|
||||
# if not res:
|
||||
# return [('id', '=', '0')]
|
||||
# return [('id', 'in', [x[0] for x in res])]
|
||||
|
||||
def _membership_cancel(self, cr, uid, ids, name, args, context=None):
|
||||
'''Return the cancel date of membership'''
|
||||
@@ -407,24 +413,24 @@ class Partner(osv.osv):
|
||||
res[partner_id] = False
|
||||
return res
|
||||
|
||||
def _membership_cancel_search(self, cr, uid, obj, name, args):
|
||||
'''Search on membership cancel date'''
|
||||
if not len(args):
|
||||
return []
|
||||
where = ' AND '.join(['date_cancel '+x[1]+' \''+str(x[2])+'\''
|
||||
for x in args])
|
||||
cr.execute('SELECT partner, MIN(date_cancel) \
|
||||
FROM ( \
|
||||
SELECT partner, MIN(date_cancel) AS date_cancel \
|
||||
FROM membership_membership_line \
|
||||
GROUP BY partner \
|
||||
) AS foo \
|
||||
WHERE '+where+' \
|
||||
GROUP BY partner')
|
||||
res = cr.fetchall()
|
||||
if not res:
|
||||
return [('id', '=', '0')]
|
||||
return [('id', 'in', [x[0] for x in res])]
|
||||
# def _membership_cancel_search(self, cr, uid, obj, name, args):
|
||||
# '''Search on membership cancel date'''
|
||||
# if not len(args):
|
||||
# return []
|
||||
# where = ' AND '.join(['date_cancel '+x[1]+' \''+str(x[2])+'\''
|
||||
# for x in args])
|
||||
# cr.execute('SELECT partner, MIN(date_cancel) \
|
||||
# FROM ( \
|
||||
# SELECT partner, MIN(date_cancel) AS date_cancel \
|
||||
# FROM membership_membership_line \
|
||||
# GROUP BY partner \
|
||||
# ) AS foo \
|
||||
# WHERE '+where+' \
|
||||
# GROUP BY partner')
|
||||
# res = cr.fetchall()
|
||||
# if not res:
|
||||
# return [('id', '=', '0')]
|
||||
# return [('id', 'in', [x[0] for x in res])]
|
||||
|
||||
|
||||
|
||||
@@ -437,18 +443,32 @@ class Partner(osv.osv):
|
||||
# 'membership_state': fields.function(_membership_state, method=True, string='Current membership state',
|
||||
# type='selection', selection=STATE, fnct_search=_membership_state_search),
|
||||
'membership_state': fields.function(_membership_state, method=True, string='Current membership state',
|
||||
type='selection',selection=STATE,store={'account.invoice':(_membership_state_search_inv,['state'], 10)}),
|
||||
type='selection',selection=STATE,store={'account.invoice':(_get_invoice_partner,['state'], 10),
|
||||
'membership.membership_line':(_get_partner_id,['state'], 10),
|
||||
'res.partner':(lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)}),
|
||||
# 'associate_member': fields.many2one('res.partner', 'Associate member'),
|
||||
'free_member': fields.boolean('Free member'),
|
||||
# 'membership_start': fields.function(_membership_start, method=True,
|
||||
# string='Start membership date', type='date',
|
||||
# fnct_search=_membership_start_search),
|
||||
'membership_start': fields.function(_membership_start, method=True,
|
||||
string='Start membership date', type='date',
|
||||
fnct_search=_membership_start_search),
|
||||
string='Start membership date', type='date',store={'account.invoice':(_get_invoice_partner,['state'], 10),
|
||||
'membership.membership_line':(_get_partner_id,['state'], 10),
|
||||
'res.partner':(lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)}),
|
||||
# 'membership_stop': fields.function(_membership_stop, method=True,
|
||||
# string='Stop membership date', type='date',
|
||||
# fnct_search=_membership_stop_search),
|
||||
'membership_stop': fields.function(_membership_stop, method=True,
|
||||
string='Stop membership date', type='date',
|
||||
fnct_search=_membership_stop_search),
|
||||
string='Stop membership date', type='date',store={'account.invoice':(_get_invoice_partner,['state'], 10),
|
||||
'membership.membership_line':(_get_partner_id,['state'], 10),
|
||||
'res.partner':(lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)}),
|
||||
# 'membership_cancel': fields.function(_membership_cancel, method=True,
|
||||
# string='Cancel membership date', type='date',
|
||||
# fnct_search=_membership_cancel_search),
|
||||
'membership_cancel': fields.function(_membership_cancel, method=True,
|
||||
string='Cancel membership date', type='date',
|
||||
fnct_search=_membership_cancel_search),
|
||||
string='Cancel membership date', type='date',store={'account.invoice':(_get_invoice_partner,['state'], 10),
|
||||
'membership.membership_line':(_get_partner_id,['state'], 10),
|
||||
'res.partner':(lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)}),
|
||||
}
|
||||
_defaults = {
|
||||
'free_member': lambda *a: False,
|
||||
@@ -501,36 +521,53 @@ class Invoice(osv.osv):
|
||||
|
||||
_inherit = 'account.invoice'
|
||||
|
||||
|
||||
def action_move_create(self, cr, uid, ids, context=None):
|
||||
'''Create membership.membership_line if the product is for membership'''
|
||||
if context is None:
|
||||
context = {}
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
result = super(Invoice, self).create(cr, uid, vals, context)
|
||||
invoice = self.browse(cr, uid, result)
|
||||
member_line_obj = self.pool.get('membership.membership_line')
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
for invoice in self.browse(cr, uid, ids):
|
||||
|
||||
# fetch already existing member lines
|
||||
former_mlines = member_line_obj.search(cr,uid,
|
||||
[('account_invoice_line','in',
|
||||
[ l.id for l in invoice.invoice_line])], context)
|
||||
# empty them :
|
||||
if former_mlines:
|
||||
member_line_obj.write(cr,uid,former_mlines, {'account_invoice_line':False}, context)
|
||||
|
||||
for line in invoice.invoice_line:
|
||||
if line.product_id and line.product_id.membership:
|
||||
for line in invoice.invoice_line:
|
||||
if line.product_id and line.product_id.membership:
|
||||
date_from = line.product_id.membership_date_from
|
||||
date_to = line.product_id.membership_date_to
|
||||
if invoice.date_invoice > date_from and invoice.date_invoice < date_to:
|
||||
date_from = invoice.date_invoice
|
||||
member_line_obj.create(cr, uid, {
|
||||
line_id = member_line_obj.create(cr, uid, {
|
||||
'partner': invoice.partner_id.id,
|
||||
'date_from': date_from,
|
||||
'date_to': date_to,
|
||||
'account_invoice_line': line.id,
|
||||
})
|
||||
return super(Invoice, self).action_move_create(cr, uid, ids, context)
|
||||
return result
|
||||
|
||||
# def action_move_create(self, cr, uid, ids, context=None):
|
||||
# '''Create membership.membership_line if the product is for membership'''
|
||||
# if context is None:
|
||||
# context = {}
|
||||
# member_line_obj = self.pool.get('membership.membership_line')
|
||||
# partner_obj = self.pool.get('res.partner')
|
||||
# for invoice in self.browse(cr, uid, ids):
|
||||
#
|
||||
# # fetch already existing member lines
|
||||
# former_mlines = member_line_obj.search(cr,uid,
|
||||
# [('account_invoice_line','in',
|
||||
# [ l.id for l in invoice.invoice_line])], context)
|
||||
# # empty them :
|
||||
# if former_mlines:
|
||||
# member_line_obj.write(cr,uid,former_mlines, {'account_invoice_line':False}, context)
|
||||
#
|
||||
# for line in invoice.invoice_line:
|
||||
# if line.product_id and line.product_id.membership:
|
||||
# date_from = line.product_id.membership_date_from
|
||||
# date_to = line.product_id.membership_date_to
|
||||
# if invoice.date_invoice > date_from and invoice.date_invoice < date_to:
|
||||
# date_from = invoice.date_invoice
|
||||
# line_id = member_line_obj.create(cr, uid, {
|
||||
# 'partner': invoice.partner_id.id,
|
||||
# 'date_from': date_from,
|
||||
# 'date_to': date_to,
|
||||
# 'account_invoice_line': line.id,
|
||||
# })
|
||||
# return super(Invoice, self).action_move_create(cr, uid, ids, context)
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context=None):
|
||||
'''Create a 'date_cancel' on the membership_line object'''
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -60,15 +60,8 @@ def _invoice_membership(self, cr, uid, data, context):
|
||||
|
||||
for partner_id in partner_ids:
|
||||
account_id = partner_obj.read(cr, uid, partner_id, ['property_account_receivable'])['property_account_receivable'][0]
|
||||
invoice_id = invoice_obj.create(cr, uid, {
|
||||
'partner_id' : partner_id,
|
||||
'address_invoice_id': partner_address_ids[partner_id]['id'],
|
||||
'account_id': account_id,
|
||||
}
|
||||
)
|
||||
|
||||
line_value = {
|
||||
'invoice_id' : invoice_id,
|
||||
'product_id' : product_id,
|
||||
}
|
||||
|
||||
@@ -81,12 +74,20 @@ def _invoice_membership(self, cr, uid, data, context):
|
||||
tax_tab = [(6, 0, line_value['invoice_line_tax_id'])]
|
||||
line_value['invoice_line_tax_id'] = tax_tab
|
||||
invoice_line_id = invoice_line_obj.create(cr, uid, line_value)
|
||||
invoice_id = invoice_obj.create(cr, uid, {
|
||||
'partner_id' : partner_id,
|
||||
'address_invoice_id': partner_address_ids[partner_id]['id'],
|
||||
'account_id': account_id,
|
||||
'invoice_line':[(6,0,[invoice_line_id])]
|
||||
}
|
||||
)
|
||||
invoice_list.append(invoice_id)
|
||||
if line_value['invoice_line_tax_id']:
|
||||
invoice_obj.write(cr, uid, [invoice_id], {'tax_line':tax_tab})
|
||||
tax_value = invoice_tax_obj.compute(cr, uid, invoice_id).values()[0]
|
||||
invoice_tax_obj.create(cr, uid, tax_value)
|
||||
|
||||
|
||||
value = {
|
||||
'domain': [
|
||||
('id', 'in', invoice_list),
|
||||
|
||||
@@ -60,7 +60,9 @@ class pos_order(osv.osv):
|
||||
res = dict(cr.fetchall())
|
||||
|
||||
for rec in self.browse(cr, uid, ids, context):
|
||||
if rec.partner_id and rec.partner_id.property_account_tax:
|
||||
if rec.partner_id \
|
||||
and rec.partner_id.property_account_position \
|
||||
and rec.partner_id.property_account_position.tax_ids:
|
||||
res[rec.id] = res[rec.id] - rec.amount_tax
|
||||
return res
|
||||
|
||||
|
||||
@@ -37,9 +37,12 @@ class project_project(osv.osv):
|
||||
if prj.date_end:
|
||||
d= date(*time.strptime(prj.date_end,'%Y-%m-%d')[:3])
|
||||
for task in prj.tasks:
|
||||
start_dt = (datetime(*time.strptime(task.date_start,'%Y-%m-%d %H:%M:%S')[:6])+(c-d)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
if task.date_deadline:
|
||||
f = (datetime(*time.strptime(task.date_deadline,'%Y-%m-%d %H:%M:%S')[:6])+(c-d)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
self.pool.get('project.task').write(cr,uid,task.id,{'date_deadline':f})
|
||||
deadline_dt = (datetime(*time.strptime(task.date_deadline,'%Y-%m-%d %H:%M:%S')[:6])+(c-d)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
self.pool.get('project.task').write(cr,uid,task.id,{'date_start':start_dt, 'date_deadline':deadline_dt})
|
||||
else:
|
||||
self.pool.get('project.task').write(cr,uid,task.id,{'date_start':start_dt})
|
||||
return super(project_project,self).write(cr, uid, ids,vals, *args, **kwargs)
|
||||
|
||||
project_project()
|
||||
|
||||
+112
-44
@@ -8,12 +8,15 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2008-11-28 16:57:27+0000\n"
|
||||
"PO-Revision-Date: 2008-11-28 16:57:27+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"POT-Creation-Date: 2008-11-28 17:09+0000\n"
|
||||
"PO-Revision-Date: 2008-10-13 16:22+0000\n"
|
||||
"Last-Translator: Olivier Laurent <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2008-12-16 11:00+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: sale
|
||||
#: rml:sale.shipping:0
|
||||
@@ -95,8 +98,10 @@ msgstr "Exception de facture"
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.order,picking_ids:0
|
||||
msgid "This is the list of picking list that have been generated for this invoice"
|
||||
msgstr "C'est le liste de liste de picking qui ont été généré pour cette facture"
|
||||
msgid ""
|
||||
"This is the list of picking list that have been generated for this invoice"
|
||||
msgstr ""
|
||||
"C'est la liste de liste de picking qui a été générée pour cette facture"
|
||||
|
||||
#. module: sale
|
||||
#: view:sale.order:0
|
||||
@@ -130,7 +135,9 @@ msgstr "Montant"
|
||||
|
||||
#. module: sale
|
||||
#: model:process.transition,note:sale.process_transition_confirmquotation0
|
||||
msgid "Whenever confirm button is clicked, the draft state is moved to manual. that is, quotation is moved to sale order."
|
||||
msgid ""
|
||||
"Whenever confirm button is clicked, the draft state is moved to manual. that "
|
||||
"is, quotation is moved to sale order."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
@@ -177,8 +184,8 @@ msgid "Sale Order"
|
||||
msgstr "Commande client"
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/sale.py:0
|
||||
#, python-format
|
||||
msgid "You must first cancel all packings attached to this sale order."
|
||||
msgstr ""
|
||||
|
||||
@@ -189,8 +196,8 @@ msgid "Taxes"
|
||||
msgstr "Taxes"
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/sale.py:0
|
||||
#, python-format
|
||||
msgid "Invalid action !"
|
||||
msgstr ""
|
||||
|
||||
@@ -234,7 +241,9 @@ msgstr "Creer les factures"
|
||||
|
||||
#. module: sale
|
||||
#: model:process.transition,note:sale.process_transition_deliver0
|
||||
msgid "Confirming the packing list moves them to delivery order. This can be done by clicking on 'Validate' button."
|
||||
msgid ""
|
||||
"Confirming the packing list moves them to delivery order. This can be done "
|
||||
"by clicking on 'Validate' button."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
@@ -275,8 +284,19 @@ msgstr "Méthode d'appro."
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.order,state:0
|
||||
msgid "Gives the state of the quotation or sale order. The exception state is automatically set when a cancel operation occurs in the invoice validation (Invoice Exception) or in the packing list process (Shipping Exception). The 'Waiting Schedule' state is set when the invoice is confirmed but waiting for the scheduler to be on the date 'Date Ordered'."
|
||||
msgstr "Donne l'état du devis ou de la commande. L'état d'exception est automatiquement défini quand une opération d'annulation arrive dans la validation de facture (Exception de facture) ou dans le processus de colisage (Exception d'expédition). L'état 'En attente de planninfication' est défini lorsque la facture est confirmée mais en attente que le plannificateur soit à la date 'Date commandée'."
|
||||
msgid ""
|
||||
"Gives the state of the quotation or sale order. The exception state is "
|
||||
"automatically set when a cancel operation occurs in the invoice validation "
|
||||
"(Invoice Exception) or in the packing list process (Shipping Exception). The "
|
||||
"'Waiting Schedule' state is set when the invoice is confirmed but waiting "
|
||||
"for the scheduler to be on the date 'Date Ordered'."
|
||||
msgstr ""
|
||||
"Donne l'état du devis ou de la commande. L'état d'exception est "
|
||||
"automatiquement défini quand une opération d'annulation arrive dans la "
|
||||
"validation de facture (Exception de facture) ou dans le processus de "
|
||||
"colisage (Exception d'expédition). L'état 'En attente de planninfication' "
|
||||
"est défini lorsque la facture est confirmée mais en attente que le "
|
||||
"plannificateur soit à la date 'Date commandée'."
|
||||
|
||||
#. module: sale
|
||||
#: rml:sale.order:0
|
||||
@@ -295,9 +315,11 @@ msgid "Order Line"
|
||||
msgstr "Commande client"
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/wizard/make_invoice_advance.py:0
|
||||
msgid "You cannot make an advance on a sale order that is defined as 'Automatic Invoice after delivery'."
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You cannot make an advance on a sale order that is defined as 'Automatic "
|
||||
"Invoice after delivery'."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
@@ -376,7 +398,9 @@ msgstr "Montant non-taxé"
|
||||
|
||||
#. module: sale
|
||||
#: model:process.transition,note:sale.process_transition_packing0
|
||||
msgid "Packing list is created when 'Assign' is being clicked after confirming the sale order. This transaction moves the sale order to packing list."
|
||||
msgid ""
|
||||
"Packing list is created when 'Assign' is being clicked after confirming the "
|
||||
"sale order. This transaction moves the sale order to packing list."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
@@ -392,12 +416,14 @@ msgstr "Adresse de livraison :"
|
||||
|
||||
#. module: sale
|
||||
#: model:process.transition,note:sale.process_transition_invoiceafterdelivery0
|
||||
msgid "When you select Shipping Ploicy = 'Automatic Invoice after delivery' , it will automatic create after delivery."
|
||||
msgid ""
|
||||
"When you select Shipping Ploicy = 'Automatic Invoice after delivery' , it "
|
||||
"will automatic create after delivery."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/sale.py:0
|
||||
#, python-format
|
||||
msgid "Error !"
|
||||
msgstr ""
|
||||
|
||||
@@ -424,8 +450,8 @@ msgid "Sales Order Lines"
|
||||
msgstr "Lignes de ventes"
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/sale.py:0
|
||||
#, python-format
|
||||
msgid "You must first cancel all invoices attached to this sale order."
|
||||
msgstr ""
|
||||
|
||||
@@ -481,7 +507,7 @@ msgstr "Configuration"
|
||||
#. module: sale
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "XML non valide pour l'architecture de la vue"
|
||||
msgstr "XML non valide pour l'architecture de la vue!"
|
||||
|
||||
#. module: sale
|
||||
#: field:sale.order,invoice_ids:0
|
||||
@@ -522,16 +548,29 @@ msgstr "Manuel en cours"
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.order,order_policy:0
|
||||
msgid "The Shipping Policy is used to synchronise invoice and delivery operations.\n"
|
||||
" - The 'Pay before delivery' choice will first generate the invoice and then generate the packing order after the payment of this invoice.\n"
|
||||
" - The 'Shipping & Manual Invoice' will create the packing order directly and wait for the user to manually click on the 'Invoice' button to generate the draft invoice.\n"
|
||||
" - The 'Invoice after delivery' choice will generate the draft invoice after the packing list have been finished.\n"
|
||||
" - The 'Invoice from the packings' choice is used to create an invoice during the packing process."
|
||||
msgstr "La Politique de Livraison est utilisée pour synchroniser les factures et les opérations de livraison.\n"
|
||||
" - le choix \"Payer avant livraison\" générera d'abord les factures puis générera la commande de colisage après le paiement de cette facture.\n"
|
||||
" - \"Livraison & Factures manuelles\" créera la commande de colisage directement et attendra que l'utilisateur clique manuellement sur le bouton 'Facture' pour générer la facture brouillon.\n"
|
||||
" - \"Facture après Livraison\" générera la facture brouillon après que la liste des colisage soit terminée. \n"
|
||||
" - \"Facture d'après Colisage\" est utilisé pour créer la facture pendant le processus de colisage."
|
||||
msgid ""
|
||||
"The Shipping Policy is used to synchronise invoice and delivery operations.\n"
|
||||
" - The 'Pay before delivery' choice will first generate the invoice and "
|
||||
"then generate the packing order after the payment of this invoice.\n"
|
||||
" - The 'Shipping & Manual Invoice' will create the packing order directly "
|
||||
"and wait for the user to manually click on the 'Invoice' button to generate "
|
||||
"the draft invoice.\n"
|
||||
" - The 'Invoice after delivery' choice will generate the draft invoice "
|
||||
"after the packing list have been finished.\n"
|
||||
" - The 'Invoice from the packings' choice is used to create an invoice "
|
||||
"during the packing process."
|
||||
msgstr ""
|
||||
"La Politique de Livraison est utilisée pour synchroniser les factures et les "
|
||||
"opérations de livraison.\n"
|
||||
" - le choix \"Payer avant livraison\" générera d'abord les factures puis "
|
||||
"générera la commande de colisage après le paiement de cette facture.\n"
|
||||
" - \"Livraison & Factures manuelles\" créera la commande de colisage "
|
||||
"directement et attendra que l'utilisateur clique manuellement sur le bouton "
|
||||
"'Facture' pour générer la facture brouillon.\n"
|
||||
" - \"Facture après Livraison\" générera la facture brouillon après que la "
|
||||
"liste des colisage soit terminée. \n"
|
||||
" - \"Facture d'après Colisage\" est utilisé pour créer la facture pendant "
|
||||
"le processus de colisage."
|
||||
|
||||
#. module: sale
|
||||
#: field:sale.shop,payment_account_id:0
|
||||
@@ -583,8 +622,8 @@ msgid "Net Price"
|
||||
msgstr "Prix net"
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/sale.py:0
|
||||
#, python-format
|
||||
msgid "invalid mode for test_state"
|
||||
msgstr ""
|
||||
|
||||
@@ -615,8 +654,8 @@ msgid "Shipping Default Policy"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/sale.py:0
|
||||
#, python-format
|
||||
msgid "Could not cancel sale order !"
|
||||
msgstr ""
|
||||
|
||||
@@ -647,8 +686,14 @@ msgstr "Vendeur"
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.order,invoice_ids:0
|
||||
msgid "This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."
|
||||
msgstr "C'est la liste des factures qui ont étées générées pour cette commande. Le même commande peut avoir été facturé en plusieurs fois (par lignes par example)."
|
||||
msgid ""
|
||||
"This is the list of invoices that have been generated for this sale order. "
|
||||
"The same sale order may have been invoiced in several times (by line for "
|
||||
"example)."
|
||||
msgstr ""
|
||||
"C'est la liste des factures qui ont étées générées pour cette commande. Le "
|
||||
"même commande peut avoir été facturé en plusieurs fois (par lignes par "
|
||||
"example)."
|
||||
|
||||
#. module: sale
|
||||
#: rml:sale.order:0
|
||||
@@ -708,8 +753,17 @@ msgstr "Brouillon"
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.order,invoice_quantity:0
|
||||
msgid "The sale order will automatically create the invoice proposition (draft invoice). Ordered and delivered quantities may not be the same. You have to choose if you invoice based on ordered or shipped quantities. If the product is a service, shipped quantities means hours spent on the associated tasks."
|
||||
msgstr "La commande créera une proposition de facturation (facture brouillon). Les quantités commandées et facturées peuvent ne pas être les mêmes. Vous devez choisir si vous facturez sur base des quantités commandées ou expédiées. Si le produit est un service, les quantitées expédiées signifies les heures dépensées aux tâches associées."
|
||||
msgid ""
|
||||
"The sale order will automatically create the invoice proposition (draft "
|
||||
"invoice). Ordered and delivered quantities may not be the same. You have to "
|
||||
"choose if you invoice based on ordered or shipped quantities. If the product "
|
||||
"is a service, shipped quantities means hours spent on the associated tasks."
|
||||
msgstr ""
|
||||
"La commande créera une proposition de facturation (facture brouillon). Les "
|
||||
"quantités commandées et facturées peuvent ne pas être les mêmes. Vous devez "
|
||||
"choisir si vous facturez sur base des quantités commandées ou expédiées. Si "
|
||||
"le produit est un service, les quantitées expédiées signifies les heures "
|
||||
"dépensées aux tâches associées."
|
||||
|
||||
#. module: sale
|
||||
#: rml:sale.shipping:0
|
||||
@@ -779,12 +833,14 @@ msgstr "Commandes de Ventes"
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.order,picking_policy:0
|
||||
msgid "If you don't have enough stock available to deliver all at once, do you accept partial shippings or not."
|
||||
msgid ""
|
||||
"If you don't have enough stock available to deliver all at once, do you "
|
||||
"accept partial shippings or not."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/sale.py:0
|
||||
#, python-format
|
||||
msgid "Cannot delete Sale Order(s) which are already confirmed !"
|
||||
msgstr ""
|
||||
|
||||
@@ -864,8 +920,8 @@ msgid "Payment before delivery"
|
||||
msgstr "Paiement avant livraison"
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/wizard/make_invoice_advance.py:0
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
@@ -1014,8 +1070,11 @@ msgstr ""
|
||||
|
||||
#. module: sale
|
||||
#: constraint:ir.model:0
|
||||
msgid "The Object name must start with x_ and not contain any special character !"
|
||||
msgstr "Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères spéciaux !"
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères "
|
||||
"spéciaux !"
|
||||
|
||||
#. module: sale
|
||||
#: model:process.transition,note:sale.process_transition_saleinvoice0
|
||||
@@ -1034,7 +1093,9 @@ msgstr "Désignation manuelle"
|
||||
|
||||
#. module: sale
|
||||
#: model:process.transition,note:sale.process_transition_invoice0
|
||||
msgid "Invoice is created when 'Create Invoice' is being clicked after confirming the sale order. This transaction moves the sale order to invoices."
|
||||
msgid ""
|
||||
"Invoice is created when 'Create Invoice' is being clicked after confirming "
|
||||
"the sale order. This transaction moves the sale order to invoices."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
@@ -1138,8 +1199,8 @@ msgid "Error: Invalid ean code"
|
||||
msgstr "Erreur: code EAN invalide"
|
||||
|
||||
#. module: sale
|
||||
#, python-format
|
||||
#: code:addons/sale/sale.py:0
|
||||
#, python-format
|
||||
msgid "Could not cancel this sale order !"
|
||||
msgstr ""
|
||||
|
||||
@@ -1173,7 +1234,8 @@ msgstr "Notes"
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.order,partner_order_id:0
|
||||
msgid "The name and address of the contact that requested the order or quotation."
|
||||
msgid ""
|
||||
"The name and address of the contact that requested the order or quotation."
|
||||
msgstr "Le nom et l'adresse du contacte ayant demandé le devis."
|
||||
|
||||
#. module: sale
|
||||
@@ -1236,7 +1298,11 @@ msgstr ""
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.config.picking_policy,step:0
|
||||
msgid "By default, Open ERP is able to manage complex routing and paths of products in your warehouse and partner locations. This will configure the most common and simple methods to deliver products to the customer in one or two operations by the worker."
|
||||
msgid ""
|
||||
"By default, Open ERP is able to manage complex routing and paths of products "
|
||||
"in your warehouse and partner locations. This will configure the most common "
|
||||
"and simple methods to deliver products to the customer in one or two "
|
||||
"operations by the worker."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
@@ -1271,7 +1337,9 @@ msgstr "Condition de paiement"
|
||||
|
||||
#. module: sale
|
||||
#: model:process.transition,note:sale.process_transition_saleorderprocurement0
|
||||
msgid "In sale order , procuerement for each line and it comes into the procurement order"
|
||||
msgid ""
|
||||
"In sale order , procuerement for each line and it comes into the procurement "
|
||||
"order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
|
||||
@@ -99,7 +99,7 @@ class stock_picking(osv.osv):
|
||||
sale_line_obj = self.pool.get('sale.order.line')
|
||||
if move_line.sale_line_id:
|
||||
sale_line_obj.write(cursor, user, [move_line.sale_line_id.id], {'invoiced':True,
|
||||
'invoice_lines': [(6, 0, [invoice_line_id])],
|
||||
'invoice_lines': [(4, invoice_line_id)],
|
||||
})
|
||||
return super(stock_picking, self)._invoice_line_hook(cursor, user,
|
||||
move_line, invoice_line_id)
|
||||
|
||||
@@ -99,19 +99,24 @@ class report_tasks(report_int):
|
||||
int_to_date = lambda x: '/a60{}'+DateTime.localtime(x).strftime('%d %m %Y')
|
||||
|
||||
def _interval_get(*args):
|
||||
result = []
|
||||
result = set()
|
||||
for i in range(20):
|
||||
d = DateTime.localtime(datas[0][0] + (((datas[-1][0]-datas[0][0])/20)*(i+1)))
|
||||
res = DateTime.DateTime(d.year, d.month, d.day).ticks()
|
||||
if (not result) or result[-1]<>res:
|
||||
result.append(res)
|
||||
return result
|
||||
result.add(res)
|
||||
|
||||
return list(result)
|
||||
|
||||
if datas[-1][0] == datas[0][0]:
|
||||
x_range = (datas[0][0],datas[-1][0]+1)
|
||||
else:
|
||||
x_range = (datas[0][0],datas[-1][0])
|
||||
|
||||
ar = area.T(x_grid_style=line_style.gray50_dash1,
|
||||
x_axis=axis.X(label="Date", format=int_to_date),
|
||||
y_axis=axis.Y(label="Burndown Chart - Planned Hours"),
|
||||
x_grid_interval=_interval_get,
|
||||
x_range = (datas[0][0],datas[-1][0]),
|
||||
x_range = x_range,
|
||||
y_range = (0,max_hour),
|
||||
legend = None,
|
||||
size = (680,450))
|
||||
|
||||
Reference in New Issue
Block a user