[MERGE] trunk

bzr revid: al@openerp.com-20121208174511-a4dhw2odli43ftfp
This commit is contained in:
Antony Lesuisse 2012-12-08 18:45:11 +01:00
commit 045c04a3a2
213 changed files with 7523 additions and 3236 deletions

View File

@ -141,7 +141,7 @@ for a particular financial year and for preparation of vouchers there is a modul
'project/analytic_account_demo.xml',
'demo/account_minimal.xml',
'demo/account_invoice_demo.xml',
# 'account_unit_test.xml',
'account_unit_test.xml',
],
'test': [
'test/account_customer_invoice.yml',

View File

@ -75,8 +75,8 @@ class account_payment_term(osv.osv):
amount = value
result = []
obj_precision = self.pool.get('decimal.precision')
prec = obj_precision.precision_get(cr, uid, 'Account')
for line in pt.line_ids:
prec = obj_precision.precision_get(cr, uid, 'Account')
if line.value == 'fixed':
amt = round(line.value_amount, prec)
elif line.value == 'procent':
@ -92,19 +92,20 @@ class account_payment_term(osv.osv):
next_date += relativedelta(day=line.days2, months=1)
result.append( (next_date.strftime('%Y-%m-%d'), amt) )
amount -= amt
return result
account_payment_term()
amount = reduce(lambda x,y: x+y[1], result, 0.0)
dist = round(value-amount, prec)
if dist:
result.append( (time.strftime('%Y-%m-%d'), dist) )
return result
class account_payment_term_line(osv.osv):
_name = "account.payment.term.line"
_description = "Payment Term Line"
_columns = {
'name': fields.char('Line Name', size=32, required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the payment term lines from the lowest sequences to the higher ones"),
'value': fields.selection([('procent', 'Percent'),
('balance', 'Balance'),
('fixed', 'Fixed Amount')], 'Valuation',
('fixed', 'Fixed Amount')], 'Computation',
required=True, help="""Select here the kind of valuation related to this payment term line. Note that you should have your last line with the type 'Balance' to ensure that the whole amount will be treated."""),
'value_amount': fields.float('Amount To Pay', digits_compute=dp.get_precision('Payment Term'), help="For percent enter a ratio between 0-1."),
@ -115,10 +116,10 @@ class account_payment_term_line(osv.osv):
}
_defaults = {
'value': 'balance',
'sequence': 5,
'days': 30,
'days2': 0,
}
_order = "sequence"
_order = "value desc,days"
def _check_percent(self, cr, uid, ids, context=None):
obj = self.browse(cr, uid, ids[0], context=context)

View File

@ -80,8 +80,11 @@ class account_invoice(osv.osv):
def _reconciled(self, cr, uid, ids, name, args, context=None):
res = {}
for id in ids:
res[id] = self.test_paid(cr, uid, [id])
wf_service = netsvc.LocalService("workflow")
for inv in self.browse(cr, uid, ids, context=context):
res[inv.id] = self.test_paid(cr, uid, [inv.id])
if not res[inv.id] and inv.state == 'paid':
wf_service.trg_validate(uid, 'account.invoice', inv.id, 'open_test', cr)
return res
def _get_reference_type(self, cr, uid, context=None):
@ -1159,7 +1162,7 @@ class account_invoice(osv.osv):
return map(lambda x: (0,0,x), lines)
def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None):
invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id', 'company_id'])
invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id', 'company_id', 'user_id', 'fiscal_position'])
obj_invoice_line = self.pool.get('account.invoice.line')
obj_invoice_tax = self.pool.get('account.invoice.tax')
obj_journal = self.pool.get('account.journal')
@ -1208,7 +1211,8 @@ class account_invoice(osv.osv):
})
# take the id part of the tuple returned for many2one fields
for field in ('partner_id', 'company_id',
'account_id', 'currency_id', 'payment_term', 'journal_id'):
'account_id', 'currency_id', 'payment_term', 'journal_id',
'user_id', 'fiscal_position'):
invoice[field] = invoice[field] and invoice[field][0]
# create the new invoice
new_ids.append(self.create(cr, uid, invoice))

View File

@ -443,9 +443,9 @@ class account_move_line(osv.osv):
'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1),
'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile'),
'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref'),
'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')),
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount in Currency', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True,
@ -456,7 +456,7 @@ class account_move_line(osv.osv):
store = {
'account.move': (_get_move_lines, ['period_id'], 20)
}),
'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"),
'blocked': fields.boolean('No Follow-up', help="You can check this box to mark this journal item as a litigation with the associated partner"),
'partner_id': fields.many2one('res.partner', 'Partner', select=1, ondelete='restrict'),
'date_maturity': fields.date('Due date', select=True ,help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."),
'date': fields.related('move_id','date', string='Effective date', type='date', required=True, select=True,
@ -856,7 +856,12 @@ class account_move_line(osv.osv):
if r[0][1] != None:
raise osv.except_osv(_('Error!'), _('Some entries are already reconciled.'))
if (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \
if context.get('fy_closing'):
# We don't want to generate any write-off when being called from the
# wizard used to close a fiscal year (and it doesn't give us any
# writeoff_acc_id).
pass
elif (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \
(account.currency_id and (not currency_obj.is_zero(cr, uid, account.currency_id, currency))):
if not writeoff_acc_id:
raise osv.except_osv(_('Warning!'), _('You have to provide an account for the write off/exchange difference entry.'))

View File

@ -1549,10 +1549,8 @@
<field name="model">account.payment.term.line</field>
<field name="arch" type="xml">
<tree string="Payment Term">
<field name="sequence"/>
<field name="name"/>
<field name="value"/>
<field name="value_amount"/>
<field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/>
<field name="days"/>
<field name="days2"/>
</tree>
@ -1563,37 +1561,20 @@
<field name="model">account.payment.term.line</field>
<field name="arch" type="xml">
<form string="Payment Term" version="7.0">
<group>
<field name="name"/>
<field name="sequence"/>
</group>
<group>
<group string="Amount Computation">
<field name="value"/>
<field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/>
<field name="value"/>
<label for="value_amount" string="Amount To Pay" attrs="{'invisible':[('value','=','balance')]}"/>
<div attrs="{'invisible':[('value','=','balance')]}">
<field name="value_amount" class="oe_inline"/>
<label string="%%" class="oe_inline" attrs="{'invisible':['!',('value','=','procent')]}" />
</div>
</group>
<group string="Due Date Computation">
<field name="days"/>
<field name="days2"/>
</group>
</group>
<separator string="Example"/>
<label string="At 14 net days 2 percent, remaining amount at 30 days end of month."/>
<group>
<label string="Line 1:" colspan="2"/>
<label string=" Valuation: Percent"/>
<label string=" Number of Days: 14"/>
<label string=" Value amount: 0.02"/>
<label string=" Day of the Month: 0"/>
</group>
<group>
<label string="Line 2:" colspan="2"/>
<label string=" Valuation: Balance"/>
<label string=" Number of Days: 30"/>
<label string=" Value amount: n.a"/>
<label string=" Day of the Month= -1"/>
</group>
</form>
</field>
</record>
@ -1616,7 +1597,7 @@
<field name="name"/>
<field name="active"/>
</group>
<field name="note" placeholder="Note for the invoice..."/>
<field name="note" placeholder="Payment term explanation for the customer..."/>
<separator string="Computation"/>
<field name="line_ids"/>
</form>

View File

@ -10,17 +10,33 @@
<!--
Payment term
-->
<record id="account_payment_term" model="account.payment.term">
<field name="name">30 Days End of Month</field>
<field name="note">30 Days End of Month</field>
<record id="account_payment_term_immediate" model="account.payment.term">
<field name="name">Immediate Payment</field>
<field name="note">Immediate Payment</field>
</record>
<record id="account_payment_term_line" model="account.payment.term.line">
<field name="name">30 Days End of Month</field>
<record id="account_payment_term_line_immediate" model="account.payment.term.line">
<field name="name">Immediate Payment</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="-1" name="days2"/>
<field eval="account_payment_term" name="payment_id"/>
<field eval="0" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_immediate" name="payment_id"/>
</record>
<record id="account_payment_term_15days" model="account.payment.term">
<field name="name">15 Days</field>
<field name="note">15 Days</field>
</record>
<record id="account_payment_term_line_15days" model="account.payment.term.line">
<field name="name">15 Days</field>
<field name="value">balance</field>
<field eval="15" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_15days" name="payment_id"/>
</record>
<record forcecreate="True" id="decimal_payment" model="decimal.precision">
<field name="name">Payment Term</field>
<field name="digits">6</field>
@ -30,6 +46,7 @@
<field name="name">30 Net Days</field>
<field name="note">30 Net Days</field>
</record>
<record id="account_payment_term_line_net" model="account.payment.term.line">
<field name="name">30 Net Days</field>
<field name="value">balance</field>
@ -37,28 +54,7 @@
<field eval="0" name="days2"/>
<field eval="account_payment_term_net" name="payment_id"/>
</record>
<record id="account_payment_term_advance" model="account.payment.term">
<field name="name">30% Advance End 30 Days</field>
<field name="note">30% Advance End 30 Days</field>
</record>
<record id="account_payment_term_line_advance1" model="account.payment.term.line">
<field name="name">30% Advance</field>
<field name="value">procent</field>
<field eval="3" name="sequence"/>
<field eval="0.300000" name="value_amount"/>
<field eval="0" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<record id="account_payment_term_line_advance2" model="account.payment.term.line">
<field name="name">Remaining Balance</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="-1" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<!--
Account Journal Sequences
-->

View File

@ -127,6 +127,41 @@
<field eval="time.strftime('%Y')+'-12-31'" name="date_stop"/>
<field name="company_id" ref="base.main_company"/>
</record>
<!-- Payment Term -->
<record id="account_payment_term" model="account.payment.term">
<field name="name">30 Days End of Month</field>
<field name="note">30 Days End of Month</field>
</record>
<record id="account_payment_term_line" model="account.payment.term.line">
<field name="name">30 Days End of Month</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="-1" name="days2"/>
<field eval="account_payment_term" name="payment_id"/>
</record>
<record id="account_payment_term_advance" model="account.payment.term">
<field name="name">30% Advance End 30 Days</field>
<field name="note">30% Advance End 30 Days</field>
</record>
<record id="account_payment_term_line_advance1" model="account.payment.term.line">
<field name="name">30% Advance</field>
<field name="value">procent</field>
<field eval="3" name="sequence"/>
<field eval="0.300000" name="value_amount"/>
<field eval="0" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<record id="account_payment_term_line_advance2" model="account.payment.term.line">
<field name="name">Remaining Balance</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="-1" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<record id="base.user_demo" model="res.users">
<field name="groups_id" eval="[(4,ref('account.group_account_user'))]"/>

View File

@ -29,8 +29,9 @@
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="account_invoices"/>
<field name="report_name">Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p>Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},</p>
@ -73,7 +74,7 @@
<br/>
<br/>
<div style="width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;">
<h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #FFF;">
<h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;">
<strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3>
</div>
<div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;">

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-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-12-05 22:09+0000\n"
"PO-Revision-Date: 2012-12-06 10:40+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\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-12-06 04:40+0000\n"
"X-Launchpad-Export-Date: 2012-12-07 04:35+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account
@ -9891,7 +9891,7 @@ msgstr "Gültig ab"
#. module: account
#: field:account.cashbox.line,pieces:0
msgid "Unit of Currency"
msgstr ""
msgstr "Währungseinheit"
#. module: account
#: code:addons/account/account.py:3137
@ -10019,6 +10019,16 @@ msgid ""
"related journal entries may or may not be reconciled. \n"
"* The 'Cancelled' status is used when user cancel invoice."
msgstr ""
" * Der \"Entwurf\"-Status wird verwendet, wenn ein Benutzer eine Rechnung "
"erstellt, aber noch nicht gebucht hat.\n"
"* Der \"Pro-forma\" Status wird nach dessen Auswahl angezeigt, es wird aber "
"noch keine Rechnungsnummer vergeben. \n"
"* Die Rechnung ist im \"Offen\" Status, wenn Sie gebucht wurde, dadurch eine "
"Rechnungsnummer bekommen hat, aber noch nicht vom Kunden bezahlt wurde. \n"
"* Der\"Bezahlt\"-Status wird automatisch vergeben, wenn die offene Rechnung "
"vom Kunden bezahlt wurde.\n"
"* Eine Anzeige im \"Abgebrochen\"-Status erfolgt immer dann, wenn die "
"Rechnung storniert wurde."
#. module: account
#: field:account.period,date_stop:0
@ -10038,7 +10048,7 @@ msgstr "Finanz Reports"
#. module: account
#: model:account.account.type,name:account.account_type_liability_view1
msgid "Liability View"
msgstr ""
msgstr "Passiva Ansicht"
#. module: account
#: report:account.account.balance:0
@ -10086,7 +10096,7 @@ msgstr "Firmenreferenzen Partner"
#. module: account
#: view:account.invoice:0
msgid "Ask Refund"
msgstr ""
msgstr "Gutschrift anfragen"
#. module: account
#: view:account.move.line:0
@ -10127,12 +10137,12 @@ msgstr "Forderungskonten"
#. module: account
#: field:account.config.settings,purchase_refund_sequence_prefix:0
msgid "Supplier credit note sequence"
msgstr ""
msgstr "Nummernfolge Lieferantengutschrift"
#. module: account
#: field:account.config.settings,purchase_sequence_next:0
msgid "Next supplier invoice number"
msgstr ""
msgstr "Nächste Eingangsrechnung"
#. module: account
#: help:account.config.settings,module_account_payment:0
@ -10144,6 +10154,12 @@ msgid ""
"payments.\n"
" This installs the module account_payment."
msgstr ""
"Sie können Zahlungsaufträge erstellen und verwalten , um\n"
"                     * diese als Grundlage für externe Erweiterungen zur "
"Automatisierung von Zahlungen zu nutzen. \n"
"                     * dadurch den Rechnungsausgleich von Lieferanten und "
"andere Kreditoren durchzuführen.\n"
"                 Es erfolgt eine Installation des Moduls account_payment."
#. module: account
#: xsl:account.transfer:0
@ -10162,6 +10178,7 @@ msgstr "Bankauszüge"
#, python-format
msgid "To reconcile the entries company should be the same for all entries."
msgstr ""
"Das Unternehmen sollte für alle auszugleichenden Buchungen identisch sein."
#. module: account
#: field:account.account,balance:0
@ -10241,7 +10258,7 @@ msgstr "Filter nach"
#: field:account.cashbox.line,number_closing:0
#: field:account.cashbox.line,number_opening:0
msgid "Number of Units"
msgstr ""
msgstr "Stückzahl"
#. module: account
#: model:process.node,note:account.process_node_manually0
@ -10266,12 +10283,12 @@ msgstr "Buchung"
#: code:addons/account/wizard/account_period_close.py:51
#, python-format
msgid "Invalid Action!"
msgstr ""
msgstr "Diese Aktion ist fehlerhaft!"
#. module: account
#: view:account.bank.statement:0
msgid "Date / Period"
msgstr ""
msgstr "Datum / Periode"
#. module: account
#: report:account.central.journal:0
@ -10464,7 +10481,7 @@ msgstr "Fälligkeitsdatum"
#: code:addons/account/account.py:1459
#, python-format
msgid " Centralisation"
msgstr ""
msgstr " Zusammenfassung"
#. module: account
#: help:account.journal,type:0
@ -10548,7 +10565,7 @@ msgstr "Rechnungsentwürfe"
#: view:cash.box.in:0
#: model:ir.actions.act_window,name:account.action_cash_box_in
msgid "Put Money In"
msgstr ""
msgstr "Zahle Geld ein"
#. module: account
#: selection:account.account.type,close_method:0
@ -10609,7 +10626,7 @@ msgstr "Abrechnen von Analyt. Buchungen"
#. module: account
#: view:account.installer:0
msgid "Configure your Fiscal Year"
msgstr ""
msgstr "Konfiguration Geschäftsjahr"
#. module: account
#: field:account.period,name:0
@ -10623,6 +10640,8 @@ msgid ""
"Selected invoice(s) cannot be cancelled as they are already in 'Cancelled' "
"or 'Done' state."
msgstr ""
"Die ausgewählten Rechnungen können im Status \"abgebrochen\" oder "
"\"bezahlt\" nicht mehr storniert werden."
#. module: account
#: report:account.analytic.account.quantity_cost_ledger:0
@ -10657,6 +10676,10 @@ msgid ""
"some non legal fields or you must unconfirm the journal entry first.\n"
"%s."
msgstr ""
"Sie können keine Änderung bereits erfolgter Buchungen vornehmen. Lediglich "
"unkritische Informationen können ohne weiteres geändert werden, ansonsten "
"ist zunächst die zugrunde liegende Buchung zu stornieren.\n"
"%s."
#. module: account
#: help:account.config.settings,module_account_budget:0
@ -10667,6 +10690,15 @@ msgid ""
"analytic account.\n"
" This installs the module account_budget."
msgstr ""
"Definieren Sie Ihre Kostenstellen und budgetieren Sie die dort relevanten "
"Erfolgskonten.\n"
"                 Sobald Sie die Vorlagen für Ihre anstehenden "
"Budgetplanungen erstellt haben ,\n"
"                 können Ihre verantwortlichen Projektmanager die geplante "
"Beträge für Ihre Kostenstellen\n"
" differenziert nach Erfolgs- und Kostenkonten aufteilen.\n"
"                 Zu diesem Zweck installieren Sie hier das Modul "
"account_budget."
#. module: account
#: help:res.partner,property_account_payable:0
@ -10721,12 +10753,12 @@ msgstr "Haben"
#. module: account
#: view:account.invoice:0
msgid "Draft Invoice "
msgstr ""
msgstr "Entwurf Rechnung "
#. module: account
#: selection:account.invoice.refund,filter_refund:0
msgid "Cancel: create credit note and reconcile"
msgstr ""
msgstr "Abbrechen: Erstelle Gutschrift und Ausgleich"
#. module: account
#: model:ir.ui.menu,name:account.menu_account_general_journal
@ -10827,7 +10859,7 @@ msgstr "Gewinn & Verlust Übertrag"
#: code:addons/account/account_invoice.py:368
#, python-format
msgid "There is no Sale/Purchase Journal(s) defined."
msgstr ""
msgstr "Es wurde noch kein Journal für Verkauf / Einkauf angelegt."
#. module: account
#: view:account.move.line.reconcile.select:0
@ -10905,7 +10937,7 @@ msgstr "Kontotyp"
#. module: account
#: field:account.subscription.generate,date:0
msgid "Generate Entries Before"
msgstr ""
msgstr "Buchungspositionen vorab erstellen"
#. module: account
#: model:ir.actions.act_window,name:account.action_subscription_form_running
@ -11005,6 +11037,8 @@ msgstr "Status"
#: help:product.template,property_account_income:0
msgid "This account will be used to value outgoing stock using sale price."
msgstr ""
"Dieses Konto wird für abgehende Bestände mit dem Verkaufspreis bewertet und "
"gebucht."
#. module: account
#: field:account.invoice,check_total:0
@ -11027,12 +11061,12 @@ msgstr "Bruttobetrag"
#: code:addons/account/wizard/account_invoice_refund.py:109
#, python-format
msgid "Cannot %s draft/proforma/cancel invoice."
msgstr ""
msgstr "Entwurf / Proforma / Abgebrochen Rechnungen können nicht %s werden."
#. module: account
#: field:account.tax,account_analytic_paid_id:0
msgid "Refund Tax Analytic Account"
msgstr ""
msgstr "Kostenstelle für Steuer der Gutschrift"
#. module: account
#: view:account.move.bank.reconcile:0
@ -11099,7 +11133,7 @@ msgstr "Fälligkeitsdatum"
#: field:cash.box.in,name:0
#: field:cash.box.out,name:0
msgid "Reason"
msgstr ""
msgstr "Begründung"
#. module: account
#: selection:account.partner.ledger,filter:0
@ -11157,7 +11191,7 @@ msgstr "Konten ohne Buchung? "
#: code:addons/account/account_move_line.py:1046
#, python-format
msgid "Unable to change tax!"
msgstr ""
msgstr "Eine Änderung der Steuer ist nicht möglich"
#. module: account
#: constraint:account.bank.statement:0
@ -11189,6 +11223,9 @@ msgid ""
"customer. The tool search can also be used to personalise your Invoices "
"reports and so, match this analysis to your needs."
msgstr ""
"Durch diesen Bericht erhalten Sie einen Überblick über die Abrechnungen "
"Ihrer Kunden. Das Suche + Filter Tool kann zur weiteren auf Ihre Bedürfnisse "
"angepassten Analyse angepasst werden."
#. module: account
#: view:account.partner.reconcile.process:0
@ -11209,7 +11246,7 @@ msgstr "Status der Rechnung ist 'Erledigt'"
#. module: account
#: field:account.config.settings,module_account_followup:0
msgid "Manage customer payment follow-ups"
msgstr ""
msgstr "Verwalten Sie Zahlungserinnerungen"
#. module: account
#: model:ir.model,name:account.model_report_account_sales
@ -11285,7 +11322,7 @@ msgstr "Debitoren"
#: code:addons/account/account_move_line.py:776
#, python-format
msgid "Already reconciled."
msgstr ""
msgstr "Bereits ausgeglichen."
#. module: account
#: selection:account.model.line,date_maturity:0
@ -11361,6 +11398,7 @@ msgstr "Gruppiere je Monat des Rechnungsdatums"
#, python-format
msgid "There is no income account defined for this product: \"%s\" (id:%d)."
msgstr ""
"Es wurde kein Ertragskonto für dieses Produkt definiert: \"%s\" (Kürzel: %d)."
#. module: account
#: model:ir.actions.act_window,name:account.action_aged_receivable_graph
@ -11423,6 +11461,8 @@ msgid ""
"The selected unit of measure is not compatible with the unit of measure of "
"the product."
msgstr ""
"Die ausgewählte Mengeneinheit ist nicht mit derjenigen für das Produkt "
"kompatibel."
#. module: account
#: view:account.fiscal.position:0
@ -11446,6 +11486,17 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
"                 Klicken Sie um neue Steuern zu definieren.\n"
"               </ p>\n"
"                 Je nach Land, ist eine Steuer in der Regel ein Wert in "
"Ihrer \n"
"                 Umsatzsteuererklärung. OpenERP ermöglicht die Definition\n"
"                 von Steuerstrukturen, damit sämtliche Steuerberechnungen \n"
" und Buchungen dann in einer oder mehrerer Positionen für \n"
" die Voranmeldung bzw. Steuererklärung auftauchen.\n"
"               </ p>\n"
" "
#. module: account
#: selection:account.entries.report,month:0
@ -11472,6 +11523,22 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
"                 Wählen Sie Periode und Journal für Ihre Buchungen.\n"
"               </ p>\n"
"                 Diese Ansicht kann von Wirtschaftsprüfern und "
"Steuerberatern genutzt werden, \n"
" um schnellstmöglich Buchungen in OpenERP von außen "
"einzugeben. Wenn Sie eine \n"
" Lieferantenrechnung erfassen, beginnen Sie normalerweise "
"mit der Eingabe des \n"
" Aufwandskontos für eine Rechnung. OpenERP wird Ihnen aus "
"dem Kontext des\n"
" Produkts dann automatisch eine Steuer vorschlagen sowie das "
"Gegenkonto für die \n"
" \"Kreditoren\".\n"
"               </ p>\n"
" "
#. module: account
#: help:account.invoice.line,account_id:0
@ -11481,7 +11548,7 @@ msgstr "Aufwand- und Erlöskonto des Produktes"
#. module: account
#: view:account.config.settings:0
msgid "Install more chart templates"
msgstr ""
msgstr "Installieren Sie weitere Kontenpläne"
#. module: account
#: report:account.general.journal:0
@ -11529,6 +11596,8 @@ msgid ""
"You cannot remove/deactivate an account which is set on a customer or "
"supplier."
msgstr ""
"Sie können keine Konten deaktivieren, die bereits einem Kunden oder "
"Lieferanten zugewiesen wurden."
#. module: account
#: model:ir.model,name:account.model_validate_account_move_lines
@ -11540,6 +11609,8 @@ msgstr "Verbuche Buchungszeilen"
msgid ""
"The fiscal position will determine taxes and accounts used for the partner."
msgstr ""
"Die Steuerzuordnung steuert die zu benutzenden Steuern und Konten für den "
"Partner."
#. module: account
#: model:process.node,note:account.process_node_supplierpaidinvoice0
@ -11573,6 +11644,7 @@ msgstr "Manuelle Berechnung Steuer"
#, python-format
msgid "The payment term of supplier does not have a payment term line."
msgstr ""
"Die Zahlungsbedingung für die Lieferantenrechnung hat keine Zahlungsposition."
#. module: account
#: field:account.account,parent_right:0
@ -11585,7 +11657,7 @@ msgstr "Oberkonto Rechts"
#: code:addons/account/static/src/js/account_move_reconciliation.js:80
#, python-format
msgid "Never"
msgstr ""
msgstr "Niemals"
#. module: account
#: model:ir.model,name:account.model_account_addtmpl_wizard
@ -11606,7 +11678,7 @@ msgstr "Partner"
#. module: account
#: field:account.account,note:0
msgid "Internal Notes"
msgstr ""
msgstr "Interne Hinweise"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_fiscalyear
@ -11639,7 +11711,7 @@ msgstr "Buchungsvorlage"
#: code:addons/account/account_cash_statement.py:292
#, python-format
msgid "Loss"
msgstr ""
msgstr "Verlust"
#. module: account
#: selection:account.entries.report,month:0
@ -11665,7 +11737,7 @@ msgstr ""
#: view:account.bank.statement:0
#: help:account.cashbox.line,number_closing:0
msgid "Closing Unit Numbers"
msgstr ""
msgstr "Abschluss Bankauszug"
#. module: account
#: field:account.bank.accounts.wizard,bank_account_id:0
@ -11731,7 +11803,7 @@ msgstr ""
#. module: account
#: selection:account.config.settings,tax_calculation_rounding_method:0
msgid "Round per line"
msgstr ""
msgstr "Runden per Zeile"
#. module: account
#: help:account.move.line,amount_residual_currency:0

View File

@ -7,15 +7,15 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-12-03 20:35+0000\n"
"PO-Revision-Date: 2012-12-07 15:21+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-12-04 05:21+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account
#: code:addons/account/wizard/account_fiscalyear_close.py:41
@ -184,7 +184,7 @@ msgstr ""
#: code:addons/account/static/src/xml/account_move_reconciliation.xml:30
#, python-format
msgid "Reconcile"
msgstr "Lettrer"
msgstr "Let."
#. module: account
#: field:account.bank.statement,name:0
@ -988,12 +988,12 @@ msgstr ""
#. module: account
#: report:account.analytic.account.quantity_cost_ledger:0
msgid "J.C./Move name"
msgstr "J.C. / Nom du mouvement"
msgstr "J.C. / description de l'écriture"
#. module: account
#: view:account.account:0
msgid "Account Code and Name"
msgstr ""
msgstr "Code et Nom du Compte"
#. module: account
#: model:mail.message.subtype,name:account.mt_invoice_new
@ -2993,7 +2993,7 @@ msgstr "Relevés"
#. module: account
#: report:account.analytic.account.journal:0
msgid "Move Name"
msgstr "Nom de la transaction"
msgstr "Description de l'écriture"
#. module: account
#: model:ir.model,name:account.model_account_move_line_reconcile_writeoff
@ -3008,7 +3008,7 @@ msgstr "Ligne d'écriture lettrée (écriture d'écart)"
#: field:account.move.line,account_tax_id:0
#: view:account.tax:0
msgid "Tax"
msgstr "Impôts et taxes"
msgstr "Taxes"
#. module: account
#: view:account.analytic.account:0
@ -4350,7 +4350,7 @@ msgstr ""
#: field:account.move.reconcile,name:0
#: field:account.subscription,name:0
msgid "Name"
msgstr "Nom"
msgstr "Decription"
#. module: account
#: code:addons/account/installer.py:94
@ -4918,7 +4918,7 @@ msgstr "Nom du compte"
#. module: account
#: help:account.fiscalyear.close,report_name:0
msgid "Give name of the new entries"
msgstr "Indique le nom à donner aux nouvelles écritures"
msgstr "Indique la description à donner aux nouvelles écritures"
#. module: account
#: model:ir.model,name:account.model_account_invoice_report
@ -4982,12 +4982,12 @@ msgstr "Le nom de la période doit être unique par société!"
#. module: account
#: help:wizard.multi.charts.accounts,currency_id:0
msgid "Currency as per company's country."
msgstr ""
msgstr "Devise selon le pays de la société"
#. module: account
#: view:account.tax:0
msgid "Tax Computation"
msgstr ""
msgstr "Calcul des taxes"
#. module: account
#: view:wizard.multi.charts.accounts:0
@ -6246,7 +6246,7 @@ msgstr "Comptes fils"
#: code:addons/account/account_move_line.py:1107
#, python-format
msgid "Move name (id): %s (%s)"
msgstr "Nom du mouvement (id): %s (%s)"
msgstr "Description de l'écriture (id): %s (%s)"
#. module: account
#: view:account.move.line.reconcile:0
@ -6258,7 +6258,7 @@ msgstr "Ajustement"
#. module: account
#: field:res.partner,debit:0
msgid "Total Payable"
msgstr "Total à payer"
msgstr "Total "
#. module: account
#: model:account.account.type,name:account.data_account_type_income
@ -7850,7 +7850,7 @@ msgstr ""
#. module: account
#: field:account.fiscalyear.close,report_name:0
msgid "Name of new entries"
msgstr "Nom des nouvelles écritures"
msgstr "Description des nouvelles écritures"
#. module: account
#: view:account.use.model:0
@ -7865,7 +7865,7 @@ msgstr ""
#. module: account
#: help:account.config.settings,currency_id:0
msgid "Main currency of the company."
msgstr ""
msgstr "Devise de a société"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_reports
@ -8843,7 +8843,7 @@ msgstr ""
#: field:account.move.line,reconcile_partial_id:0
#: view:account.move.line.reconcile:0
msgid "Partial Reconcile"
msgstr "Rapprochement partiel"
msgstr "Let.P"
#. module: account
#: model:ir.model,name:account.model_account_analytic_inverted_balance

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-12-06 00:09+0000\n"
"PO-Revision-Date: 2012-12-07 22:37+0000\n"
"Last-Translator: Sergio Corato <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-12-06 04:40+0000\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account
@ -305,6 +305,9 @@ msgid ""
"sales, purchase, expense, contra, etc.\n"
" This installs the module account_voucher."
msgstr ""
"Include tutte le funzioni basilari per le registrazioni dei pagamenti per "
"banca, cassa, vendite, acquisti, costi, contra, ecc.\n"
" Installa il modulo account_voucher."
#. module: account
#: model:ir.actions.act_window,name:account.action_account_use_model_create_entry
@ -481,6 +484,14 @@ msgid ""
"this box, you will be able to do invoicing & payments,\n"
" but not accounting (Journal Items, Chart of Accounts, ...)"
msgstr ""
"Permette di gestire le immobilizzazioni possedute da un'azienda o da una "
"persona.\n"
" Tiene traccia del deprezzamento di queste immobilizzazioni, e "
"crea movimenti contabili per queste righe di ammortamento.\n"
" Installa il modulo account_asset. Se non viene selezionata "
"questa casella, sarà possibile effettuare fatture e pagamenti,\n"
" ma non contabilizzarli (Registrazioni nel Sezionale, Piano "
"dei Conti, ...)"
#. module: account
#. openerp-web
@ -509,6 +520,17 @@ msgid ""
"should choose 'Round per line' because you certainly want the sum of your "
"tax-included line subtotals to be equal to the total amount with taxes."
msgstr ""
"Se è selezionato 'Arrotondamento per Riga' : per ogni imposta, l'ammontare "
"dell'imposta sarà prima calcolato e arrotondato per ogni riga di Ordine "
"d'aquisto/Ordine di vendita/fattura e poi questi ammontari arrotondati "
"saranno sommati, formando quindi l'ammontare totale per quella tassa. Se è "
"selezionato 'Arrotondamento sul Totale': per ogni imposta, il totale "
"dell'imposta sarà calcolato per ogni riga di Ordine d'aquisto/Ordine di "
"vendita/fattura, poi questi ammontari saranno sommati e infine questo somma "
"totale sarà arrotondata. Se le vendite vengono effettuate con l'imposta "
"compresa, sarebbe meglio selezionare 'Arrotondamento per riga' perchè "
"l'ammontare totale dei sub-totali delle righe compreso l'imposta sarà uguale "
"al totale imposte comprese."
#. module: account
#: model:ir.model,name:account.model_wizard_multi_charts_accounts
@ -1895,7 +1917,7 @@ msgstr ""
"dell'imposta sarà prima calcolato e arrotondato per ogni riga di Ordine "
"d'aquisto/Ordine di vendita/fattura e poi questi ammontari arrotondati "
"saranno sommati, formando quindi l'ammontare totale per quella tassa. Se è "
"selezionato 'Arrotondamento Globale': per ogni imposta, il totale "
"selezionato 'Arrotondamento sul Totale': per ogni imposta, il totale "
"dell'imposta sarà calcolato per ogni riga di Ordine d'aquisto/Ordine di "
"vendita/fattura, poi questi ammontari saranno sommati e infine questo somma "
"totale sarà arrotondata. Se le vendite vengono effettuate con l'imposta "
@ -2039,6 +2061,108 @@ msgid ""
"</div>\n"
" "
msgstr ""
"\n"
"\\n\n"
"<div style=\\\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-"
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, "
"255, 255); \\\">\\n\n"
"\\n\n"
" <p>Buongiorno${object.partner_id.name and ' ' or "
"''}${object.partner_id.name or ''},</p>\\n\n"
"\\n\n"
" <p>E' disponibile una nuova fattura: </p>\\n\n"
" \\n\n"
" <p style=\\\"border-left: 1px solid #8e0000; margin-left: 30px;\\\">\\n\n"
" &nbsp;&nbsp;<strong>RIFERIMENTO</strong><br />\\n\n"
" &nbsp;&nbsp;Numero fattura: <strong>${object.number}</strong><br />\\"
"n\n"
" &nbsp;&nbsp;Totale fattura: <strong>${object.amount_total} "
"${object.currency_id.name}</strong><br />\\n\n"
" &nbsp;&nbsp;Data fattura: ${object.date_invoice}<br />\\n\n"
" % if object.origin:\\n\n"
" &nbsp;&nbsp;Rif. ordine: ${object.origin}<br />\\n\n"
" % endif\\n\n"
" % if object.user_id:\\n\n"
" &nbsp;&nbsp;Vs. contatto: <a href=\\\"mailto:${object.user_id.email "
"or ''}?subject=Invoice%20${object.number}\\\">${object.user_id.name}</a>\\n\n"
" % endif\\n\n"
" </p> \\n\n"
" \\n\n"
" % if object.company_id.paypal_account and object.type in ('out_invoice', "
"'in_refund'):\\n\n"
" <% \\n\n"
" comp_name = quote(object.company_id.name)\\n\n"
" inv_number = quote(object.number)\\n\n"
" paypal_account = quote(object.company_id.paypal_account)\\n\n"
" inv_amount = quote(str(object.residual))\\n\n"
" cur_name = quote(object.currency_id.name)\\n\n"
" paypal_url = \\\"https://www.paypal.com/cgi-"
"bin/webscr?cmd=_xclick&amp;business=%s&amp;item_name=%s%%20Invoice%%20%s&amp;"
"\\\" \\\\\\n\n"
" \\"
"\"invoice=%s&amp;amount=%s&amp;currency_code=%s&amp;button_subtype=services&a"
"mp;no_note=1&amp;bn=OpenERP_Invoice_PayNow_%s\\\" % \\\\\\n\n"
" "
"(paypal_account,comp_name,inv_number,inv_number,inv_amount,cur_name,cur_name)"
"\\n\n"
" %>\\n\n"
" <br/>\\n\n"
" <p>E' possibile anche pagare direttamente con Paypal:</p>\\n\n"
" <a style=\\\"margin-left: 120px;\\\" href=\\\"${paypal_url}\\\">\\n\n"
" <img class=\\\"oe_edi_paypal_button\\\" src=\\"
"\"https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif\\\"/>\\n\n"
" </a>\\n\n"
" % endif\\n\n"
" \\n\n"
" <br/>\\n\n"
" <p>Per qualsiasi informazione, non esitate a contattarci.</p>\\n\n"
" <p>Grazie per aver scelto ${object.company_id.name or 'us'}!</p>\\n\n"
" <br/>\\n\n"
" <br/>\\n\n"
" <div style=\\\"width: 375px; margin: 0px; padding: 0px; background-"
"color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: "
"5px 5px; background-repeat: repeat no-repeat;\\\">\\n\n"
" <h3 style=\\\"margin: 0px; padding: 2px 14px; font-size: 12px; "
"color: #FFF;\\\">\\n\n"
" <strong style=\\\"text-transform:uppercase;\\"
"\">${object.company_id.name}</strong></h3>\\n\n"
" </div>\\n\n"
" <div style=\\\"width: 347px; margin: 0px; padding: 5px 14px; line-"
"height: 16px; background-color: #F2F2F2;\\\">\\n\n"
" <span style=\\\"color: #222; margin-bottom: 5px; display: block; \\"
"\">\\n\n"
" % if object.company_id.street:\\n\n"
" ${object.company_id.street}<br/>\\n\n"
" % endif\\n\n"
" % if object.company_id.street2:\\n\n"
" ${object.company_id.street2}<br/>\\n\n"
" % endif\\n\n"
" % if object.company_id.city or object.company_id.zip:\\n\n"
" ${object.company_id.zip} ${object.company_id.city}<br/>\\n\n"
" % endif\\n\n"
" % if object.company_id.country_id:\\n\n"
" ${object.company_id.state_id and ('%s, ' % "
"object.company_id.state_id.name) or ''} ${object.company_id.country_id.name "
"or ''}<br/>\\n\n"
" % endif\\n\n"
" </span>\\n\n"
" % if object.company_id.phone:\\n\n"
" <div style=\\\"margin-top: 0px; margin-right: 0px; margin-"
"bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-"
"bottom: 0px; padding-left: 0px; \\\">\\n\n"
" Tel.:&nbsp; ${object.company_id.phone}\\n\n"
" </div>\\n\n"
" % endif\\n\n"
" % if object.company_id.website:\\n\n"
" <div>\\n\n"
" Web :&nbsp;<a href=\\\"${object.company_id.website}\\"
"\">${object.company_id.website}</a>\\n\n"
" </div>\\n\n"
" %endif\\n\n"
" <p></p>\\n\n"
" </div>\\n\n"
"</div>\\n\n"
" "
#. module: account
#: field:account.tax.code,sum:0
@ -2407,7 +2531,7 @@ msgstr "Chiusura Anno Fiscale"
#: code:addons/account/static/src/xml/account_move_line_quickadd.xml:14
#, python-format
msgid "Journal :"
msgstr ""
msgstr "Sezionale :"
#. module: account
#: sql_constraint:account.fiscal.position.tax:0
@ -3032,7 +3156,7 @@ msgstr "Movimento contabile di riconciliazione (storno)"
#: field:account.move.line,account_tax_id:0
#: view:account.tax:0
msgid "Tax"
msgstr "Tassa"
msgstr "Imposta"
#. module: account
#: view:account.analytic.account:0
@ -3272,12 +3396,14 @@ msgid ""
"Selected invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-"
"Forma' state."
msgstr ""
"La fattura(/e) selezionata non possono essere confermate perché non sono in "
"stato 'Bozza' o 'Proforma'."
#. module: account
#: code:addons/account/account.py:1056
#, python-format
msgid "You should choose the periods that belong to the same company."
msgstr ""
msgstr "I periodi dovrebbero appartenere alla stessa azienda."
#. module: account
#: model:ir.actions.act_window,name:account.action_report_account_sales_tree_all
@ -3290,7 +3416,7 @@ msgstr "Vendite per conto"
#: code:addons/account/account.py:1406
#, python-format
msgid "You cannot delete a posted journal entry \"%s\"."
msgstr ""
msgstr "Non è possibile cancellare una registrazione contabilizzata \"%s\"."
#. module: account
#: view:account.invoice:0
@ -3317,6 +3443,8 @@ msgid ""
"This journal already contains items, therefore you cannot modify its company "
"field."
msgstr ""
"Questo sezionale contiene già registrazioni, perciò non è possibile "
"modificare i campi aziendali."
#. module: account
#: code:addons/account/account.py:408
@ -3325,6 +3453,8 @@ msgid ""
"You need an Opening journal with centralisation checked to set the initial "
"balance."
msgstr ""
"E' necessario un Sezionale di apertura configurato con la centralizzazione "
"per configurare il saldo iniziale."
#. module: account
#: model:ir.actions.act_window,name:account.action_tax_code_list
@ -3362,7 +3492,7 @@ msgstr "Agosto"
#. module: account
#: field:accounting.report,debit_credit:0
msgid "Display Debit/Credit Columns"
msgstr ""
msgstr "Visualizza colonne Debito/Credito"
#. module: account
#: selection:account.entries.report,month:0
@ -4057,6 +4187,10 @@ msgid ""
"You cannot modify a posted entry of this journal.\n"
"First you should set the journal to allow cancelling entries."
msgstr ""
"Non è possibile modificare una registrazione contabilizzata in questo "
"sezionale.\n"
"Prima è necessario configurare il sezionale per permettere l'eliminazione "
"delle registrazioni."
#. module: account
#: model:ir.actions.act_window,name:account.action_account_print_sale_purchase_journal
@ -4081,6 +4215,8 @@ msgid ""
"There is no fiscal year defined for this date.\n"
"Please create one from the configuration of the accounting menu."
msgstr ""
"Non c'è alcun anno fiscale definito per questa data.\n"
"Crearne uno dalla configurazione del menu contabilità."
#. module: account
#: view:account.addtmpl.wizard:0
@ -4392,12 +4528,12 @@ msgstr "Nessuna azienda non configurata !"
#. module: account
#: field:res.company,expects_chart_of_accounts:0
msgid "Expects a Chart of Accounts"
msgstr ""
msgstr "Necessario un Piano dei Conti"
#. module: account
#: model:mail.message.subtype,name:account.mt_invoice_paid
msgid "paid"
msgstr ""
msgstr "pagato"
#. module: account
#: field:account.move.line,date:0
@ -4408,7 +4544,7 @@ msgstr "Data effettiva"
#: code:addons/account/wizard/account_fiscalyear_close.py:100
#, python-format
msgid "The journal must have default credit and debit account."
msgstr ""
msgstr "Il sezionale deve avere un conto di credito e di debito di default."
#. module: account
#: model:ir.actions.act_window,name:account.action_bank_tree
@ -4420,11 +4556,13 @@ msgstr "Configurazione conti bancari"
#: selection:account.invoice.refund,filter_refund:0
msgid "Modify: create credit note, reconcile and create a new draft invoice"
msgstr ""
"Modificare: crea una nota di credito, riconcilia e crea una nuova bozza di "
"fattura"
#. module: account
#: xsl:account.transfer:0
msgid "Partner ID"
msgstr ""
msgstr "Partner ID"
#. module: account
#: help:account.bank.statement,message_ids:0
@ -5415,7 +5553,7 @@ msgstr "Scritture da rivedere"
#. module: account
#: selection:res.company,tax_calculation_rounding_method:0
msgid "Round Globally"
msgstr "Arrotonda Globalmente"
msgstr "Arrotondamento sul Totale"
#. module: account
#: field:account.bank.statement,message_comment_ids:0
@ -5510,7 +5648,7 @@ msgstr ""
#. module: account
#: model:res.groups,name:account.group_account_manager
msgid "Financial Manager"
msgstr ""
msgstr "Manager Finanziario"
#. module: account
#: field:account.journal,group_invoice_lines:0
@ -5544,6 +5682,9 @@ msgid ""
"If you do not check this box, you will be able to do invoicing & payments, "
"but not accounting (Journal Items, Chart of Accounts, ...)"
msgstr ""
"Se questa casella non è selezionata, sarà possibile creare fatture e "
"pagamenti, ma non contabilizzarli (Registrazioni nel sezionale, Piani dei "
"Conti, ...)"
#. module: account
#: view:account.period:0
@ -5577,6 +5718,8 @@ msgid ""
"There is no period defined for this date: %s.\n"
"Please create one."
msgstr ""
"Non c'è alcun periodo definito per questa data: %s.\n"
"Crearne uno."
#. module: account
#: help:account.tax,price_include:0
@ -5705,7 +5848,7 @@ msgstr "Anno"
#. module: account
#: help:account.invoice,sent:0
msgid "It indicates that the invoice has been sent."
msgstr ""
msgstr "Indica che la fattura è stata spedita."
#. module: account
#: view:account.payment.term.line:0
@ -5725,11 +5868,14 @@ msgid ""
"Put a sequence in the journal definition for automatic numbering or create a "
"sequence manually for this piece."
msgstr ""
"Non è possibile creare una sequenza automatica per questo codice.\n"
"Inserire una sequenza nella configurazione del sezionale per la numerazione "
"automatica o creare una sequenza manualmente per questo codice."
#. module: account
#: view:account.invoice:0
msgid "Pro Forma Invoice "
msgstr ""
msgstr "Fattura Proforma "
#. module: account
#: selection:account.subscription,period_type:0
@ -5795,6 +5941,8 @@ msgstr "Codice calcolo (se tipo=codice)"
msgid ""
"Cannot find a chart of accounts for this company, you should create one."
msgstr ""
"Non è possibile trovare un piano dei conti per questa azienda, è necessario "
"crearne uno."
#. module: account
#: selection:account.analytic.journal,type:0
@ -5854,6 +6002,8 @@ msgid ""
"Holds the Chatter summary (number of messages, ...). This summary is "
"directly in html format in order to be inserted in kanban views."
msgstr ""
"Gestisce il sommario (numero di messaggi, ...) di Chatter. Questo sommario è "
"direttamente in html così da poter essere inserito nelle viste kanban."
#. module: account
#: field:account.tax,child_depend:0
@ -5917,13 +6067,15 @@ msgstr "account.installer"
#. module: account
#: view:account.invoice:0
msgid "Recompute taxes and total"
msgstr ""
msgstr "Ricalcola imposte e totale"
#. module: account
#: code:addons/account/account.py:1097
#, python-format
msgid "You cannot modify/delete a journal with entries for this period."
msgstr ""
"Non è possibile modificare/eliminare un sezionale che ha registrazioni in "
"questo periodo."
#. module: account
#: field:account.tax.template,include_base_amount:0
@ -5933,7 +6085,7 @@ msgstr "Incluso nell'imponibile"
#. module: account
#: field:account.invoice,supplier_invoice_number:0
msgid "Supplier Invoice Number"
msgstr ""
msgstr "Numero Fattura Fornitore"
#. module: account
#: help:account.payment.term.line,days:0
@ -5955,6 +6107,8 @@ msgstr "Calcolo ammontare"
#, python-format
msgid "You can not add/modify entries in a closed period %s of journal %s."
msgstr ""
"Non è possibile aggiungere/modificare registrazioni in un periodo chiuso %s "
"del sezionale %s."
#. module: account
#: view:account.journal:0
@ -5979,7 +6133,7 @@ msgstr "Inizio Periodo"
#. module: account
#: model:account.account.type,name:account.account_type_asset_view1
msgid "Asset View"
msgstr ""
msgstr "Vista Immobilizzazioni"
#. module: account
#: model:ir.model,name:account.model_account_common_account_report
@ -6055,12 +6209,12 @@ msgstr "Registrazioni di sezionale di fine anno"
#. module: account
#: view:account.invoice:0
msgid "Draft Refund "
msgstr ""
msgstr "Bozza Rimborso "
#. module: account
#: view:cash.box.in:0
msgid "Fill in this form if you put money in the cash register:"
msgstr ""
msgstr "Compilare questo form se viene immesso contante nel registro cassa:"
#. module: account
#: field:account.payment.term.line,value_amount:0
@ -6143,7 +6297,7 @@ msgstr "Importo valuta"
#. module: account
#: selection:res.company,tax_calculation_rounding_method:0
msgid "Round per Line"
msgstr ""
msgstr "Arrotondamento per Riga"
#. module: account
#: report:account.analytic.account.balance:0
@ -6200,7 +6354,7 @@ msgstr ""
#: code:addons/account/wizard/account_report_aged_partner_balance.py:56
#, python-format
msgid "You must set a period length greater than 0."
msgstr ""
msgstr "E' necessario impostare una durata del periodo maggiore di 0."
#. module: account
#: view:account.fiscal.position.template:0
@ -6211,7 +6365,7 @@ msgstr "Modelli di \"posizioni fiscali\""
#. module: account
#: view:account.invoice:0
msgid "Draft Refund"
msgstr ""
msgstr "Bozza Rimborso"
#. module: account
#: view:account.analytic.chart:0
@ -6249,6 +6403,8 @@ msgstr "Riconcilia Con Storno"
#: constraint:account.move.line:0
msgid "You cannot create journal items on an account of type view."
msgstr ""
"Non è possibile creare registrazioni nel sezionale con un conto di tipo "
"vista."
#. module: account
#: selection:account.payment.term.line,value:0
@ -6262,6 +6418,8 @@ msgstr "Importo fissato"
#, python-format
msgid "You cannot change the tax, you should remove and recreate lines."
msgstr ""
"Non è possibile cambiare l'imposta, è necessario rimuoverla e ricreare le "
"righe."
#. module: account
#: model:ir.actions.act_window,name:account.action_account_automatic_reconcile
@ -6386,7 +6544,7 @@ msgstr "Corrispondenza imposte"
#. module: account
#: view:account.config.settings:0
msgid "Select Company"
msgstr ""
msgstr "Selezionare Azienda"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_state_open
@ -6460,7 +6618,7 @@ msgstr "# di Linee"
#. module: account
#: view:account.invoice:0
msgid "(update)"
msgstr ""
msgstr "(aggiornare)"
#. module: account
#: field:account.aged.trial.balance,filter:0
@ -6587,7 +6745,7 @@ msgstr "Azienda collegata a questo sezionale."
#. module: account
#: help:account.config.settings,group_multi_currency:0
msgid "Allows you multi currency environment"
msgstr ""
msgstr "Permette una gestione multivaluta"
#. module: account
#: view:account.subscription:0
@ -6670,7 +6828,7 @@ msgstr "Voce conto analitico"
#. module: account
#: model:ir.ui.menu,name:account.menu_action_model_form
msgid "Models"
msgstr ""
msgstr "Modelli"
#. module: account
#: code:addons/account/account_invoice.py:1090
@ -6679,6 +6837,8 @@ msgid ""
"You cannot cancel an invoice which is partially paid. You need to "
"unreconcile related payment entries first."
msgstr ""
"Non è possibile eliminare una fattura che è parzialmente pagata. E' "
"necessario prima annullare la riconciliazione dei relativi pagamenti."
#. module: account
#: field:product.template,taxes_id:0
@ -6763,7 +6923,7 @@ msgstr "Mostra semplicemente i sottoconti"
#. module: account
#: view:account.config.settings:0
msgid "Bank & Cash"
msgstr ""
msgstr "Banca e Cassa"
#. module: account
#: help:account.fiscalyear.close.state,fy_id:0
@ -6849,13 +7009,15 @@ msgstr "Crediti"
#. module: account
#: constraint:account.move.line:0
msgid "You cannot create journal items on closed account."
msgstr ""
msgstr "Non è possibile creare registrazioni contabili su conti chiusi."
#. module: account
#: code:addons/account/account_invoice.py:594
#, python-format
msgid "Invoice line account's company and invoice's compnay does not match."
msgstr ""
"Il conto dell'azienda delle righe della fattura non coincide con l'azienda "
"emittente la fattura."
#. module: account
#: view:account.invoice:0
@ -6876,7 +7038,7 @@ msgstr "La valuta del conto non e' eguale a quella dell'azienda."
#: code:addons/account/installer.py:48
#, python-format
msgid "Custom"
msgstr ""
msgstr "Personalizzazioni"
#. module: account
#: view:account.analytic.account:0
@ -6887,7 +7049,7 @@ msgstr "Correnti"
#: code:addons/account/account_invoice.py:1305
#, python-format
msgid "Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)."
msgstr ""
msgstr "La fattura '%s' è parzialmente pagata: %s%s di %s%s (%s%s residuo)."
#. module: account
#: field:account.journal,cashbox_line_ids:0
@ -6903,7 +7065,7 @@ msgstr "Capitale"
#. module: account
#: field:account.journal,internal_account_id:0
msgid "Internal Transfers Account"
msgstr ""
msgstr "Conto Trasferimenti Interni"
#. module: account
#: code:addons/account/wizard/pos_box.py:33
@ -6920,7 +7082,7 @@ msgstr "Percentuale"
#. module: account
#: selection:account.config.settings,tax_calculation_rounding_method:0
msgid "Round globally"
msgstr ""
msgstr "Arrotondamento sul Totale"
#. module: account
#: selection:account.report.general.ledger,sortby:0
@ -6952,7 +7114,7 @@ msgstr "Numero fattura"
#. module: account
#: field:account.bank.statement,difference:0
msgid "Difference"
msgstr ""
msgstr "Differenza"
#. module: account
#: help:account.tax,include_base_amount:0
@ -7021,12 +7183,12 @@ msgstr ""
#: code:addons/account/wizard/account_report_aged_partner_balance.py:58
#, python-format
msgid "User Error!"
msgstr ""
msgstr "Errore Utente!"
#. module: account
#: view:account.open.closed.fiscalyear:0
msgid "Discard"
msgstr ""
msgstr "Annulla"
#. module: account
#: selection:account.account,type:0
@ -7044,7 +7206,7 @@ msgstr "Voci Giornale Analitico"
#. module: account
#: field:account.config.settings,has_default_company:0
msgid "Has default company"
msgstr ""
msgstr "Ha un'azienda di default"
#. module: account
#: view:account.fiscalyear.close:0
@ -7193,6 +7355,8 @@ msgid ""
"Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for "
"2%."
msgstr ""
"Le percentuali delle Righe delle Condizioni di Pagamento devono essere "
"comprese tra 0 e 1, esempio: 0.02 per 2%."
#. module: account
#: report:account.invoice:0
@ -7213,7 +7377,7 @@ msgstr "Conto Categoria Costi"
#. module: account
#: sql_constraint:account.tax:0
msgid "Tax Name must be unique per company!"
msgstr ""
msgstr "Il nome dell'imposta deve essere unico per azienda!"
#. module: account
#: view:account.bank.statement:0
@ -7253,12 +7417,14 @@ msgid ""
"You cannot provide a secondary currency if it is the same than the company "
"one."
msgstr ""
"Non è possibile indicare una valuta secondaria se è la stessa di quella "
"principale."
#. module: account
#: code:addons/account/account_invoice.py:1321
#, python-format
msgid "Customer invoice"
msgstr ""
msgstr "Fattura cliente"
#. module: account
#: selection:account.account.type,report_type:0
@ -7343,13 +7509,13 @@ msgstr "Conto Economico"
#. module: account
#: field:account.bank.statement,total_entry_encoding:0
msgid "Total Transactions"
msgstr ""
msgstr "Transazioni Totali"
#. module: account
#: code:addons/account/account.py:635
#, python-format
msgid "You cannot remove an account that contains journal items."
msgstr ""
msgstr "Non è possibile eliminare un conto con registrazioni contabili."
#. module: account
#: code:addons/account/account_move_line.py:1095
@ -7393,7 +7559,7 @@ msgstr "Manuale"
#: code:addons/account/wizard/account_report_aged_partner_balance.py:58
#, python-format
msgid "You must set a start date."
msgstr ""
msgstr "E' necessario impostare una data iniziale."
#. module: account
#: view:account.automatic.reconcile:0
@ -7442,7 +7608,7 @@ msgstr "Registrazioni Sezionale"
#: code:addons/account/wizard/account_invoice_refund.py:147
#, python-format
msgid "No period found on the invoice."
msgstr ""
msgstr "Nessun periodo trovato nella fattura."
#. module: account
#: help:account.partner.ledger,page_split:0
@ -7488,6 +7654,8 @@ msgstr "Tutte le registrazioni"
#: constraint:account.move.reconcile:0
msgid "You can only reconcile journal items with the same partner."
msgstr ""
"E' possibile solo riconciliare registrazioni contabili con lo stesso "
"partnere."
#. module: account
#: view:account.journal.select:0
@ -7601,7 +7769,7 @@ msgstr ""
#. module: account
#: field:account.config.settings,module_account_voucher:0
msgid "Manage customer payments"
msgstr ""
msgstr "Gestione pagamenti clienti"
#. module: account
#: help:report.invoice.created,origin:0
@ -7620,6 +7788,8 @@ msgid ""
"Error!\n"
"The start date of a fiscal year must precede its end date."
msgstr ""
"Errore!\n"
"La data iniziale di un anno fiscale deve precedere quella finale."
#. module: account
#: view:account.tax.template:0
@ -7635,7 +7805,7 @@ msgstr "Fatture Clienti"
#. module: account
#: view:account.tax:0
msgid "Misc"
msgstr ""
msgstr "Varie"
#. module: account
#: view:account.analytic.line:0
@ -7700,6 +7870,7 @@ msgstr "Documento di origine"
#, python-format
msgid "There is no expense account defined for this product: \"%s\" (id:%d)."
msgstr ""
"Non c'è un conto di costo definito per questo prodotto: \"%s\" (id:%d)."
#. module: account
#: constraint:account.account:0
@ -7717,7 +7888,7 @@ msgstr "Report contabile"
#. module: account
#: field:account.analytic.line,currency_id:0
msgid "Account Currency"
msgstr ""
msgstr "Conto Valuta"
#. module: account
#: report:account.invoice:0
@ -7731,6 +7902,8 @@ msgid ""
"You can not delete an invoice which is not cancelled. You should refund it "
"instead."
msgstr ""
"Non è possibile eliminare una fattura che non è annullata. E' necessario "
"creare invece una nota di credito."
#. module: account
#: help:account.tax,amount:0
@ -7782,7 +7955,7 @@ msgstr "Movimenti aperti su conto di spesa"
#. module: account
#: view:account.invoice:0
msgid "Customer Reference"
msgstr ""
msgstr "Riferimento cliente"
#. module: account
#: field:account.account.template,parent_id:0
@ -7839,7 +8012,7 @@ msgstr "Raggruppare per anno data fattura"
#. module: account
#: field:account.config.settings,purchase_tax_rate:0
msgid "Purchase tax (%)"
msgstr ""
msgstr "Imposta sugli acquisti (%)"
#. module: account
#: help:res.partner,credit:0
@ -7905,7 +8078,7 @@ msgstr "Movimenti Aperti Conto di Ricavo"
#. module: account
#: field:account.config.settings,group_proforma_invoices:0
msgid "Allow pro-forma invoices"
msgstr ""
msgstr "Consentire fatture proforma"
#. module: account
#: view:account.bank.statement:0
@ -7936,12 +8109,12 @@ msgstr "Crea registrazioni"
#. module: account
#: model:ir.model,name:account.model_cash_box_out
msgid "cash.box.out"
msgstr ""
msgstr "cash.box.out"
#. module: account
#: help:account.config.settings,currency_id:0
msgid "Main currency of the company."
msgstr ""
msgstr "Valuta principale di questa azienda."
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_reports
@ -7969,7 +8142,7 @@ msgstr "Sezionale Contabile"
#. module: account
#: field:account.config.settings,tax_calculation_rounding_method:0
msgid "Tax calculation rounding method"
msgstr ""
msgstr "Metodo di arrotondamento delle imposte"
#. module: account
#: model:process.node,name:account.process_node_paidinvoice0
@ -8021,6 +8194,8 @@ msgid ""
"There is no default credit account defined \n"
"on journal \"%s\"."
msgstr ""
"Non c'è un conto di credito di default definito \n"
"nel sezionale \"%s\"."
#. module: account
#: view:account.invoice.line:0
@ -8184,6 +8359,8 @@ msgid ""
"This date will be used as the invoice date for credit note and period will "
"be chosen accordingly!"
msgstr ""
"Questa data sarà usata come data fattura per la nota di credito e il periodo "
"sarà scelto di conseguenza!"
#. module: account
#: view:product.template:0
@ -8197,6 +8374,8 @@ msgid ""
"You have to set a code for the bank account defined on the selected chart of "
"accounts."
msgstr ""
"E' necessario selezionare un codice per il conto bancario definito sul piano "
"dei conti selezionato."
#. module: account
#: model:ir.ui.menu,name:account.menu_manual_reconcile
@ -8278,7 +8457,7 @@ msgstr "Codice"
#. module: account
#: field:account.config.settings,sale_refund_sequence_prefix:0
msgid "Credit note sequence"
msgstr ""
msgstr "Sequenza note di credito"
#. module: account
#: model:ir.actions.act_window,name:account.action_validate_account_move
@ -8292,7 +8471,7 @@ msgstr "Conferma le scritture contabili"
#. module: account
#: field:account.journal,centralisation:0
msgid "Centralised Counterpart"
msgstr ""
msgstr "Contropartita Centralizzata"
#. module: account
#: selection:account.bank.statement.line,type:0
@ -8348,7 +8527,7 @@ msgstr "Sequenza"
#. module: account
#: field:account.config.settings,paypal_account:0
msgid "Paypal account"
msgstr ""
msgstr "Conto Paypal"
#. module: account
#: selection:account.print.journal,sort_selection:0
@ -8367,11 +8546,13 @@ msgid ""
"Error!\n"
"You cannot create recursive accounts."
msgstr ""
"Errore!\n"
"Non è possibile creare conti ricorsivi."
#. module: account
#: model:ir.model,name:account.model_cash_box_in
msgid "cash.box.in"
msgstr ""
msgstr "cash.box.in"
#. module: account
#: help:account.invoice,move_id:0
@ -8381,7 +8562,7 @@ msgstr "Collegamento alle voci del sezionale generate automaticamente."
#. module: account
#: model:ir.model,name:account.model_account_config_settings
msgid "account.config.settings"
msgstr ""
msgstr "account.config.settings"
#. module: account
#: selection:account.config.settings,period:0
@ -8404,7 +8585,7 @@ msgstr "Saldo Calcolato"
#: code:addons/account/static/src/js/account_move_reconciliation.js:89
#, python-format
msgid "You must choose at least one record."
msgstr ""
msgstr "E' necessario selezionare almeno un record."
#. module: account
#: field:account.account,parent_id:0
@ -8479,7 +8660,7 @@ msgstr "Mastro del partner"
#: code:addons/account/account_invoice.py:1340
#, python-format
msgid "%s <b>cancelled</b>."
msgstr ""
msgstr "%s <b>annullato</b>."
#. module: account
#: code:addons/account/account.py:652
@ -8493,12 +8674,12 @@ msgstr "Attenzione !"
#: help:account.bank.statement,message_unread:0
#: help:account.invoice,message_unread:0
msgid "If checked new messages require your attention."
msgstr ""
msgstr "Se selezionato, nuovi messaggi richiedono la tua attenzione"
#. module: account
#: field:res.company,tax_calculation_rounding_method:0
msgid "Tax Calculation Rounding Method"
msgstr ""
msgstr "Metodo di Arrotondamento calcolo Imposte"
#. module: account
#: field:account.entries.report,move_line_state:0
@ -8620,6 +8801,7 @@ msgstr "Bilancio Analitico Invertito -"
msgid ""
"Is this reconciliation produced by the opening of a new fiscal year ?."
msgstr ""
"La riconciliazione è prodotto dall'apertura di un nuovo anno fiscale ?."
#. module: account
#: view:account.analytic.line:0
@ -8693,7 +8875,7 @@ msgstr "Registro Costi"
#. module: account
#: view:account.config.settings:0
msgid "No Fiscal Year Defined for This Company"
msgstr ""
msgstr "Nessun Anno Fiscale Definito per Questa Azienda"
#. module: account
#: view:account.invoice:0
@ -8724,7 +8906,7 @@ msgstr "Sezionale Note di Credito Fornitori"
#: code:addons/account/account.py:1292
#, python-format
msgid "Please define a sequence on the journal."
msgstr ""
msgstr "E' necessario definire una sequenza per il sezionale."
#. module: account
#: help:account.tax.template,amount:0
@ -8753,6 +8935,9 @@ msgid ""
"recalls.\n"
" This installs the module account_followup."
msgstr ""
"Consente di automatizzare le lettere per le fatture non pagate, non richiami "
"multi-livello.\n"
" Installa il modulo account_followup."
#. module: account
#: field:account.automatic.reconcile,period_id:0
@ -8797,12 +8982,12 @@ msgstr "Totale imponibile"
#: code:addons/account/wizard/account_report_common.py:153
#, python-format
msgid "Select a starting and an ending period."
msgstr ""
msgstr "Selezionare un periodo iniziale e uno finale."
#. module: account
#: field:account.config.settings,sale_sequence_next:0
msgid "Next invoice number"
msgstr ""
msgstr "Numero di fattura successivo"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_generic_reporting
@ -8951,7 +9136,7 @@ msgstr "Import automatico dei movimenti bancari"
#: code:addons/account/account_invoice.py:370
#, python-format
msgid "Unknown Error!"
msgstr ""
msgstr "Errore Sconosciuto!"
#. module: account
#: model:ir.model,name:account.model_account_move_bank_reconcile
@ -8961,7 +9146,7 @@ msgstr "Riconciliazione movimenti bancari"
#. module: account
#: view:account.config.settings:0
msgid "Apply"
msgstr ""
msgstr "Conferma"
#. module: account
#: field:account.financial.report,account_type_ids:0
@ -8977,6 +9162,8 @@ msgid ""
"You cannot use this general account in this journal, check the tab 'Entry "
"Controls' on the related journal."
msgstr ""
"Non è possibile usare questo conto generale in questo sezionale, controllare "
"la sezione 'Voci di controllo' nel relativo sezionale."
#. module: account
#: view:account.payment.term.line:0
@ -9189,6 +9376,8 @@ msgstr "Il codice del conto deve essere unico per ogni azienda!"
#: help:product.template,property_account_expense:0
msgid "This account will be used to value outgoing stock using cost price."
msgstr ""
"Questo conto sarà utilizzato per valutare le merci in uscita utilizzando il "
"prezzo di costo."
#. module: account
#: view:account.invoice:0
@ -9226,7 +9415,7 @@ msgstr "Conti consentiti (vuoto per non effettuare nessun controllo)"
#. module: account
#: field:account.config.settings,sale_tax_rate:0
msgid "Sales tax (%)"
msgstr ""
msgstr "Imposta sulle vendite (%)"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_account_tree2
@ -9292,6 +9481,8 @@ msgid ""
"This allows you to check writing and printing.\n"
" This installs the module account_check_writing."
msgstr ""
"Permette di verificare la scrittura e la stampa.\n"
" Installa il modulo account_check_writing."
#. module: account
#: model:res.groups,name:account.group_account_invoice
@ -9369,6 +9560,9 @@ msgid ""
"created. If you leave that field empty, it will use the same journal as the "
"current invoice."
msgstr ""
"E' possibile selezionare qui il sezionale da utilizzare per le note di "
"credito che saranno create. Se questa casella viene lasciata vuota, verrà "
"utilizzato lo stesso sezionale della fattura corrente."
#. module: account
#: help:account.bank.statement.line,sequence:0
@ -9401,7 +9595,7 @@ msgstr "Modello errato !"
#: view:account.tax.code.template:0
#: view:account.tax.template:0
msgid "Tax Template"
msgstr ""
msgstr "Modello Imposta"
#. module: account
#: field:account.invoice.refund,period:0
@ -9421,6 +9615,10 @@ msgid ""
"some non legal fields or you must unreconcile first.\n"
"%s."
msgstr ""
"Non è possibile fare questa modifica su una registrazione riconciliata. E' "
"possibile cambiare solo alcuni campi non fiscali, altrimenti è necessario "
"prima annullare la riconciliazione.\n"
"%s."
#. module: account
#: help:account.financial.report,sign:0
@ -9467,7 +9665,7 @@ msgstr "Le Bozze di fatture sono marcate, convalidate e stampate."
#: field:account.bank.statement,message_is_follower:0
#: field:account.invoice,message_is_follower:0
msgid "Is a Follower"
msgstr ""
msgstr "E' un Follower"
#. module: account
#: view:account.move:0
@ -10480,7 +10678,7 @@ msgstr "Utile (Perdita) da visualizzare"
#: code:addons/account/account_invoice.py:368
#, python-format
msgid "There is no Sale/Purchase Journal(s) defined."
msgstr ""
msgstr "Non c'è un Sezionale(/i) di Vendita/Acquisto definito."
#. module: account
#: view:account.move.line.reconcile.select:0
@ -11396,7 +11594,7 @@ msgstr ""
#. module: account
#: selection:account.config.settings,tax_calculation_rounding_method:0
msgid "Round per line"
msgstr "Arrotonda per riga"
msgstr "Arrotondamento per Riga"
#. module: account
#: help:account.move.line,amount_residual_currency: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-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-12-04 16:27+0000\n"
"PO-Revision-Date: 2012-12-06 14:09+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-12-05 05:20+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-07 04:35+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@ -1137,7 +1137,7 @@ msgstr "科目名称"
#. module: account
#: field:account.journal,with_last_closing_balance:0
msgid "Opening With Last Closing Balance"
msgstr "用末期的期终余额打开"
msgstr "用上个期末余额作期初"
#. module: account
#: help:account.tax.code,notprintable:0
@ -1959,7 +1959,7 @@ msgstr "Pending Accounts"
#. module: account
#: view:account.open.closed.fiscalyear:0
msgid "Cancel Fiscal Year Opening Entries"
msgstr ""
msgstr "取消财务年度未结案分录"
#. module: account
#: report:account.journal.period.print.sale.purchase:0

View File

@ -134,18 +134,23 @@ class res_partner(osv.osv):
return []
having_values = tuple(map(itemgetter(2), args))
where = ' AND '.join(
map(lambda x: '(SUM(debit-credit) %(operator)s %%s)' % {
map(lambda x: '(SUM(bal2) %(operator)s %%s)' % {
'operator':x[1]},args))
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
cr.execute(('SELECT partner_id FROM account_move_line l '\
'WHERE account_id IN '\
'(SELECT id FROM account_account '\
'WHERE type=%s AND active) '\
'AND reconcile_id IS NULL '\
'AND '+query+' '\
'AND partner_id IS NOT NULL '\
'GROUP BY partner_id HAVING '+where),
(type,) + having_values)
cr.execute(('SELECT pid AS partner_id, SUM(bal2) FROM ' \
'(SELECT CASE WHEN bal IS NOT NULL THEN bal ' \
'ELSE 0.0 END AS bal2, p.id as pid FROM ' \
'(SELECT (debit-credit) AS bal, partner_id ' \
'FROM account_move_line l ' \
'WHERE account_id IN ' \
'(SELECT id FROM account_account '\
'WHERE type=%s AND active) ' \
'AND reconcile_id IS NULL ' \
'AND '+query+') AS l ' \
'RIGHT JOIN res_partner p ' \
'ON p.id = partner_id ) AS pl ' \
'GROUP BY pid HAVING ' + where),
(type,) + having_values)
res = cr.fetchall()
if not res:
return [('id','=','0')]

View File

@ -4,6 +4,7 @@
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">product.normal.form.inherit</field>
<field name="model">product.product</field>
<field name="priority">5</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<notebook position="inside">

View File

@ -56,7 +56,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
for report in self.pool.get('account.financial.report').browse(self.cr, self.uid, ids2, context=data['form']['used_context']):
vals = {
'name': report.name,
'balance': report.balance,
'balance': report.balance * report.sign,
'type': 'report',
'level': bool(report.style_overwrite) and report.style_overwrite or report.level,
'account_type': report.type =='sum' and 'view' or False, #used to underline the financial report balances

View File

@ -48,6 +48,7 @@ class report_account_receivable(osv.osv):
_order = 'name desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_account_receivable')
cr.execute("""
create or replace view report_account_receivable as (
select
@ -183,6 +184,7 @@ class report_invoice_created(osv.osv):
_order = 'create_date'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_invoice_created')
cr.execute("""create or replace view report_invoice_created as (
select
inv.id as id, inv.name as name, inv.type as type,

View File

@ -36,7 +36,7 @@ class account_invoice_refund(osv.osv_memory):
'period': fields.many2one('account.period', 'Force period'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the credit note that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
'description': fields.char('Reason', size=128, required=True),
'filter_refund': fields.selection([('refund', 'Create a draft credit note'), ('cancel', 'Cancel: create credit note and reconcile'),('modify', 'Modify: create credit note, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Credit note base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
'filter_refund': fields.selection([('refund', 'Create a draft refund'), ('cancel', 'Cancel: create refund and reconcile'),('modify', 'Modify: create refund, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Refund base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
}
def _get_journal(self, cr, uid, context=None):

View File

@ -40,7 +40,7 @@
</group>
</group>
<footer>
<button string='Create Credit Note' name="invoice_refund" type="object" class="oe_highlight"/>
<button string='Create Refund' name="invoice_refund" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>

View File

@ -24,6 +24,7 @@ from lxml import etree
from osv import fields, osv
from tools.translate import _
from openerp.osv.orm import setup_modifiers
class account_common_report(osv.osv_memory):
_name = "account.common.report"
@ -67,16 +68,16 @@ class account_common_report(osv.osv_memory):
(_check_company_id, 'The fiscalyear, periods or chart of account chosen have to belong to the same company.', ['chart_account_id','fiscalyear_id','period_from','period_to']),
]
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if context is None:context = {}
res = super(account_common_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
if context.get('active_model', False) == 'account.account' and view_id:
if context.get('active_model', False) == 'account.account':
doc = etree.XML(res['arch'])
nodes = doc.xpath("//field[@name='chart_account_id']")
for node in nodes:
node.set('readonly', '1')
node.set('help', 'If you print the report from Account list/form view it will not consider Charts of account')
setup_modifiers(node, res['fields']['chart_account_id'])
res['arch'] = etree.tostring(doc)
return res
@ -121,8 +122,8 @@ class account_common_report(osv.osv_memory):
now = time.strftime('%Y-%m-%d')
company_id = False
ids = context.get('active_ids', [])
if ids:
company_id = self.browse(cr, uid, ids[0], context=context).company_id.id
if ids and context.get('active_model') == 'account.account':
company_id = self.pool.get('account.account').browse(cr, uid, ids[0], context=context).company_id.id
fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now), ('company_id', '=', company_id)], limit=1)
return fiscalyears and fiscalyears[0] or False

View File

@ -45,7 +45,7 @@ Adds menu to show relevant information to each manager.You can also view the rep
'css': [
'static/src/css/analytic.css'
],
'demo': [],
'demo': ['analytic_account_demo.xml'],
'installable': True,
'auto_install': False,
}

View File

@ -8,7 +8,7 @@
<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="context">{'search_default_to_invoice': 1, 'search_default_sales': 1}</field>
<field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
<field name="help" type="html">
<p>
@ -34,7 +34,7 @@
<filter icon="terp-go-today" string="To Renew" domain="['|', '&amp;', ('date', '!=', False), ('date', '&lt;=', time.strftime('%%Y-%%m-%%d')), ('is_overdue_quantity', '=', True)]" name="renew"
help="The contracts to be renewed because the deadline is passed or the working hours are higher than the allocated hours" />
<separator/>
<filter string="Contracts Having a Partner" help="A contract in OpenERP is an analytic account having a partner set on it." name="has_partner" domain="[('partner_id', '!=', False)]" icon="terp-partner" />
<filter string="Customer Contracts" help="A contract in OpenERP is an analytic account having a partner set on it." name="has_partner" domain="[('partner_id', '!=', False)]" icon="terp-partner" />
<separator/>
<filter string="Contracts not assigned" help="Contracts that are not assigned to an account manager." domain="[('user_id', '=', False)]" icon="terp-personal-" />
<field name="partner_id"/>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="account.analytic_consultancy" model="account.analytic.account">
<field name="partner_id" ref="base.res_partner_15"/>
<field name="invoice_on_timesheets">True</field>
<field name="hours_qtt_est">1200</field>
<field name="fix_price_invoices">True</field>
<field name="to_invoice" ref="hr_timesheet_invoice.timesheet_invoice_factor1"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="amount_max">100000</field>
</record>
<record id="sale.sale_order_4" model="sale.order">
<field name="project_id" ref="account.analytic_consultancy"/>
</record>
<record id="hr_timesheet.working_hours_maintenance" model="hr.analytic.timesheet">
<field name="account_id" ref="account.analytic_consultancy"/>
<field name="to_invoice" ref="hr_timesheet_invoice.timesheet_invoice_factor1"/>
<field name="unit_amount">100</field>
</record>
<record id="account.analytic_super_product_trainings" model="account.analytic.account">
<field name="partner_id" ref="base.res_partner_18"/>
<field name="invoice_on_timesheets">True</field>
<field name="hours_qtt_est">500</field>
<field name="fix_price_invoices">True</field>
<field name="pricelist_id" ref="product.list0"/>
<field name="amount_max">50000</field>
<field name="to_invoice" ref="hr_timesheet_invoice.timesheet_invoice_factor1"/>
</record>
<record id="sale.sale_order_6" model="sale.order">
<field name="project_id" ref="account.analytic_super_product_trainings"/>
</record>
<record id="account.analytic_support_internal" model="account.analytic.account">
<field name="use_timesheets">True</field>
<field name="invoice_on_timesheets">True</field>
<field name="hours_qtt_est">100</field>
<field name="pricelist_id" ref="product.list0"/>
<field name="to_invoice" ref="hr_timesheet_invoice.timesheet_invoice_factor1"/>
</record>
</data>
</openerp>

View File

@ -7,14 +7,15 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-02-08 08:41+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"PO-Revision-Date: 2012-12-06 21:29+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\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-12-04 05:34+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-07 04:35+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -24,17 +25,17 @@ msgstr ""
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Group By..."
msgstr "Gruppiere nach..."
msgstr "Gruppierung ..."
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "To Invoice"
msgstr ""
msgstr "Abrechenbar"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Remaining"
msgstr ""
msgstr "Verbleibend"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -58,7 +59,7 @@ msgstr "vorheriger Arbeitstag"
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_to_invoice:0
msgid "Uninvoiced Amount"
msgstr "Nicht berechnete Beträge"
msgstr "Abrechenbarer Betrag"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -69,56 +70,58 @@ msgid ""
"to\n"
" define the customer invoice price rate."
msgstr ""
"Die abzurechnenden Arbeitsstunden werden gemäß der Preisliste des Vertrags "
"für das beim Mitarbeiter hinterlegte Produkt berechnet."
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "⇒ Invoice"
msgstr ""
msgstr "=> Rechnung"
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_invoiced:0
msgid "Invoiced Amount"
msgstr "Rechnungsbetrag"
msgstr "Abgerechnet"
#. module: account_analytic_analysis
#: field:account.analytic.account,last_worked_invoiced_date:0
msgid "Date of Last Invoiced Cost"
msgstr "Datum letzte Berechnung"
msgstr "Datum der letzten Abrechnung"
#. module: account_analytic_analysis
#: help:account.analytic.account,fix_price_to_invoice:0
msgid "Sum of quotations for this contract."
msgstr ""
msgstr "Summe abzurechnende Beträge"
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_invoiced:0
msgid "Total customer invoiced amount for this account."
msgstr "Gesamtbetrag Kundenrechnungen für dieses Konto"
msgstr "Bereits abgerechnete Beträge"
#. module: account_analytic_analysis
#: help:account.analytic.account,timesheet_ca_invoiced:0
msgid "Sum of timesheet lines invoiced for this contract."
msgstr ""
msgstr "Summe abgerechneter Arbeitszeiten"
#. module: account_analytic_analysis
#: help:account.analytic.account,revenue_per_hour:0
msgid "Computed using the formula: Invoiced Amount / Total Time"
msgstr "Berechnet als: Verrechneter Betrag / Gesamt Zeit"
msgstr "Berechnungsformel: Abgerechnete Beträge / Abgerechnete Stunden"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Contracts not assigned"
msgstr ""
msgstr "Nicht unterzeichnete Verträge"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Partner"
msgstr ""
msgstr "Kunde"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Contracts that are not assigned to an account manager."
msgstr "Verträge, die keinem Account Manager zugeordnet sind."
msgstr "Verträge ohne verantwortlichen Mitarbeiter"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,help:account_analytic_analysis.action_account_analytic_overdue
@ -138,11 +141,25 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klicken Sie um neuen Vertrag anzulegen.\n"
" </p><p>\n"
" Sie finden hier die zu verlängernden Verträge, bei denen "
"entweder das terminierte Vertragsende\n"
" bereits überschritten wurde oder die geleistete Arbeitszeit "
"nicht mehr durch die vertraglich vereinbarte abrechenbare Arbeitszeit "
"abgedeckt wird.\n"
" </p><p>\n"
" OpenERP versetzt automatisch die zu erneuernden Verträge in "
"den Status Wiedervorlage. Nach der Erneuerung einer Vereinbarung sollte der "
"Verkäufer den alten Vertrag entweder abschließen oder erneuern. \n"
" </p>\n"
" "
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "End Date"
msgstr "Enddatum"
msgstr "Ende Datum"
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_non_invoiced:0
@ -156,12 +173,12 @@ msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_hours_to_invoice:0
msgid "Computed using the formula: Maximum Time - Total Invoiced Time"
msgstr ""
msgstr "Berechnungsformel: Maximale Zeit - Abgerechnete Zeit"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Expected"
msgstr ""
msgstr "Geplant"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -174,7 +191,7 @@ msgstr "Analytisches Konto"
#. module: account_analytic_analysis
#: help:account.analytic.account,theorical_margin:0
msgid "Computed using the formula: Theoretical Revenue - Total Costs"
msgstr ""
msgstr "Berechnungsformel: Geplanter Umsatz - Gesamte Kosten"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_invoiced:0
@ -204,7 +221,7 @@ msgstr "Marge (%)"
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_hours:0
msgid "Computed using the formula: Maximum Time - Total Worked Time"
msgstr ""
msgstr "Berechnungsformel: Maximale Zeit - Geleistete Zeit"
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_quantity:0
@ -224,17 +241,17 @@ msgstr ""
#: model:ir.actions.act_window,name:account_analytic_analysis.template_of_contract_action
#: model:ir.ui.menu,name:account_analytic_analysis.menu_template_of_contract_action
msgid "Template of Contract"
msgstr ""
msgstr "Vertragsvorlage"
#. module: account_analytic_analysis
#: model:res.groups,name:account_analytic_analysis.group_template_required
msgid "Mandatory use of templates in contracts"
msgstr ""
msgstr "Vertragsvorlage ist verbindlich"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_quantity:0
msgid "Total Worked Time"
msgstr ""
msgstr "Gesamte Arbeitszeit"
#. module: account_analytic_analysis
#: field:account.analytic.account,real_margin:0
@ -244,18 +261,17 @@ msgstr "Realisierte Marge"
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_month
msgid "Hours summary by month"
msgstr "Stundenanzahl pro Monat"
msgstr "Stunden pro Monat"
#. module: account_analytic_analysis
#: help:account.analytic.account,real_margin_rate:0
msgid "Computes using the formula: (Real Margin / Total Costs) * 100."
msgstr ""
"Berechnung nutzt diese Formel: (absolute Gewinnspanne / Gesamtkosten) * 100"
msgstr "Berechnungsformel: (Marge / Gesamte Kosten) * 100"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "or view"
msgstr ""
msgstr "oder Ansicht"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -272,7 +288,7 @@ msgstr "Monat"
#: model:ir.actions.act_window,name:account_analytic_analysis.action_hr_tree_invoiced_all
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_hr_tree_invoiced_all
msgid "Time & Materials to Invoice"
msgstr ""
msgstr "Abrechenbare Zeiten & Sachaufwendungen"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_overdue_all
@ -283,12 +299,12 @@ msgstr "Verträge"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Start Date"
msgstr ""
msgstr "Start Datum"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Invoiced"
msgstr ""
msgstr "Abgerechnet"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -296,8 +312,8 @@ msgid ""
"The contracts to be renewed because the deadline is passed or the working "
"hours are higher than the allocated hours"
msgstr ""
"Der Vertrag muss erneuert werden, das die Frist abgelaufen ist oder die "
"geplanten Stunden überschritten sind"
"Zu erneuernde Verträge, aufgrund Laufzeitende oder Überschreitung der "
"vereinbarten Stunden"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -307,7 +323,7 @@ msgstr "Verträge, die zu erneuern sind"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Timesheets"
msgstr ""
msgstr "Stundenzettel"
#. module: account_analytic_analysis
#: code:addons/account_analytic_analysis/account_analytic_analysis.py:461
@ -328,7 +344,7 @@ msgstr "Überfällige Mengen"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Status"
msgstr ""
msgstr "Status"
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_theorical:0
@ -349,13 +365,12 @@ msgstr "Ein Vertrag ist ein Analyse Konto mit Partner"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_sales_order
msgid "Sales Orders"
msgstr ""
msgstr "Aufträge"
#. module: account_analytic_analysis
#: help:account.analytic.account,last_invoice_date:0
msgid "If invoice from the costs, this is the date of the latest invoiced."
msgstr ""
"Wenn Kosten verrechnet werden, dann ist dies das Datum der letzten Rechnung."
msgstr "Letztmaliges Datum der Kostenabrechnung"
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_theorical:0
@ -364,9 +379,8 @@ msgid ""
"if all these costs have been invoiced at the normal sale price provided by "
"the pricelist."
msgstr ""
"Ausgehend von den entstandenen Projektkosten. Welcher Erlös wäre erzielt "
"worden, wenn diese Kosten auf der Basis der normalen Preisliste des Verkaufs "
"abgerechnet worden wären."
"Theoretischer Erlös, wenn alle Kosten auf Basis der \"Allgemeinen "
"Preisliste\" abgerechnet worden wären."
#. module: account_analytic_analysis
#: field:account.analytic.account,user_ids:0
@ -387,6 +401,16 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klicken Sie zur Erstellung einer Vertragsvorlage.\n"
" </p><p>\n"
" Vorlagen sind vordefinierte Verträge für Projekte, aus "
"denen zur schnellen\n"
"und einfachen Erstellung neuer Vereinbarungen, die zugrundeliegenden "
"Einstellungen und Konditionen\n"
"übernommen werden.\n"
" </p>\n"
" "
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_user
@ -404,6 +428,8 @@ msgid ""
"Allows you to set the template field as required when creating an analytic "
"account or a contract."
msgstr ""
"Bei Erstellung eines Vertrags oder Projekt ist die Verwendung einer Vorlage "
"verpflichtend."
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_invoiced:0
@ -434,16 +460,28 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klicken Sie zur Erstellung eines Vertrags.\n"
" </p><p>\n"
" Setzen Sie Verträge ein, um hierüber Aufgaben, Vorfälle, "
"Stundenzettel oder Abrechnungen \n"
" geleisteter Arbeitszeiten, Personalspesen und/oder "
"Verkaufsaufträge zu verfolgen. OpenERP\n"
" überwacht dabei automatisch, ob Verträge erneuert werden "
"müssen und benachrichtigt den\n"
" zugewiesenen Verkäufer.\n"
" </p>\n"
" "
#. module: account_analytic_analysis
#: field:account.analytic.account,toinvoice_total:0
msgid "Total to Invoice"
msgstr ""
msgstr "Gesamt Abrechnungsbetrag"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Sale Orders"
msgstr ""
msgstr "Verkaufsaufträge"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -453,18 +491,18 @@ msgstr "Offen"
#. module: account_analytic_analysis
#: field:account.analytic.account,invoiced_total:0
msgid "Total Invoiced"
msgstr ""
msgstr "Abgerechneter Betrag"
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_ca:0
msgid "Computed using the formula: Max Invoice Price - Invoiced Amount."
msgstr ""
"Berechnet auf Basis der Formel: Max. Einkaufspreis - Abgerechneter Betrag"
"Berechnungsformel: Geplanter Abrechnungsbetrag - Abgerechneter Betrag"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Responsible"
msgstr ""
msgstr "Projektleiter"
#. module: account_analytic_analysis
#: field:account.analytic.account,last_invoice_date:0
@ -484,16 +522,25 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p>\n"
" Sie finden hier die aufgezeichneten Stundenzettel und "
"eingekauften Sachmittel, \n"
" die für diesen Vertrag abgerechnet werden können. Für neue "
"abzurechnende\n"
" Arbeitszeiten sollten Sie das Menü für die Stundenzettel "
"benutzen.\n"
" </p>\n"
" "
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_non_invoiced:0
msgid "Uninvoiced Time"
msgstr "nicht verrechnete Zeit"
msgstr "Nicht abgerechnete Zeit"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Invoicing"
msgstr "Eingangsrechnung"
msgstr "Abrechnung"
#. module: account_analytic_analysis
#: field:account.analytic.account,total_cost:0
@ -507,6 +554,10 @@ msgid ""
"remaining subtotals which, in turn, are computed as the maximum between "
"'(Estimation - Invoiced)' and 'To Invoice' amounts"
msgstr ""
"Insgesamt verbleibender Abrechnungsbetrag für diesen Vertrag. Der Betrag "
"errechnet sich aus der Summe der Einzelpositionen, sowie im Umkehrschluss "
"aus dem Maximalbetrag der Differenz 'Geplant - Abgerechnet' und "
"'Abzurechnen'."
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_overdue
@ -517,7 +568,7 @@ msgstr "Zu erneuernde Verträge"
#. module: account_analytic_analysis
#: help:account.analytic.account,toinvoice_total:0
msgid " Sum of everything that could be invoiced for this contract."
msgstr ""
msgstr " Summe abzurechnender Beträge für diesen Vertrag"
#. module: account_analytic_analysis
#: field:account.analytic.account,theorical_margin:0
@ -527,22 +578,22 @@ msgstr "Theoretische Marge"
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_total:0
msgid "Total Remaining"
msgstr ""
msgstr "Summe verbleibende Abrechnung"
#. module: account_analytic_analysis
#: help:account.analytic.account,real_margin:0
msgid "Computed using the formula: Invoiced Amount - Total Costs."
msgstr "Berechnet durch die Formel: Rechnungsbetrag - Gesamt Kosten."
msgstr "Berechnungsformel: Rechnungsbetrag - Gesamt Kosten."
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_est:0
msgid "Estimation of Hours to Invoice"
msgstr ""
msgstr "Geplante abzurechnende Stunden"
#. module: account_analytic_analysis
#: field:account.analytic.account,fix_price_invoices:0
msgid "Fixed Price"
msgstr ""
msgstr "Festpreis"
#. module: account_analytic_analysis
#: help:account.analytic.account,last_worked_date:0
@ -557,12 +608,12 @@ msgstr ""
#. module: account_analytic_analysis
#: field:sale.config.settings,group_template_required:0
msgid "Mandatory use of templates."
msgstr ""
msgstr "Zwingende Nutzung von Vorlagen"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Contracts Having a Partner"
msgstr ""
msgstr "Verträge mit Kunden"
#. module: account_analytic_analysis
#: help:account.analytic.account,total_cost:0
@ -577,7 +628,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,est_total:0
msgid "Total Estimation"
msgstr ""
msgstr "Erwartete Gesamtabrechnung"
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_ca:0
@ -605,16 +656,18 @@ msgstr "Gesamtzeit"
msgid ""
"the field template of the analytic accounts and contracts will be required."
msgstr ""
"ein Auswahl für die Projekt Vorlage und Vertragseinstellungen sind "
"erforderlich"
#. module: account_analytic_analysis
#: field:account.analytic.account,invoice_on_timesheets:0
msgid "On Timesheets"
msgstr ""
msgstr "auf Stundenzettel"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Total"
msgstr ""
msgstr "Gesamt"
#~ msgid ""
#~ "Number of hours that can be invoiced plus those that already have been "

View File

@ -7,31 +7,32 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-01-13 19:25+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"PO-Revision-Date: 2012-12-06 22:26+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\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-12-04 05:37+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-07 04:35+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_partner
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_product
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_user
msgid "Analytic Rules"
msgstr "Analytische Kontierungsrichtlinie"
msgstr "Kostenstellen Kontierungsregeln"
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Group By..."
msgstr "Gruppierung..."
msgstr "Gruppierung ..."
#. module: account_analytic_default
#: help:account.analytic.default,date_stop:0
msgid "Default end date for this Analytic Account."
msgstr ""
msgstr "Vorgabe für Ende Datum der Kostenstelle"
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_stock_picking
@ -50,6 +51,9 @@ msgid ""
"default (e.g. create new customer invoice or Sale order if we select this "
"partner, it will automatically take this as an analytic account)"
msgstr ""
"Wählen Sie einen Partner aus, der bereits eine spezifizierte Kostenstelle "
"hat (z.B. durch neu definierte Ausgangsrechnung oder einen Verkaufsauftrag "
"bei einer Auswahl des unterzuordnenden Partners)"
#. module: account_analytic_default
#: view:account.analytic.default:0
@ -60,7 +64,7 @@ msgstr "Produkt"
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_account_analytic_default
msgid "Analytic Distribution"
msgstr "Analytische Verrechnung"
msgstr "Kostenstellen Distribution"
#. module: account_analytic_default
#: view:account.analytic.default:0
@ -86,18 +90,21 @@ msgid ""
"default (e.g. create new customer invoice or Sale order if we select this "
"product, it will automatically take this as an analytic account)"
msgstr ""
"Wählen Sie ein Produkt mit hinterlegter Standard Kostenstelle (z.B. bei der "
"Erstellung einer Ausgangsrechnung oder eines Angebots wird bei der Auswahl "
"des Produkts eine automatische Erkennung der Kostenstelle gestartet)."
#. module: account_analytic_default
#: field:account.analytic.default,date_stop:0
msgid "End Date"
msgstr "Endedatum"
msgstr "Ende Datum"
#. module: account_analytic_default
#: view:account.analytic.default:0
#: model:ir.actions.act_window,name:account_analytic_default.action_analytic_default_list
#: model:ir.ui.menu,name:account_analytic_default.menu_analytic_default_list
msgid "Analytic Defaults"
msgstr "Analytische Buchungsvorlage"
msgstr "Kostenstellen Buchungsvorlage"
#. module: account_analytic_default
#: field:account.analytic.default,sequence:0
@ -111,12 +118,16 @@ msgid ""
"default (e.g. create new customer invoice or Sale order if we select this "
"company, it will automatically take this as an analytic account)"
msgstr ""
"Wählen Sie ein Unternehmen mit hinterlegter Standard Kostenstelle (z.B. bei "
"der Erstellung einer Ausgangsrechnung oder eines Angebots wird bei der "
"Auswahl des Unternehmens eine automatische Erkennung der Kostenstelle "
"gestartet)."
#. module: account_analytic_default
#: help:account.analytic.default,user_id:0
msgid ""
"Select a user which will use analytic account specified in analytic default."
msgstr ""
msgstr "Wählen Sie einen Benutzer mit der hinterlegten Standard Kostenstelle"
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_account_invoice_line
@ -127,17 +138,17 @@ msgstr "Rechnungszeile"
#: view:account.analytic.default:0
#: field:account.analytic.default,analytic_id:0
msgid "Analytic Account"
msgstr "Analytische Konten"
msgstr "Kostenstelle"
#. module: account_analytic_default
#: help:account.analytic.default,date_start:0
msgid "Default start date for this Analytic Account."
msgstr ""
msgstr "Standard Start Datum für Kostenstelle"
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Accounts"
msgstr "Konten"
msgstr "Kostenstellen"
#. module: account_analytic_default
#: view:account.analytic.default:0
@ -154,9 +165,7 @@ msgstr "Start Datum"
#: help:account.analytic.default,sequence:0
msgid ""
"Gives the sequence order when displaying a list of analytic distribution"
msgstr ""
"Zeigt eine Liste analytischer Konten, in der Reihenfolge wie von Ihnen "
"festgelegt."
msgstr "Zeigt eine Liste mit Kostenstellen"
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_sale_order_line

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-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-10-12 23:19+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"PO-Revision-Date: 2012-12-06 22:38+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\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-12-04 05:34+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
@ -48,7 +49,7 @@ msgstr "Anteil (%)"
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
msgid "The total should be between %s and %s."
msgstr ""
msgstr "Die Summe sollte zwischen %s und %s sein."
#. module: account_analytic_plans
#: view:account.analytic.plan:0
@ -131,7 +132,7 @@ msgstr "Zeige keine leeren Zeilen"
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
#, python-format
msgid "There are no analytic lines related to account %s."
msgstr ""
msgstr "Es gibt keine Kostenstellen Buchungen für das Konto %s."
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
@ -142,7 +143,7 @@ msgstr "Konto3 ID"
#: view:account.crossovered.analytic:0
#: view:analytic.plan.create.model:0
msgid "or"
msgstr ""
msgstr "oder"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_line
@ -281,7 +282,7 @@ msgstr "Bankauszug Buchungen"
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "Error!"
msgstr ""
msgstr "Fehler !"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
@ -297,7 +298,7 @@ msgstr "Druck Kreuzanalyse"
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
#, python-format
msgid "User Error!"
msgstr ""
msgstr "Benutzerfehler !"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account6_ids:0
@ -316,6 +317,7 @@ msgstr "Analytisches Journal"
#, python-format
msgid "Please put a name and a code before saving the model."
msgstr ""
"Bitte tragen Sie eine Bezeichnung und ein Kürzel vor dem Speichern ein."
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
@ -347,7 +349,7 @@ msgstr "Journal"
#: code:addons/account_analytic_plans/account_analytic_plans.py:486
#, python-format
msgid "You have to define an analytic journal on the '%s' journal."
msgstr ""
msgstr "Sie müssen eine Kostenstelle für das Journal '%s' eintragen"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:342
@ -375,7 +377,7 @@ msgstr "Rechnungszeile"
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "There is no analytic plan defined."
msgstr ""
msgstr "Es existieren Kostenstellen und ein Plan"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
@ -402,7 +404,7 @@ msgstr "Analytische Verrechnung"
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
#, python-format
msgid "A model with this name and code already exists."
msgstr ""
msgstr "Ein Modul mit ähnlichem Name und Kürzel existiert bereits."
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_id:0

View File

@ -41,8 +41,8 @@ class account_asset_category(osv.osv):
'company_id': fields.many2one('res.company', 'Company', required=True),
'method': fields.selection([('linear','Linear'),('degressive','Degressive')], 'Computation Method', required=True, help="Choose the method to use to compute the amount of depreciation lines.\n"\
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n" \
" * Degressive: Calculated on basis of: Remaining Value * Degressive Factor"),
'method_number': fields.integer('Number of Depreciations'),
" * Degressive: Calculated on basis of: Residual Value * Degressive Factor"),
'method_number': fields.integer('Number of Depreciations', help="The number of depreciations needed to depreciate your asset"),
'method_period': fields.integer('Period Length', help="State here the time between 2 depreciations, in months", required=True),
'method_progress_factor': fields.float('Degressive Factor'),
'method_time': fields.selection([('number','Number of Depreciations'),('end','Ending Date')], 'Time Method', required=True,
@ -222,6 +222,15 @@ class account_asset_asset(osv.osv):
else:
val['currency_id'] = company.currency_id.id
return {'value': val}
def onchange_purchase_salvage_value(self, cr, uid, ids, purchase_value, salvage_value, context=None):
val = {}
for asset in self.browse(cr, uid, ids, context=context):
if purchase_value:
val['value_residual'] = purchase_value - salvage_value
if salvage_value:
val['value_residual'] = purchase_value - salvage_value
return {'value': val}
_columns = {
'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),
@ -243,9 +252,9 @@ class account_asset_asset(osv.osv):
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True, states={'draft':[('readonly',False)]}),
'method': fields.selection([('linear','Linear'),('degressive','Degressive')], 'Computation Method', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose the method to use to compute the amount of depreciation lines.\n"\
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n" \
" * Degressive: Calculated on basis of: Remaining Value * Degressive Factor"),
'method_number': fields.integer('Number of Depreciations', readonly=True, states={'draft':[('readonly',False)]}, help="Calculates Depreciation within specified interval"),
'method_period': fields.integer('Number of Months in a Period', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="State here the time during 2 depreciations, in months"),
" * Degressive: Calculated on basis of: Residual Value * Degressive Factor"),
'method_number': fields.integer('Number of Depreciations', readonly=True, states={'draft':[('readonly',False)]}, help="The number of depreciations needed to depreciate your asset"),
'method_period': fields.integer('Number of Months in a Period', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="The amount of time between two depreciations, in months"),
'method_end': fields.date('Ending Date', readonly=True, states={'draft':[('readonly',False)]}),
'method_progress_factor': fields.float('Degressive Factor', readonly=True, states={'draft':[('readonly',False)]}),
'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual Value'),
@ -359,8 +368,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', digits_compute=dp.get_precision('Account'), required=True),
'remaining_value': fields.float('Amount to Depreciate', digits_compute=dp.get_precision('Account'),required=True),
'amount': fields.float('Current Depreciation', digits_compute=dp.get_precision('Account'), required=True),
'remaining_value': fields.float('Next Period Depreciation', 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'),
@ -460,7 +469,7 @@ class account_asset_history(osv.osv):
help="The method to use to compute the dates and number of depreciation lines.\n"\
"Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" \
"Ending Date: Choose the time between 2 depreciations and the date the depreciations won't go beyond."),
'method_number': fields.integer('Number of Depreciations'),
'method_number': fields.integer('Number of Depreciations', help="The number of depreciations needed to depreciate your asset"),
'method_period': fields.integer('Period Length', help="Time in month between two depreciations"),
'method_end': fields.date('Ending date'),
'note': fields.text('Note'),

View File

@ -108,8 +108,8 @@
<page string="General">
<group>
<group>
<field name="purchase_value" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<field name="salvage_value" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<field name="purchase_value" widget="monetary" options="{'currency_field': 'currency_id'}" on_change="onchange_purchase_salvage_value(purchase_value, salvage_value)"/>
<field name="salvage_value" widget="monetary" options="{'currency_field': 'currency_id'}" on_change="onchange_purchase_salvage_value(purchase_value, salvage_value)"/>
<field name="value_residual" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<field name="partner_id"/>
</group>

View File

@ -8,14 +8,15 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-05-10 17:36+0000\n"
"Last-Translator: Ferdinand-camptocamp <Unknown>\n"
"PO-Revision-Date: 2012-12-06 23:48+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\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-12-04 05:53+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_asset
#: view:account.asset.asset:0
@ -156,7 +157,7 @@ msgstr "Abschreibungs Datum"
#. module: account_asset
#: constraint:account.asset.asset:0
msgid "Error ! You cannot create recursive assets."
msgstr ""
msgstr "Fehler ! Sie können keine rekursiven Anlagengegenstände definieren."
#. module: account_asset
#: field:asset.asset.report,posted_value:0
@ -201,7 +202,7 @@ msgstr "# der Abschreibungsbuchungen"
#. module: account_asset
#: field:account.asset.asset,method_period:0
msgid "Number of Months in a Period"
msgstr ""
msgstr "Anzahl Monate in Perioden"
#. module: account_asset
#: view:asset.asset.report:0
@ -389,7 +390,7 @@ msgstr "Zeit Methode"
#: view:asset.depreciation.confirmation.wizard:0
#: view:asset.modify:0
msgid "or"
msgstr ""
msgstr "oder"
#. module: account_asset
#: field:account.asset.asset,note:0
@ -446,12 +447,17 @@ msgid ""
"You can manually close an asset when the depreciation is over. If the last "
"line of depreciation is posted, the asset automatically goes in that status."
msgstr ""
"Wenn eine Anlage angelegt wird, ist der Status \"Entwurf\". Nach Bestätigung "
"der Anlage wird dies aktiv und Abschreibungen können verbucht werden. Sie "
"können die Anlage automatisch schließen, wenn die Abschreibungen vorbei "
"sind. Nach Verbuchung der letzen Abschreibung wird die Anlage automatisch "
"geschlossen."
#. module: account_asset
#: field:account.asset.asset,state:0
#: field:asset.asset.report,state:0
msgid "Status"
msgstr ""
msgstr "Status"
#. module: account_asset
#: field:account.asset.asset,partner_id:0
@ -498,7 +504,7 @@ msgstr "Berechnen"
#. module: account_asset
#: view:account.asset.history:0
msgid "Asset History"
msgstr ""
msgstr "Historie Anlagegegüter"
#. module: account_asset
#: field:asset.asset.report,name:0
@ -619,7 +625,7 @@ msgstr "Abzuschreibender Betrag"
#. module: account_asset
#: field:account.asset.asset,name:0
msgid "Asset Name"
msgstr ""
msgstr "Anlagegut Bezeichnung"
#. module: account_asset
#: field:account.asset.category,open_asset:0
@ -670,11 +676,16 @@ msgid ""
" </p>\n"
" "
msgstr ""
"Über diesen Report erhalten Sie einen Überblick über alle Abschreibungen. "
"Die Suche kann auch zur \n"
"individuellen und persönlichen Auswertung über das Anlagevermögen benutzt "
"werden.\n"
" "
#. module: account_asset
#: field:account.asset.asset,purchase_value:0
msgid "Gross Value"
msgstr ""
msgstr "Brutto Erlös"
#. module: account_asset
#: field:account.asset.category,name:0

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-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-05-10 17:45+0000\n"
"Last-Translator: 开阖软件 Jeff Wang <jeff@osbzr.com>\n"
"PO-Revision-Date: 2012-12-07 15:37+0000\n"
"Last-Translator: ccdos <ccdos@163.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-12-04 05:54+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_asset
#: view:account.asset.asset:0
@ -153,7 +153,7 @@ msgstr "折旧日期"
#. module: account_asset
#: constraint:account.asset.asset:0
msgid "Error ! You cannot create recursive assets."
msgstr ""
msgstr "错误!你不能创建循环的固定资产."
#. module: account_asset
#: field:asset.asset.report,posted_value:0
@ -198,7 +198,7 @@ msgstr "折旧行编号"
#. module: account_asset
#: field:account.asset.asset,method_period:0
msgid "Number of Months in a Period"
msgstr ""
msgstr "在一个周期内的月数"
#. module: account_asset
#: view:asset.asset.report:0
@ -441,7 +441,7 @@ msgstr ""
#: field:account.asset.asset,state:0
#: field:asset.asset.report,state:0
msgid "Status"
msgstr ""
msgstr "状态"
#. module: account_asset
#: field:account.asset.asset,partner_id:0
@ -488,7 +488,7 @@ msgstr "计算"
#. module: account_asset
#: view:account.asset.history:0
msgid "Asset History"
msgstr ""
msgstr "资产历史"
#. module: account_asset
#: field:asset.asset.report,name:0
@ -607,7 +607,7 @@ msgstr "要折旧的金额"
#. module: account_asset
#: field:account.asset.asset,name:0
msgid "Asset Name"
msgstr ""
msgstr "资产名称"
#. module: account_asset
#: field:account.asset.category,open_asset:0
@ -662,7 +662,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.asset,purchase_value:0
msgid "Gross Value"
msgstr ""
msgstr "总值"
#. module: account_asset
#: field:account.asset.category,name:0
@ -708,7 +708,7 @@ msgstr "新建固定资产会计凭证"
#. module: account_asset
#: field:account.asset.depreciation.line,sequence:0
msgid "Sequence"
msgstr ""
msgstr "编号"
#. module: account_asset
#: help:account.asset.category,method_period:0

View File

@ -8,12 +8,17 @@
<field name="arch" type="xml">
<form string="Modify Asset" version="7.0">
<group string="Asset Durations to Modify" col="4">
<field name="name" colspan="4"/>
<group colspan="2" col="2">
<field name="name"/>
<field name="method_number"/>
<field name="method_end"/>
</group>
<field name="method_period"/>
<group colspan="2" col="2">
<field name="method_end"/>
<label for="method_period"/>
<div>
<field name="method_period" class="oe_inline"/> months
</div>
</group>
</group>
<separator string="Notes"/>
<field name="note"/>

View File

@ -8,14 +8,15 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-02-09 15:02+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"PO-Revision-Date: 2012-12-06 23:53+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\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-12-04 05:54+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
@ -59,7 +60,7 @@ msgstr "Storniere ausgewählte Buchungszeilen"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,val_date:0
msgid "Value Date"
msgstr ""
msgstr "Datum Wertstellung"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
@ -104,7 +105,7 @@ msgstr "Batch Zahlungs Info"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,state:0
msgid "Status"
msgstr ""
msgstr "Status"
#. module: account_bank_statement_extensions
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:129
@ -113,11 +114,13 @@ msgid ""
"Delete operation not allowed. Please go to the associated bank "
"statement in order to delete and/or modify bank statement line."
msgstr ""
"Lösche Operation ist nicht erlaubt. Bitte wechseln Sie zum angebundenen "
"Bankauszug Beleg, um dort die Zahlungsvorschläge zu beurteilen."
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
msgid "or"
msgstr ""
msgstr "oder"
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
@ -219,7 +222,7 @@ msgstr "Manuell"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Bank Transaction"
msgstr ""
msgstr "Bank Auszug"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
@ -326,7 +329,7 @@ msgstr "Buchungszeilen"
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:129
#, python-format
msgid "Warning!"
msgstr ""
msgstr "Warnung !"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line.global: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-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-11-25 20:59+0000\n"
"PO-Revision-Date: 2012-12-06 11:57+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-12-04 05:42+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-07 04:36+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_budget
#: view:account.budget.analytic:0
@ -367,6 +367,27 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p>\n"
" Een budget is een prognose van uw bedrijfs inkomsten en "
"uitgaven,\n"
" welke wordt verwacht in een bepaalde periode in de toekomst. "
"Een budget\n"
" wordt gedefinieerd op grootboekrekeningen en/of "
"kostenplaatsen (welke \n"
" projecten, afdelingen, productcategorieën, etc. "
"vertegenwoordigen)\n"
" </p><p>\n"
" Door deze geldstromen bij te houden is het waarschijnlijk, "
"dat u niet\n"
" te veel uitgeeft en u een grotere kans heeft u financieel "
"doelen te\n"
" realiseren. Definieer een budget door de verwachte opbrengst "
"in\n"
" te geven per kostenplaats en volg de voortgang, gebaseerd op "
"werkelijke\n"
" gerealiseerde gegevens, gedurende die periode.\n"
" </p>\n"
" "
#. module: account_budget
#: report:account.budget:0

View File

@ -9,7 +9,7 @@
<field name="model">account.voucher</field>
<field name="inherit_id" ref="account_voucher.view_vendor_payment_form" />
<field name="arch" type="xml">
<field name="journal_id" position="after">
<field name="amount" position="after">
<newline/>
<field name="allow_check" invisible="1"/>
<field name="amount_in_word" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="6"/>

View File

@ -8,15 +8,15 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-05-10 18:06+0000\n"
"PO-Revision-Date: 2012-12-07 09:04+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\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-12-04 05:54+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_check_writing
#: selection:res.company,check_layout:0
@ -107,6 +107,19 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
"                 Klicken Sie, um einen neuen Scheck erstellen.\n"
"               </ p>\n"
"                 Mit dem Scheck Formular können Sie Zahlungen an Lieferanten "
"per Scheck \n"
" anweisen, durchführen und verfolgen. Wenn Sie einen "
"Lieferanten auswählen, \n"
" sowie Zahlungsmethode und Betrag , macht OpenERP Ihnen den "
"Vorschlag, \n"
" diese Zahlung mit einer offenen Rechnung Ihres Lieferanten "
"auszugleichen.\n"
"               </ p>\n"
" "
#. module: account_check_writing
#: field:account.voucher,allow_check:0
@ -128,7 +141,7 @@ msgstr "Benutze Vordruck"
#. module: account_check_writing
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_bottom
msgid "Print Check (Bottom)"
msgstr ""
msgstr "Scheck drucken (Unterteil)"
#. module: account_check_writing
#: report:account.print.check.bottom:0
@ -140,7 +153,7 @@ msgstr "Fälligkeit"
#. module: account_check_writing
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_middle
msgid "Print Check (Middle)"
msgstr ""
msgstr "Scheck drucken (Mittelteil)"
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_res_company
@ -156,7 +169,7 @@ msgstr "Saldenausgleich"
#. module: account_check_writing
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_top
msgid "Print Check (Top)"
msgstr ""
msgstr "Scheck drucken (Oberteil)"
#. module: account_check_writing
#: report:account.print.check.bottom:0

View File

@ -24,7 +24,6 @@ from lxml import etree
from tools.translate import _
class followup(osv.osv):
_name = 'account_followup.followup'
_description = 'Account Follow-up'
@ -74,7 +73,7 @@ class followup_line(osv.osv):
Exception made if there was a mistake of ours, it seems that the following amount stays unpaid. Please, take appropriate measures in order to carry out this payment in the next 8 days.
Would your payment have been carried out after this mail was sent, please ignore this message. Do not hesitate to contact our accounting department at (+32).10.68.94.39.
Would your payment have been carried out after this mail was sent, please ignore this message. Do not hesitate to contact our accounting department.
Best Regards,
""",
@ -118,12 +117,61 @@ class account_move_line(osv.osv):
class email_template(osv.osv):
_inherit = 'email.template'
# Adds current_date to the context. That way it can be used to put
# the account move lines in bold that are overdue in the email
def render_template(self, cr, uid, template, model, res_id, context=None):
context['current_date'] = fields.date.context_today(cr, uid, context)
return super(email_template, self).render_template(cr, uid, template, model, res_id, context=context)
def _get_followup_table_html(self, cr, uid, res_id, context=None):
'''
Build the html tables to be included in emails send to partners, when reminding them their
overdue invoices.
:param res_id: ID of the partner for whom we are building the tables
:rtype: string
'''
from report import account_followup_print
partner = self.pool.get('res.partner').browse(cr, uid, res_id, context=context)
followup_table = ''
if partner.unreconciled_aml_ids:
company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id
current_date = fields.date.context_today(cr, uid, context)
rml_parse = account_followup_print.report_rappel(cr, uid, "followup_rml_parser")
final_res = rml_parse._lines_get_with_partner(partner, company.id)
for currency_dict in final_res:
currency = currency_dict.get('line', [{'currency_id': company.currency_id}])[0]['currency_id']
followup_table += '''
<table border="2" width=100%%>
<tr>
<td>Invoice date</td>
<td>Reference</td>
<td>Due date</td>
<td>Amount (%s)</td>
<td>Lit.</td>
</tr>
''' % (currency.symbol)
total = 0
for aml in currency_dict['line']:
block = aml['blocked'] and 'X' or ' '
total += aml['balance']
strbegin = "<TD>"
strend = "</TD>"
date = aml['date_maturity'] or aml['date']
if date <= current_date and aml['balance'] > 0:
strbegin = "<TD><B>"
strend = "</B></TD>"
followup_table +="<TR>" + strbegin + str(aml['date']) + strend + strbegin + aml['ref'] + strend + strbegin + str(date) + strend + strbegin + str(aml['balance']) + strend + strbegin + block + strend + "</TR>"
total = rml_parse.formatLang(total, dp='Account', currency_obj=currency)
followup_table += '''<tr> </tr>
</table>
<center>Amount due: %s </center>''' % (total)
return followup_table
def render_template(self, cr, uid, template, model, res_id, context=None):
if model == 'res.partner' and context.get('followup'):
context['followup_table'] = self._get_followup_table_html(cr, uid, res_id, context=context)
# Adds current_date to the context. That way it can be used to put
# the account move lines in bold that are overdue in the email
context['current_date'] = fields.date.context_today(cr, uid, context)
return super(email_template, self).render_template(cr, uid, template, model, res_id, context=context)
class res_partner(osv.osv):
@ -209,32 +257,36 @@ class res_partner(osv.osv):
}
def do_partner_mail(self, cr, uid, partner_ids, context=None):
if context is None:
context = {}
ctx = context.copy()
ctx['followup'] = True
#partner_ids are res.partner ids
# If not defined by latest follow-up level, it will be the default template if it can find it
mtp = self.pool.get('email.template')
unknown_mails = 0
for partner in self.browse(cr, uid, partner_ids, context=context):
for partner in self.browse(cr, uid, partner_ids, context=ctx):
if partner.email and partner.email.strip():
level = partner.latest_followup_level_id_without_lit
if level and level.send_email and level.email_template_id and level.email_template_id.id:
mtp.send_mail(cr, uid, level.email_template_id.id, partner.id, context=context)
mtp.send_mail(cr, uid, level.email_template_id.id, partner.id, context=ctx)
else:
mail_template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid,
'account_followup', 'email_template_account_followup_default')
mtp.send_mail(cr, uid, mail_template_id[1], partner.id, context=context)
mtp.send_mail(cr, uid, mail_template_id[1], partner.id, context=ctx)
else:
unknown_mails = unknown_mails + 1
action_text = _("Email not sent because of email address of partner not filled in")
if partner.payment_next_action_date:
payment_action_date = min(fields.date.context_today(cr, uid, context), partner.payment_next_action_date)
payment_action_date = min(fields.date.context_today(cr, uid, ctx), partner.payment_next_action_date)
else:
payment_action_date = fields.date.context_today(cr, uid, context)
payment_action_date = fields.date.context_today(cr, uid, ctx)
if partner.payment_next_action:
payment_next_action = partner.payment_next_action + " + " + action_text
payment_next_action = partner.payment_next_action + " \n " + action_text
else:
payment_next_action = action_text
self.write(cr, uid, [partner.id], {'payment_next_action_date': payment_action_date,
'payment_next_action': payment_next_action}, context=context)
'payment_next_action': payment_next_action}, context=ctx)
return unknown_mails
def action_done(self, cr, uid, ids, context=None):
@ -256,21 +308,122 @@ class res_partner(osv.osv):
}
def _get_amounts_and_date(self, cr, uid, ids, name, arg, context=None):
'''
Function that computes values for the followup functional fields. Note that 'payment_amount_due'
is similar to 'credit' field on res.partner except it filters on user's company.
'''
res = {}
company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id
current_date = fields.date.context_today(cr, uid, context)
for partner in self.browse(cr, uid, ids, context=context):
worst_due_date = False
amount_due = amount_overdue = 0.0
for aml in partner.unreconciled_aml_ids:
if (aml.company_id == company):
date_maturity = aml.date_maturity or aml.date
if not worst_due_date or date_maturity < worst_due_date:
worst_due_date = date_maturity
amount_due += aml.result
if (date_maturity <= current_date):
amount_overdue += aml.result
res[partner.id] = {'payment_amount_due': amount_due,
'payment_amount_overdue': amount_overdue,
'payment_earliest_due_date': worst_due_date}
return res
def _get_followup_overdue_query(self, cr, uid, args, overdue_only=False, context=None):
'''
This function is used to build the query and arguments to use when making a search on functional fields
* payment_amount_due
* payment_amount_overdue
Basically, the query is exactly the same except that for overdue there is an extra clause in the WHERE.
:param args: arguments given to the search in the usual domain notation (list of tuples)
:param overdue_only: option to add the extra argument to filter on overdue accounting entries or not
:returns: a tuple with
* the query to execute as first element
* the arguments for the execution of this query
:rtype: (string, [])
'''
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
having_where_clause = ' AND '.join(map(lambda x: '(SUM(bal2) %s %%s)' % (x[1]), args))
having_values = [x[2] for x in args]
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
overdue_only_str = overdue_only and 'AND date_maturity <= NOW()' or ''
return ('''SELECT pid AS partner_id, SUM(bal2) FROM
(SELECT CASE WHEN bal IS NOT NULL THEN bal
ELSE 0.0 END AS bal2, p.id as pid FROM
(SELECT (debit-credit) AS bal, partner_id
FROM account_move_line l
WHERE account_id IN
(SELECT id FROM account_account
WHERE type=\'receivable\' AND active)
''' + overdue_only_str + '''
AND reconcile_id IS NULL
AND company_id = %s
AND ''' + query + ''') AS l
RIGHT JOIN res_partner p
ON p.id = partner_id ) AS pl
GROUP BY pid HAVING ''' + having_where_clause, [company_id] + having_values)
def _payment_overdue_search(self, cr, uid, obj, name, args, context=None):
if not args:
return []
query, query_args = self._get_followup_overdue_query(cr, uid, args, overdue_only=True, context=context)
cr.execute(query, query_args)
res = cr.fetchall()
if not res:
return [('id','=','0')]
return [('id','in', [x[0] for x in res])]
def _payment_earliest_date_search(self, cr, uid, obj, name, args, context=None):
if not args:
return []
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
having_where_clause = ' AND '.join(map(lambda x: '(MIN(l.date_maturity) %s %%s)' % (x[1]), args))
having_values = [x[2] for x in args]
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
cr.execute('SELECT partner_id FROM account_move_line l '\
'WHERE account_id IN '\
'(SELECT id FROM account_account '\
'WHERE type=\'receivable\' AND active) '\
'AND l.company_id = %s '
'AND reconcile_id IS NULL '\
'AND '+query+' '\
'AND partner_id IS NOT NULL '\
'GROUP BY partner_id HAVING '+ having_where_clause,
[company_id] + having_values)
res = cr.fetchall()
if not res:
return [('id','=','0')]
return [('id','in', [x[0] for x in res])]
def _payment_due_search(self, cr, uid, obj, name, args, context=None):
if not args:
return []
query, query_args = self._get_followup_overdue_query(cr, uid, args, overdue_only=False, context=context)
cr.execute(query, query_args)
res = cr.fetchall()
if not res:
return [('id','=','0')]
return [('id','in', [x[0] for x in res])]
_inherit = "res.partner"
_columns = {
'payment_responsible_id':fields.many2one('res.users', ondelete='set null', string='Follow-up Responsible',
help="Responsible for making sure the action happens."),
help="Optionally you can assign a user to this field, which will make him responsible for the action."),
'payment_note':fields.text('Customer Payment Promise', help="Payment Note"),
'payment_next_action':fields.text('Next Action',
help="This is the next action to be taken by the user. It will automatically be set when the action fields are empty and the partner gets a follow-up level that requires a manual action. "),
'payment_next_action':fields.text('Next Action',
help="This is the next action to be taken. It will automatically be set when the partner gets a follow-up level that requires a manual action. "),
'payment_next_action_date':fields.date('Next Action Date',
help="This is when further follow-up is needed. The date will have been set to the current date if the action fields are empty and the partner gets a follow-up level that requires a manual action. "),
help="This is when the manual follow-up is needed. " \
"The date will be set to the current date when the partner gets a follow-up level that requires a manual action. Can be practical to set manually e.g. to see if he keeps his promises."),
'unreconciled_aml_ids':fields.one2many('account.move.line', 'partner_id', domain=['&', ('reconcile_id', '=', False), '&',
('account_id.active','=', True), '&', ('account_id.type', '=', 'receivable'), ('state', '!=', 'draft')]),
'latest_followup_date':fields.function(_get_latest, method=True, type='date', string="Latest Follow-up Date",
help="Latest date that the follow-up level of the partner was changed",
store=False,
multi="latest"),
store=False, multi="latest"),
'latest_followup_level_id':fields.function(_get_latest, method=True,
type='many2one', relation='account_followup.followup.line', string="Latest Follow-up Level",
help="The maximum follow-up level",
@ -281,7 +434,19 @@ class res_partner(osv.osv):
help="The maximum follow-up level without taking into account the account move lines with litigation",
store=False,
multi="latest"),
'payment_amount_due':fields.related('credit', type='float', string="Total amount due", readonly=True),
'payment_amount_due':fields.function(_get_amounts_and_date,
type='float', string="Amount Due",
store = False, multi="followup",
fnct_search=_payment_due_search),
'payment_amount_overdue':fields.function(_get_amounts_and_date,
type='float', string="Amount Overdue",
store = False, multi="followup",
fnct_search = _payment_overdue_search),
'payment_earliest_due_date':fields.function(_get_amounts_and_date,
type='date',
string = "Worst Due Date",
multi="followup",
fnct_search=_payment_earliest_date_search),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -16,7 +16,9 @@
<field name="user_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="payment_responsible_id"/>
<field name="credit"/>
<field name="payment_earliest_due_date"/>
<field name="payment_amount_overdue"/>
<field name="payment_amount_due" />
</tree>
</field>
</record>
@ -28,10 +30,9 @@
<field name="arch" type="xml">
<search string="Search Partner" position="inside">
<group string="Follow-up">
<filter string="Partners with Credits" domain="[('credit', '>', 0.0)]" name="credits"/>
<filter string="Partners with Overdue Credits" domain="[('payment_amount_overdue', '>', 0.0)]" name="credits"/>
<separator/>
<filter string="Follow-ups To Do" domain="[('payment_next_action_date', '&lt;=', time.strftime('%%Y-%%m-%%d')), ('credit', '>', 0.0)]" name="todo"/>
<filter string="Future Follow-ups" domain="[('payment_next_action_date', '&gt;', time.strftime('%%Y-%%m-%%d')), ('credit', '>', 0.0)]"/>
<filter string="Follow-ups To Do" domain="[('payment_next_action_date', '&lt;=', time.strftime('%%Y-%%m-%%d')), ('payment_amount_overdue', '>', 0.0)]" name="todo"/>
<separator/>
<filter string="No Responsible" domain="[('payment_responsible_id', '=', False)]"/>
<filter string="My Follow-ups" domain="[('payment_responsible_id','=', uid)]"/>
@ -43,29 +44,7 @@
</field>
</record>
<record id="customer_followup_search_view2" model="ir.ui.view">
<field name="name">Search</field>
<field name="model">res.partner</field>
<field name="arch" type="xml">
<search string="Search view">
<field name="name"/>
<field name="payment_next_action"/>
<!--<filter string="Actions to be taken with overdue amount" domain="['&amp;', ('payment_amount_outstanding', '>', 0.0), ('payment_next_action_date', '&lt;=', time.strftime('%%Y-%%m-%%d'))]"/>
<separator/>-->
<filter string="Overdue amount" domain="[('credit', '>', 0.0)]"/>
<separator/>
<filter string="Follow-ups to do" domain="[('payment_next_action_date', '&lt;=', time.strftime('%%Y-%%m-%%d'))]"/>
<separator/>
<!--filter string="Future follow-ups" domain="['&', ('payment_next_action', '!=', ''), ('payment_next_action_date', '>', time.strftime('%%Y-%%m-%%d'))]"/>-->
<separator/>
<filter string="Without responsible" domain="[('payment_responsible_id', '=', False)]"/>
<filter string="I am responsible" domain="[('payment_responsible_id','=', uid)]"/>
<group expand="1" string="Group by">
<filter string="Responsible" context="{'group_by':'payment_responsible_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_customer_followup" model="ir.actions.act_window">
<field name="name">Manual Follow-Ups</field>
@ -73,7 +52,7 @@
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{} </field>
<field name="domain">[('payment_amount_due', '>', 0.0)]</field>
<field name="context">{'Followupfirst':True, 'search_default_todo': True} </field>
<field name="search_view_id" ref="customer_followup_search_view"/>
</record>
@ -88,9 +67,9 @@
<page string="Payment Follow-up" groups="account.group_account_invoice" name="followup_tab">
<div class="oe_right oe_button_box" name="followup_button">
<button name="do_button_print" type="object" string="Print Overdue Payments" groups="account.group_account_user"
help="Print overdue payments report independent of follow-up line" attrs="{'invisible':[('credit', '&lt;=', 0.0)]}" />
help="Print overdue payments report independent of follow-up line" attrs="{'invisible':[('payment_amount_due', '&lt;=', 0.0)]}" />
<button name="do_partner_mail" type="object" string="Send Overdue Email" groups="account.group_account_user"
help="If not specified by the latest follow-up level, it will send from the default follow-up of overdue invoices template" attrs="{'invisible':[('credit', '&lt;=', 0.0)]}"/>
help="If not specified by the latest follow-up level, it will send from the default email template" attrs="{'invisible':[('payment_amount_due', '&lt;=', 0.0)]}"/>
</div>
<p attrs="{'invisible':[('latest_followup_date','=', False)]}">
The <field name="latest_followup_date" class = "oe_inline"/>, the latest payment follow-up
@ -105,22 +84,22 @@
help="Click to mark the action as done." class="oe_link"
attrs="{'invisible':[('payment_next_action_date','=', False)]}"
groups="base.group_partner_manager"/>
<field name="payment_next_action" placeholder="e.g. Give a phonecall, Check if it's paid, ..."/>
<field name="payment_next_action" placeholder="Action to be taken e.g. Give a phonecall, Check if it's paid, ..."/>
</div>
</group>
<label for="payment_note" class="oe_edit_only"/>
<field name="payment_note" placeholder="e.g. 50%% before 15th of May, balance before 1st of July."/>
<field name="payment_note" placeholder="He said the problem was temporary and promised to pay 50%% before 15th of May, balance before 1st of July."/>
<p class="oe_grey">
Below is the history of the transactions of this
customer. You can set an invoice in litigation in
order to not include it in the next payment
follow-ups.
customer. You can check "No Follow-up" in
order to exclude it from the next follow-up actions.
</p>
<field name="unreconciled_aml_ids">
<tree string="Account Move line" editable="bottom" create="false" delete="false" colors="red:(not date_maturity or date_maturity&lt;=current_date) and result&gt;0">
<field name="date" readonly="True"/>
<field name="company_id" readonly="True" groups="base.group_multi_company" />
<field name="move_id" readonly="True"/>
<field name="blocked" string="Litigation"/>
<field name="blocked"/>
<field name="date_maturity" readonly="True"/>
<field name="reconcile_partial_id" readonly="True"/>
<field name="result" readonly="True"/>

View File

@ -5,69 +5,36 @@
<data noupdate="1">
<!--Mail template level 0-->
<record id="email_template_account_followup_level0" model="email.template">
<field name="name">Follow-up of overdue invoices level 0</field>
<field name="email_from">${user.email or ''}</field>
<field name="subject">${user.company_id.name} Payment Follow-up</field>
<field name="email_to">${object.email}</field>
<field name="lang">${object.lang}</field>
<field name="name">First polite payment follow-up reminder email</field>
<field name="email_from">${user.email or '' | h}</field>
<field name="subject">${user.company_id.name | h} Payment Reminder</field>
<field name="email_to">${object.email | h}</field>
<field name="lang">${object.lang | h}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">
<p>Dear ${object.name},</p>
<p>Dear ${object.name | h},</p>
<p>
Exception made if there was a mistake of ours, it seems that the following amount stays unpaid. Please, take
appropriate measures in order to carry out this payment in the next 8 days.
Would your payment have been carried out after this mail was sent, please ignore this message. Do not hesitate to
contact our accounting department at (+32).10.68.94.39.
contact our accounting department.
</p>
<br/>
Best Regards,
<br/>
<br/>
${user.name}
${user.name | h}
<br/>
<br/>
<%
from openerp.addons.account_followup.report import account_followup_print
rml_parse = account_followup_print.report_rappel(object._cr, user.id, "followup_rml_parser")
final_res = rml_parse._lines_get_with_partner(object, user.company_id.id)
followup_table = ''
for currency_dict in final_res:
currency_symbol = currency_dict.get('line', [{'currency_id': user.company_id.currency_id}])[0]['currency_id'].symbol
followup_table += '''
<table border="2" width=100%%>
<tr>
<td>Invoice date</td>
<td>Reference</td>
<td>Due date</td>
<td>Amount (%s)</td>
<td>Lit.</td>
</tr>
''' % (currency_symbol)
total = 0
for aml in currency_dict['line']:
block = aml['blocked'] and 'X' or ' '
total += aml['balance']
strbegin = "<TD> "
strend = "</TD> "
date = aml['date_maturity'] or aml['date']
if date <= ctx['current_date'] and aml['balance'] > 0:
strbegin = "<TD><B>"
strend = "</B></TD>"
followup_table +="<TR>" + strbegin + str(aml['date']) + strend + strbegin + aml['ref'] + strend + strbegin + str(date) + strend + strbegin + str(aml['balance']) + strend + strbegin + block + strend + "</TR>"
total = rml_parse.formatLang(total, dp='Account', currency_obj=object.company_id.currency_id)
followup_table += '''<tr> </tr>
</table>
<center>Amount due: %s </center>''' % (total)
%>
${followup_table}
${ctx.get('followup_table','')}
<br/>
@ -79,72 +46,37 @@ ${followup_table}
<!--Mail template level 1 -->
<record id="email_template_account_followup_level1" model="email.template">
<field name="name">Follow-up of overdue invoices level 1</field>
<field name="email_from">${user.email or ''}</field>
<field name="subject">${user.company_id.name} Payment Follow-up</field>
<field name="email_to">${object.email}</field>
<field name="lang">${object.lang}</field>
<field name="name">A bit urging second payment follow-up reminder email</field>
<field name="email_from">${user.email or '' | h}</field>
<field name="subject">${user.company_id.name | h} Payment Reminder</field>
<field name="email_to">${object.email | h}</field>
<field name="lang">${object.lang | h}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">
<p>Dear ${object.name},</p>
<p>Dear ${object.name | h},</p>
<p>
We are disappointed to see that despite sending a reminder, that your account is now seriously overdue.
It is essential that immediate payment is made, otherwise we will have to consider placing a stop on your account
which means that we will no longer be able to supply your company with (goods/services).
Please, take appropriate measures in order to carry out this payment in the next 8 days.
If there is a problem with paying invoice that we are not aware of, do not hesitate to contact our accounting
department at (+32).10.68.94.39. so that we can resolve the matter quickly.
department. so that we can resolve the matter quickly.
Details of due payments is printed below.
</p>
<br/>
Best Regards,
<br/>
${user.name}
<br/>
${user.name | h}
<br/>
<br/>
<%
from openerp.addons.account_followup.report import account_followup_print
rml_parse = account_followup_print.report_rappel(object._cr, user.id, "followup_rml_parser")
final_res = rml_parse._lines_get_with_partner(object, user.company_id.id)
followup_table = ''
for currency_dict in final_res:
currency_symbol = currency_dict.get('line', [{'currency_id': user.company_id.currency_id}])[0]['currency_id'].symbol
followup_table += '''
<table border="2" width=100%%>
<tr>
<td>Invoice date</td>
<td>Reference</td>
<td>Due date</td>
<td>Amount (%s)</td>
<td>Lit.</td>
</tr>
''' % (currency_symbol)
total = 0
for aml in currency_dict['line']:
block = aml['blocked'] and 'X' or ' '
total += aml['balance']
strbegin = "<TD> "
strend = "</TD> "
date = aml['date_maturity'] or aml['date']
if date <= ctx['current_date'] and aml['balance'] > 0:
strbegin = "<TD><B>"
strend = "</B></TD>"
followup_table +="<TR>" + strbegin + str(aml['date']) + strend + strbegin + aml['ref'] + strend + strbegin + str(date) + strend + strbegin + str(aml['balance']) + strend + strbegin + block + strend + "</TR>"
total = rml_parse.formatLang(total, dp='Account', currency_obj=object.company_id.currency_id)
followup_table += '''<tr> </tr>
</table>
<center>Amount due: %s </center>''' % (total)
%>
${followup_table}
${ctx.get('followup_table','')}
<br/>
@ -153,71 +85,34 @@ ${followup_table}
</record>
<!--Email template -->
<record id="email_template_account_followup_level2" model="email.template">
<field name="name">Follow-up of overdue invoices level 2</field>
<field name="email_from">${user.email or ''}</field>
<field name="subject">${user.company_id.name} Payment Follow-up</field>
<field name="email_to">${object.email}</field>
<field name="lang">${object.lang}</field>
<field name="name">Urging payment follow-up reminder email</field>
<field name="email_from">${user.email or '' | h}</field>
<field name="subject">${user.company_id.name | h} Payment Reminder</field>
<field name="email_to">${object.email | h}</field>
<field name="lang">${object.lang | h}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">
<p>Dear ${object.name},</p>
<p>Dear ${object.name | h},</p>
<p>
Despite several reminders, your account is still not settled.
Unless full payment is made in next 8 days, legal action for the recovery of the debt will be taken without
further notice.
I trust that this action will prove unnecessary and details of due payments is printed below.
In case of any queries concerning this matter, do not hesitate to contact our accounting department at (+32).10.68.94.39.
In case of any queries concerning this matter, do not hesitate to contact our accounting department.
</p>
<br/>
Best Regards,
<br/>
${user.name}
<br/>
${user.name | h}
<br/>
<br/>
<%
from openerp.addons.account_followup.report import account_followup_print
rml_parse = account_followup_print.report_rappel(object._cr, user.id, "followup_rml_parser")
final_res = rml_parse._lines_get_with_partner(object, user.company_id.id)
followup_table = ''
for currency_dict in final_res:
currency_symbol = currency_dict.get('line', [{'currency_id': user.company_id.currency_id}])[0]['currency_id'].symbol
followup_table += '''
<table border="2" width=100%%>
<tr>
<td>Invoice date</td>
<td>Reference</td>
<td>Due date</td>
<td>Amount (%s)</td>
<td>Lit.</td>
</tr>
''' % (currency_symbol)
total = 0
for aml in currency_dict['line']:
block = aml['blocked'] and 'X' or ' '
total += aml['balance']
strbegin = "<TD> "
strend = "</TD> "
date = aml['date_maturity'] or aml['date']
if date <= ctx['current_date'] and aml['balance'] > 0:
strbegin = "<TD><B>"
strend = "</B></TD>"
followup_table +="<TR>" + strbegin + str(aml['date']) + strend + strbegin + aml['ref'] + strend + strbegin + str(date) + strend + strbegin + str(aml['balance']) + strend + strbegin + block + strend + "</TR>"
total = rml_parse.formatLang(total, dp='Account', currency_obj=object.company_id.currency_id)
followup_table += '''<tr> </tr>
</table>
<center>Amount due: %s </center>''' % (total)
%>
${followup_table}
${ctx.get('followup_table','')}
<br/>
@ -228,81 +123,37 @@ ${followup_table}
<!-- Default follow up message -->
<record id="email_template_account_followup_default" model="email.template">
<field name="name">Default follow-up of overdue invoices</field>
<field name="email_from">${user.email or ''}</field>
<field name="subject">${user.company_id.name} Payment Follow-up</field>
<field name="email_to">${object.email}</field>
<field name="lang">${object.lang}</field>
<field name="name">Default payment follow-up reminder e-mail</field>
<field name="email_from">${user.email or '' | h}</field>
<field name="subject">${user.company_id.name | h} Payment Reminder</field>
<field name="email_to">${object.email | h}</field>
<field name="lang">${object.lang | h}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">
<p>Dear ${object.name},</p>
<p>Dear ${object.name | h},</p>
<p>
Exception made if there was a mistake of ours, it seems that the following amount stays unpaid. Please, take
appropriate measures in order to carry out this payment in the next 8 days.
Would your payment have been carried out after this mail was sent, please ignore this message. Do not hesitate to
contact our accounting department at (+32).10.68.94.39.
contact our accounting department.
</p>
<br/>
Best Regards,
</br>
</br>
<br/>
${user.name}
<br/>
${user.name | h}
<br/>
<br/>
<%
from openerp.addons.account_followup.report import account_followup_print
rml_parse = account_followup_print.report_rappel(object._cr, user.id, "followup_rml_parser")
final_res = rml_parse._lines_get_with_partner(object, user.company_id.id)
followup_table = ''
for currency_dict in final_res:
currency_symbol = currency_dict.get('line', [{'currency_id': user.company_id.currency_id}])[0]['currency_id'].symbol
followup_table += '''
<table border="2" width=100%%>
<tr>
<td>Invoice date</td>
<td>Reference</td>
<td>Due date</td>
<td>Amount (%s)</td>
<td>Lit.</td>
</tr>
''' % (currency_symbol)
total = 0
for aml in currency_dict['line']:
block = aml['blocked'] and 'X' or ' '
total += aml['balance']
strbegin = "<TD> "
strend = "</TD> "
date = aml['date_maturity'] or aml['date']
if date <= ctx['current_date'] and aml['balance'] > 0:
strbegin = "<TD><B>"
strend = "</B></TD>"
followup_table +="<TR>" + strbegin + str(aml['date']) + strend + strbegin + aml['ref'] + strend + strbegin + str(date) + strend + strbegin + str(aml['balance']) + strend + strbegin + block + strend + "</TR>"
total = rml_parse.formatLang(total, dp='Account', currency_obj=object.company_id.currency_id)
followup_table += '''<tr> </tr>
</table>
<center>Amount due: %s </center>''' % (total)
%>
${followup_table}
<br/>
${ctx.get('followup_table','')}
<br/>
</div>
]]></field>
</record>
<record id="demo_followup1" model="account_followup.followup">
<field name="company_id" ref="base.main_company"/>
@ -319,7 +170,7 @@ Dear %(partner_name)s,
Exception made if there was a mistake of ours, it seems that the following amount stays unpaid. Please, take appropriate measures in order to carry out this payment in the next 8 days.
Would your payment have been carried out after this mail was sent, please ignore this message. Do not hesitate to contact our accounting department at (+32).10.68.94.39.
Would your payment have been carried out after this mail was sent, please ignore this message. Do not hesitate to contact our accounting department.
Best Regards,
</field>
@ -342,15 +193,13 @@ We are disappointed to see that despite sending a reminder, that your account is
It is essential that immediate payment is made, otherwise we will have to consider placing a stop on your account which means that we will no longer be able to supply your company with (goods/services).
Please, take appropriate measures in order to carry out this payment in the next 8 days.
If there is a problem with paying invoice that we are not aware of, do not hesitate to contact our accounting department at (+32).10.68.94.39. so that we can resolve the matter quickly.
If there is a problem with paying invoice that we are not aware of, do not hesitate to contact our accounting department, so that we can resolve the matter quickly.
Details of due payments is printed below.
Best Regards,
</field>
</record>
<record id="demo_followup_line3" model="account_followup.followup.line">
<field name="name">Call the customer on the phone</field>
<field name="sequence">3</field>
@ -369,7 +218,7 @@ Unless full payment is made in next 8 days, then legal action for the recovery o
I trust that this action will prove unnecessary and details of due payments is printed below.
In case of any queries concerning this matter, do not hesitate to contact our accounting department at (+32).10.68.94.39.
In case of any queries concerning this matter, do not hesitate to contact our accounting department.
Best Regards,
</field>

View File

@ -17,7 +17,7 @@ Unless full payment is made in next 8 days, then legal action for the recovery o
I trust that this action will prove unnecessary and details of due payments is printed below.
In case of any queries concerning this matter, do not hesitate to contact our accounting department at (+32).10.68.94.39.
In case of any queries concerning this matter, do not hesitate to contact our accounting department.
Best Regards,
</field>
@ -39,7 +39,7 @@ Unless full payment is made in next 8 days, then legal action for the recovery o
I trust that this action will prove unnecessary and details of due payments is printed below.
In case of any queries concerning this matter, do not hesitate to contact our accounting department at (+32).10.68.94.39.
In case of any queries concerning this matter, do not hesitate to contact our accounting department.
Best Regards,
</field>

View File

@ -69,7 +69,6 @@
<record id="view_account_followup_followup_form" model="ir.ui.view">
<field name="name">account_followup.followup.form</field>
<field name="model">account_followup.followup</field>
<!-- <field name="group_ids" groups="base.group_multi_company"/>-->
<field name="arch" type="xml">
<form string="Follow-up" version="7.0">
<h1><field name="company_id" widget="selection" class="oe_inline"/></h1>
@ -77,9 +76,11 @@
To remind customers of paying their invoices, you can
define different actions depending on how severely
overdue the customer is. These actions are bundled
into folow-up levels that are triggered when the due
date of the most overdue invoice has passed a certain
amount of days.
into follow-up levels that are triggered when the due
date of an invoice has passed a certain
number of days. If there are other overdue invoices for the
same customer, the actions of the most
overdue invoice will be executed.
</p>
<field name="followup_line"/>
</form>
@ -91,7 +92,7 @@
<field name="model">account_followup.followup</field>
<field name="arch" type="xml">
<tree string="Follow-up">
<field name="company_id" /> <!--groups="base.group_multi_company"-->
<field name="company_id" />
</tree>
</field>
</record>
@ -180,18 +181,5 @@
</field>
</field>
</record>
<!-- <record id="view_move_line_tree" model="ir.ui.view">
<field name="name">account.move.line.tree.followup</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="arch" type="xml">
<field name="state" position="before">
<field name="followup_date"/>
<field name="followup_line_id"/>
</field>
</field>
</record> -->
</data>
</openerp>

File diff suppressed because it is too large Load Diff

View File

@ -7,20 +7,20 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-03 16:02+0000\n"
"PO-Revision-Date: 2010-12-16 00:03+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2012-12-07 10:43+0000\n"
"Last-Translator: Andrei Talpa (multibase.pt) <andrei.talpa@multibase.pt>\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-12-04 05:19+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:58+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_followup
#: view:account_followup.followup.line:0
#: field:account_followup.followup.line,manual_action:0
msgid "Manual Action"
msgstr ""
msgstr "Ação manual"
#. module: account_followup
#: help:res.partner,latest_followup_level_id:0
@ -30,7 +30,7 @@ msgstr ""
#. module: account_followup
#: view:res.partner:0
msgid "Group by"
msgstr ""
msgstr "Agrupar por"
#. module: account_followup
#: view:account_followup.stat:0
@ -398,7 +398,7 @@ msgstr ""
#: code:addons/account_followup/wizard/account_followup_print.py:155
#, python-format
msgid "Nobody"
msgstr ""
msgstr "Ninguém"
#. module: account_followup
#: field:account.move.line,followup_line_id:0

View File

@ -25,6 +25,8 @@ import pooler
from report import report_sxw
class report_rappel(report_sxw.rml_parse):
_name = "account_followup.report.rappel"
def __init__(self, cr, uid, name, context=None):
super(report_rappel, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
@ -79,7 +81,6 @@ class report_rappel(report_sxw.rml_parse):
final_res.append({'line': line_cur[cur]['line']})
return final_res
def _get_text(self, stat_line, followup_id, context=None):
if context is None:
context = {}
@ -108,7 +109,6 @@ class report_rappel(report_sxw.rml_parse):
'company_name': stat_line.company_id.name,
'user_signature': pooler.get_pool(self.cr.dbname).get('res.users').browse(self.cr, self.uid, self.uid, context).signature or '',
}
return text
report_sxw.report_sxw('report.account_followup.followup.print',

View File

@ -108,7 +108,7 @@ class TestAccountFollowup(TransactionCase):
def test_03_filter_on_credit(self):
""" Check the partners can be filtered on having credits """
cr, uid = self.cr, self.uid
ids = self.partner.search(cr, uid, [('credit', '>=', 0.0)])
ids = self.partner.search(cr, uid, [('payment_amount_due', '>=', 0.0)])
self.assertIn(self.partner_id, ids)
def test_04_action_done(self):
@ -153,7 +153,6 @@ class TestAccountFollowup(TransactionCase):
}, context={"followup_id": self.followup_id})
self.wizard.do_process(cr, uid, [self.wizard_id], context={"followup_id": self.followup_id})
partner_ref = self.partner.browse(cr, uid, self.partner_id)
print partner_ref.credit, partner_ref.payment_next_action_date, partner_ref.payment_responsible_id
self.assertEqual(0, self.partner.browse(cr, uid, self.partner_id).credit, "Credit != 0")
self.assertEqual(0, self.partner.browse(cr, uid, self.partner_id).payment_amount_due, "Amount Due != 0")
self.assertFalse(self.partner.browse(cr, uid, self.partner_id).payment_next_action_date, "Next action date not cleared")

View File

@ -152,7 +152,7 @@ class account_followup_print(osv.osv_memory):
if partner.max_followup_id.manual_action:
partner_obj.do_partner_manual_action(cr, uid, [partner.partner_id.id], context=context)
nbmanuals = nbmanuals + 1
key = partner.partner_id.payment_responsible_id.name or _("Nobody")
key = partner.partner_id.payment_responsible_id.name or _("Anybody")
if not key in manuals.keys():
manuals[key]= 1
else:
@ -198,15 +198,12 @@ class account_followup_print(osv.osv_memory):
ids = self.pool.get('res.partner').search(cr, uid, ['&', ('id', 'not in', partner_list_ids), '|',
('payment_responsible_id', '!=', False),
('payment_next_action_date', '!=', False)], context=context)
partners = self.pool.get('res.partner').browse(cr, uid, ids, context=context)
newids = []
for part in partners:
credit = 0
for aml in part.unreconciled_aml_ids:
credit +=aml.result
if credit <= 0:
newids.append(part.id)
self.pool.get('res.partner').action_done(cr, uid, newids, context=context)
partners_to_clear = []
for part in self.pool.get('res.partner').browse(cr, uid, ids, context=context):
if not part.unreconciled_aml_ids:
partners_to_clear.append(part.id)
self.pool.get('res.partner').action_done(cr, uid, partners_to_clear, context=context)
return len(ids)
def do_process(self, cr, uid, ids, context=None):

View File

@ -13,7 +13,7 @@
</group>
<p class ="oe_grey">
This action will send follow-up emails, print the letters and
set the manual actions per customers.
set the manual actions per customer, according to the follow-up levels defined.
</p>
<footer>
<button name="do_process" string="Send emails and generate letters" type="object" class="oe_highlight"/>

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-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-02-08 08:52+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"PO-Revision-Date: 2012-12-07 15:45+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\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-12-04 05:35+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_payment
#: model:ir.actions.act_window,help:account_payment.action_payment_order_tree
@ -28,6 +29,15 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klicken Sie zur Erstellung eines Zahlungsauftrags.\n"
" </p><p>\n"
" Ein Zahlungsauftrag ist eine Zahlungsaufforderung aus Ihrem "
"Unternehmen zur Zahlung \n"
" einer Lieferantenrechnung oder einer Rückerstattung durch "
"eine Kundengutschrift.\n"
" </p>\n"
" "
#. module: account_payment
#: field:payment.line,currency:0
@ -123,13 +133,16 @@ msgid ""
"You cannot cancel an invoice which has already been imported in a payment "
"order. Remove it from the following payment order : %s."
msgstr ""
"Sie können keine Rechnung stornieren, die Sie bereits in einen "
"Zahlungsauftrag übernommen haben. Entfernen Sie die Rechnung vom "
"Zahlungsauftrag: %s ."
#. module: account_payment
#: code:addons/account_payment/account_invoice.py:43
#: code:addons/account_payment/account_move_line.py:110
#, python-format
msgid "Error!"
msgstr ""
msgstr "Fehler !"
#. module: account_payment
#: report:payment.order:0
@ -194,6 +207,9 @@ msgid ""
" Once the bank is confirmed the status is set to 'Confirmed'.\n"
" Then the order is paid the status is 'Done'."
msgstr ""
"Wenn ein Zahlungsauftrag erstellt wird ist der Status 'Entwurf'.\n"
" Durch Bestätigung wechselt der Status in 'Bestätigt'.\n"
" Durch die tatsächliche Freigabe zu Zahlung wechselt der"
#. module: account_payment
#: view:payment.order:0
@ -219,7 +235,7 @@ msgstr "Strukturiert"
#. module: account_payment
#: view:account.bank.statement:0
msgid "Import Payment Lines"
msgstr ""
msgstr "Import von Zahlungspositionen"
#. module: account_payment
#: view:payment.line:0
@ -262,7 +278,7 @@ msgstr ""
#. module: account_payment
#: field:payment.order,date_created:0
msgid "Creation Date"
msgstr ""
msgstr "Datum Erstellung"
#. module: account_payment
#: help:payment.mode,journal:0
@ -369,7 +385,7 @@ msgstr "Beleg Zahlungsvorschlag"
#: code:addons/account_payment/account_move_line.py:110
#, python-format
msgid "There is no partner defined on the entry line."
msgstr ""
msgstr "Es gibt keinen Partner als Zahlungsempfänger für diese Position."
#. module: account_payment
#: help:payment.mode,name:0
@ -401,7 +417,7 @@ msgstr "Entwurf"
#: view:payment.order:0
#: field:payment.order,state:0
msgid "Status"
msgstr ""
msgstr "Status"
#. module: account_payment
#: help:payment.line,communication2:0
@ -449,7 +465,7 @@ msgstr "Suche"
#. module: account_payment
#: field:payment.order,user_id:0
msgid "Responsible"
msgstr ""
msgstr "Verantwortlicher"
#. module: account_payment
#: field:payment.line,date:0
@ -464,7 +480,7 @@ msgstr "Summe:"
#. module: account_payment
#: field:payment.order,date_done:0
msgid "Execution Date"
msgstr ""
msgstr "Datum Ausführung"
#. module: account_payment
#: view:account.payment.populate.statement:0
@ -582,7 +598,7 @@ msgstr "Verwendungszweck 2"
#. module: account_payment
#: field:payment.order,date_scheduled:0
msgid "Scheduled Date"
msgstr ""
msgstr "Geplantes Datum"
#. module: account_payment
#: view:account.payment.make.payment:0
@ -677,14 +693,14 @@ msgstr "Bezahlung"
#. module: account_payment
#: field:payment.order,date_prefered:0
msgid "Preferred Date"
msgstr ""
msgstr "bevorzugtes Datum"
#. module: account_payment
#: view:account.payment.make.payment:0
#: view:account.payment.populate.statement:0
#: view:payment.order.create:0
msgid "or"
msgstr ""
msgstr "oder"
#. module: account_payment
#: help:payment.mode,bank_id:0

View File

@ -0,0 +1,2 @@
import account_test
import report

View File

@ -0,0 +1,47 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 CCI Connect asbl (http://www.cciconnect.be) All Rights Reserved.
# Philmer <philmer@cciconnect.be>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name' : 'Accounting Consistency Tests',
'version' : '1.0',
'author' : 'OpenERP',
'category' : 'Accounting & Finance',
'website': 'http://www.openerp.com',
'description': """
Asserts on accounting.
======================
With this module you can manually check consistencies and inconsistencies of accounting module from menu Reporting/Accounting/Accounting Tests.
You can write a query in order to create Consistency Test and you will get the result of the test
in PDF format which can be accessed by Menu Reporting -> Accounting Tests, then select the test
and print the report from Print button in header area.
""",
'depends' : ['account'],
'data' : [
'security/ir.model.access.csv',
'account_test_view.xml',
'account_test_report.xml',
'account_test_data.xml',
],
'active': False,
'installable': True
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,65 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id: product_expiry.py 4304 2006-10-25 09:54:51Z ged $
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from osv import fields,osv
import pooler
import netsvc
import time
from xml import dom
CODE_EXEC_DEFAULT = '''\
res = []
cr.execute("select id, code from account_journal")
for record in cr.dictfetchall():
res.append(record['code'])
result = res
'''
class accounting_assert_test(osv.osv):
_name = "accounting.assert.test"
_order = "sequence"
_columns = {
'name': fields.char('Test Name', size=256, required=True, select=True, translate=True),
'desc': fields.text('Test Description', select=True, translate=True),
'code_exec': fields.text('Python code', required=True),
'active': fields.boolean('Active'),
'sequence': fields.integer('Sequence'),
}
_defaults = {
'code_exec': CODE_EXEC_DEFAULT,
'active': True,
'sequence': 10,
}
accounting_assert_test()

View File

@ -0,0 +1,172 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="accounting.assert.test" id="account_test_01">
<field name="sequence">1</field>
<field name="name">Test 1: General balance</field>
<field name="desc">Check the balance: Debit sum = Credit sum</field>
<field name="code_exec"><![CDATA[sql="""SELECT
sum(debit)-sum(credit) as balance
FROM account_move_line
"""
cr.execute(sql)
result=[]
res= cr.dictfetchall()
if res[0]['balance']!=0.0 and res[0]['balance'] is not None:
result.append(_('* The difference of the balance is: '))
result.append(res)
]]></field>
</record>
<record model="accounting.assert.test" id="account_test_02">
<field name="sequence">2</field>
<field name="name">Test 2: Opening a fiscal year</field>
<field name="desc">Check if the balance of the new opened fiscal year matches with last year's balance</field>
<field name="code_exec"><![CDATA[result = []
cr.execute("select coalesce(sum(debit),0) as debit_new_fyear,coalesce(sum(credit),0) as credit_new_fyear from account_move_line where period_id in (select id from account_period where state='draft' and special order by id desc limit 1);")
rec = cr.dictfetchall()
cr.execute("select coalesce(sum(debit),0) as debit_last_fyear,coalesce(sum(credit),0) as credit_last_fyear from account_move_line where period_id in (select period_id from account_fiscalyear where state='done' order by id desc limit 1);")
rec2= cr.dictfetchall()
if (rec2[0]['credit_last_fyear']-rec[0]['credit_new_fyear']!=0) or (rec2[0]['debit_last_fyear']-rec[0]['debit_new_fyear']!=0) :
result.append(_('* New fiscalyear debit and credit are:'))
result.append(rec[0])
result.append(_('* Last year debit and credit are:'))
result.append(rec2[0])
]]></field>
</record>
<record model="accounting.assert.test" id="account_test_03">
<field name="sequence">3</field>
<field name="name">Test 3: Movement lines</field>
<field name="desc">Check if movement lines are balanced and have the same date and period</field>
<field name="code_exec"><![CDATA[order_columns=['am_date','ml_date','am.period_id','ml.period_id','am.id']
sql="""SELECT
am.id as move_id,
sum(debit)-sum(credit) as balance,
am.period_id,
ml.period_id,
am.date as am_date,
ml.date as ml_date
FROM account_move am, account_move_line ml
WHERE
ml.move_id = am.id
GROUP BY am.name, am.id, am.state, am.period_id, ml.period_id,am.period_id, ml.period_id,am.date, ml.date
HAVING abs(sum(ml.debit-ml.credit)) <> 0 or am.period_id!=ml.period_id or (am.date!=ml.date)
"""
cr.execute(sql)
res = cr.dictfetchall()
if res:
res.insert(0,_('* The test failed for these movement lines:'))
result = res
]]></field>
</record>
<record model="accounting.assert.test" id="account_test_04">
<field name="sequence">4</field>
<field name="name">Test 4: Totally reconciled mouvements</field>
<field name="desc">Check if the totally reconciled movements are balanced</field>
<field name="code_exec"><![CDATA[res = []
cr.execute("SELECT distinct reconcile_id from account_move_line where reconcile_id is not null")
rec_ids = cr.dictfetchall()
for record in rec_ids :
cr.execute("SELECT distinct r.name,r.id from account_journal j,account_period p, account_move_reconcile r,account_move m, account_move_line ml where m.journal_id=j.id and m.period_id=p.id and ml.reconcile_id=%s and ml.move_id=m.id and ml.reconcile_id=r.id group by r.id,r.name having sum(ml.debit)-sum(ml.credit)<>0", (record['reconcile_id'],))
reconcile_ids=cr.dictfetchall()
if reconcile_ids:
res.append(', '.join(["Reconcile name: %(name)s, id=%(id)s " % r for r in reconcile_ids]))
result = res
if result:
result.insert(0,_('* The test failed for these reconciled items(id/name):'))
]]></field>
</record>
<record model="accounting.assert.test" id="account_test_05">
<field name="sequence">5</field>
<field name="name">Test 5.1 : Payable and Receivable accountant lines of reconciled invoices</field>
<field name="desc">Check that reconciled invoice for Sales/Purchases has reconciled entries for Payable and Receivable Accounts</field>
<field name="code_exec"><![CDATA[res = []
cr.execute("SELECT distinct inv.number,inv.id from account_invoice inv, account_move m, account_move_line ml, account_account a where m.id=ml.move_id and ml.account_id=a.id and a.type in ('receivable','payable') and inv.move_id=m.id and ml.reconcile_id is not null;")
records= cr.dictfetchall()
rec = [r['id'] for r in records]
res = reconciled_inv()
invoices = set(rec).difference(set(res))
result = [rec for rec in records if rec['id'] in invoices]
if result:
result.insert(0,_('* Invoices that need to be checked: '))
]]></field>
</record>
<record model="accounting.assert.test" id="account_test_05_2">
<field name="sequence">6</field>
<field name="name">Test 5.2 : Reconcilied invoices and Payable/Receivable accounts</field>
<field name="desc">Check that reconciled account moves, that define Payable and Receivable accounts, are belonging to reconciled invoices</field>
<field name="code_exec"><![CDATA[res = reconciled_inv()
result=[]
if res:
cr.execute("SELECT distinct inv.number,inv.id from account_invoice inv, account_move_line ml, account_account a, account_move m where m.id=ml.move_id and inv.move_id=m.id and inv.id=inv.move_id and ml.reconcile_id is null and a.type in ('receivable','payable') and ml.account_id=a.id and inv.id in %s",(tuple(res),))
records = cr.dictfetchall()
result = [rec for rec in records]
if result:
result.insert(0,_('* Invoices that need to be checked: '))
]]></field>
</record>
<record model="accounting.assert.test" id="account_test_06">
<field name="sequence">7</field>
<field name="name">Test 6 : Invoices status</field>
<field name="desc">Check that paid/reconciled invoices are not in 'Open' state</field>
<field name="code_exec"><![CDATA[
res = []
column_order = ['number','id','name','state']
if reconciled_inv():
cr.execute("select inv.name,inv.state,inv.id,inv.number from account_invoice inv where inv.state!='paid' and id in %s", (tuple(reconciled_inv()),))
res = cr.dictfetchall()
result = res
if result:
result.insert(0,_('* Invoices that need to be checked: '))
]]></field>
</record>
<record model="accounting.assert.test" id="account_test_06_1">
<field name="sequence">8</field>
<field name="name">Test 7: « View  » account type</field>
<field name="desc">Check that there's no move for any account with « View » account type</field>
<field name="code_exec"><![CDATA[column_order=['name','ref','id','date']
sql = "select id, name, ref, date from account_move_line where account_id in (select id from account_account where type = 'view')"
cr.execute(sql)
result = cr.dictfetchall()
if result:
result.insert(0,_('* Movement lines that need to be checked: '))
]]></field>
</record>
<record model="accounting.assert.test" id="account_test_07">
<field name="sequence">9</field>
<field name="name">Test 8 : Closing balance on bank statements</field>
<field name="desc">Check on bank statement that the Closing Balance = Starting Balance + sum of statement lines</field>
<field name="code_exec"><![CDATA[column_order = ['name','difference']
cr.execute("SELECT s.balance_start+sum(m.amount)-s.balance_end_real as difference, s.name from account_bank_statement s inner join account_bank_statement_line m on m.statement_id=s.id group by s.id, s.balance_start, s.balance_end_real,s.name having abs(s.balance_start+sum(m.amount)-s.balance_end_real) > 0.000000001;")
result = cr.dictfetchall()
if result:
result.insert(0,_('* Unbalanced bank statement that need to be checked: '))
]]></field>
</record>
<record model="accounting.assert.test" id="account_test_08">
<field name="sequence">10</field>
<field name="name">Test 9 : Accounts and partners on account moves</field>
<field name="desc">Check that general accounts and partners on account moves are active</field>
<field name="code_exec"><![CDATA[column_order=['partner_name','partner_active','account_name','move_line_id','period']
res = []
cr.execute("SELECT l.id as move_line_id,a.name as account_name,a.code as account_code,r.name as partner_name,r.active as partner_active,p.name as period from account_period p,res_partner r, account_account a,account_move_line l where l.account_id=a.id and l.partner_id=r.id and (not r.active or not a.active) and l.period_id=p.id")
res = cr.dictfetchall()
result = res
if result:
result.insert(0,_('* Here is the list of inactive partners and movement lines that are not correct: '))
]]></field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<report
id="account_assert_test_report"
model="accounting.assert.test"
name="account.test.assert.print"
rml="account_test/report/account_test.rml"
header="False"
string="Accounting Tests"/>
</data>
</openerp>

View File

@ -0,0 +1,85 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="account_assert_tree">
<field name="name">Tests</field>
<field name="model">accounting.assert.test</field>
<field name="arch" type="xml">
<tree string="Tests">
<field name="sequence"/>
<field name="name"/>
<field name="desc"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="account_assert_form">
<field name="name">Tests</field>
<field name="model">accounting.assert.test</field>
<field name="arch" type="xml">
<form string="Tests" version="7.0">
<sheet>
<group>
<group>
<field name="name"/>
<field name="sequence"/>
</group>
<group>
<field name="active"/>
</group>
</group>
<notebook>
<page string="Description">
<field name="desc" nolabel="1"/>
</page>
<page string="Expression">
<group string="Python Code">
<field colspan="4" name="code_exec" nolabel="1"/>
</group>
<group string="Code Help">
<pre>
Code should always set a variable named `result` with the result of your test, that can be a list or
a dictionary. If `result` is an empty list, it means that the test was succesful. Otherwise it will
try to translate and print what is inside `result`.
If the result of your test is a dictionary, you can set a variable named `column_order` to choose in
what order you want to print `result`'s content.
Should you need them, you can also use the following variables into your code:
* cr: cursor to the database
* uid: ID of the current user
In any ways, the code must be legal python statements with correct indentation (if needed).
Example:
sql = '''SELECT id, name, ref, date
FROM account_move_line
WHERE account_id IN (SELECT id FROM account_account WHERE type = 'view')
'''
cr.execute(sql)
result = cr.dictfetchall()
</pre>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_accounting_assert">
<field name="name">Accounting Tests</field>
<field name="res_model">accounting.assert.test</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create Accounting Test.
</p>
</field>
</record>
<menuitem name="Accounting Tests" parent="account.menu_finance_reporting" id="menu_action_license" action="action_accounting_assert"/>
</data>
</openerp>

View File

@ -0,0 +1,3 @@
import account_test_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,78 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,1" stop="1,1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,1" stop="1,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="1,1" stop="1,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Times-Roman" fontSize="16.0" leading="20" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Times-Roman" fontSize="16.0" leading="20" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<images/>
</stylesheet>
<story>
<para style="Heading">Accouting tests on [[ datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") ]]</para>
<para style="Standard">
<font color="white"> </font>
</para>
<section>
<para style="Standard">[[repeatIn(objects,'o')]]</para>
<blockTable colWidths="482.0" style="Table1">
<tr>
<td>
<para style="Table Contents">[[ o.name ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Table Contents"><i>[[ o.desc or '' ]]</i></para>
</td>
</tr>
</blockTable>
<blockTable colWidths="482.0" style="Tableau1">
<tr>
<td>
<para style="Table Contents">[[ repeatIn(execute_code(o.code_exec), 'test_result') ]]</para>
<para style="Table Contents">[[ test_result ]] </para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
</section>
</story>
</document>

View File

@ -0,0 +1,87 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import datetime
import time
from report import report_sxw
from tools.translate import _
#
# Use period and Journal for selection or resources
#
class report_assert_account(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(report_assert_account, self).__init__(cr, uid, name, context=context)
self.localcontext.update( {
'time': time,
'datetime': datetime,
'execute_code': self.execute_code,
})
def execute_code(self, code_exec):
def reconciled_inv():
"""
returns the list of invoices that are set as reconciled = True
"""
return self.pool.get('account.invoice').search(self.cr, self.uid, [('reconciled','=',True)])
def order_columns(item, cols=None):
"""
This function is used to display a dictionary as a string, with its columns in the order chosen.
:param item: dict
:param cols: list of field names
:returns: a list of tuples (fieldname: value) in a similar way that would dict.items() do except that the
returned values are following the order given by cols
:rtype: [(key, value)]
"""
if cols is None:
cols = item.keys()
return [(col, item.get(col)) for col in cols if col in item.keys()]
localdict = {
'cr': self.cr,
'uid': self.uid,
'reconciled_inv': reconciled_inv, #specific function used in different tests
'result': None, #used to store the result of the test
'column_order': None, #used to choose the display order of columns (in case you are returning a list of dict)
}
exec code_exec in localdict
result = localdict['result']
column_order = localdict.get('column_order', None)
if not isinstance(result, (tuple, list, set)):
result = [result]
if not result:
result = [_('The test was passed successfully')]
else:
def _format(item):
if isinstance(item, dict):
return ', '.join(["%s: %s" % (tup[0], tup[1]) for tup in order_columns(item, column_order)])
else:
return item
result = [_(_format(rec)) for rec in result]
return result
report_sxw.report_sxw('report.account.test.assert.print', 'accounting.assert.test', 'addons/account_test/report/account_test.rml', parser=report_assert_account, header=False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,3 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_accounting_assert_test","accounting.assert.test","model_accounting_assert_test",base.group_system,1,0,0,1
"access_accounting_assert_test_manager","accounting.assert.test","model_accounting_assert_test",account.group_account_manager,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_accounting_assert_test accounting.assert.test model_accounting_assert_test base.group_system 1 0 0 1
3 access_accounting_assert_test_manager accounting.assert.test model_accounting_assert_test account.group_account_manager 1 0 0 0

View File

@ -7,15 +7,15 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-03 16:01+0000\n"
"PO-Revision-Date: 2012-05-10 17:49+0000\n"
"PO-Revision-Date: 2012-12-07 20:51+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\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-12-04 05:41+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: account_voucher
#: field:account.bank.statement.line,voucher_id:0
@ -64,7 +64,7 @@ msgstr "Berechnet als Differenz zwischen Belege und Belegzeilen"
#. module: account_voucher
#: view:account.voucher:0
msgid "(Update)"
msgstr ""
msgstr "(Aktualisieren)"
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:1093
@ -99,7 +99,7 @@ msgstr "März"
#. module: account_voucher
#: field:account.voucher,message_unread:0
msgid "Unread Messages"
msgstr ""
msgstr "Ungelesene Nachrichten"
#. module: account_voucher
#: view:account.voucher:0
@ -109,7 +109,7 @@ msgstr "Bezahle Rechnung"
#. module: account_voucher
#: view:account.voucher:0
msgid "Are you sure you want to cancel this receipt?"
msgstr ""
msgstr "Sind Sie sicher, dass Sie diesen Beleg löschen wollen ?"
#. module: account_voucher
#: view:account.voucher:0
@ -130,7 +130,7 @@ msgstr "Gruppiere je Jahr der Rechnung"
#: view:sale.receipt.report:0
#: field:sale.receipt.report,user_id:0
msgid "Salesperson"
msgstr ""
msgstr "Verkäufer"
#. module: account_voucher
#: view:account.voucher:0
@ -144,6 +144,8 @@ msgid ""
"You can not change the journal as you already reconciled some statement "
"lines!"
msgstr ""
"Dieses Journal kann nicht geändert werden, da bereits Auszugspositionen "
"ausgeglichen wurden."
#. module: account_voucher
#: view:account.voucher:0
@ -161,6 +163,13 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
"                 Klicken Sie zur Erfassung eines Kaufbeleg.\n"
"               </ p>\n"
" Wenn der Kaufbeleg bestätigt wird, können Sie die\n"
"                 Lieferanten Bezahlung erfassen.\n"
"               </ p>\n"
" "
#. module: account_voucher
#: view:account.voucher:0
@ -210,7 +219,7 @@ msgstr "Anmerkungen"
#. module: account_voucher
#: field:account.voucher,message_ids:0
msgid "Messages"
msgstr ""
msgstr "Mitteilungen"
#. module: account_voucher
#: selection:account.voucher,type:0
@ -228,7 +237,7 @@ msgstr "Journal Buchung"
#: code:addons/account_voucher/account_voucher.py:964
#, python-format
msgid "Error!"
msgstr ""
msgstr "Fehler !"
#. module: account_voucher
#: field:account.voucher.line,amount:0
@ -272,11 +281,19 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klicken Sie zur Erstellung eines Kaufbeleg.\n"
" </p><p>\n"
" Wenn Sie den Kaufbeleg bestätigt haben, können Sie optional "
"die\n"
"                 Einzahlung sofort oder später erfassen.\n"
" </p>\n"
" "
#. module: account_voucher
#: help:account.voucher,message_unread:0
msgid "If checked new messages require your attention."
msgstr ""
msgstr "Benachrichtigung erfordert handeln"
#. module: account_voucher
#: model:ir.model,name:account_voucher.model_account_bank_statement_line
@ -298,7 +315,7 @@ msgstr "Steuer"
#: code:addons/account_voucher/account_voucher.py:864
#, python-format
msgid "Invalid Action!"
msgstr ""
msgstr "Diese Aktion ist fehlerhaft !"
#. module: account_voucher
#: field:account.voucher,comment:0
@ -316,6 +333,9 @@ msgid ""
"Holds the Chatter summary (number of messages, ...). This summary is "
"directly in html format in order to be inserted in kanban views."
msgstr ""
"Beinhaltet die Chatter Zusammenfassung (Anzahl der Nachrichten, ...). Diese "
"Zusammenfassung ist im HTML-Format, um in Kanban Karten Ansichten eingefügt "
"zu werden."
#. module: account_voucher
#: view:account.voucher:0
@ -325,7 +345,7 @@ msgstr "Zahlungsinformation"
#. module: account_voucher
#: view:account.voucher:0
msgid "(update)"
msgstr ""
msgstr "(aktualisieren)"
#. module: account_voucher
#: view:account.voucher:0
@ -361,6 +381,9 @@ msgid ""
"settings, to manage automatically the booking of accounting entries related "
"to differences between exchange rates."
msgstr ""
"Sie sollten in den Einstellungen für die Buchhaltung das 'Kursgewinn Konto' "
"einstellen, um automatisch die entstehenden erforderlichen Buchungen für "
"Wechselkursdifferenzen zu generieren."
#. module: account_voucher
#: view:account.voucher:0
@ -397,7 +420,7 @@ msgstr "Konto belasten (Soll)"
#: code:addons/account_voucher/account_voucher.py:1558
#, python-format
msgid "Unable to change journal !"
msgstr ""
msgstr "Es ist nicht möglich das Journal zu ändern !"
#. module: account_voucher
#: view:sale.receipt.report:0
@ -527,12 +550,22 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
"                 Klicken Sie zur Eingabe einer Einzahlung.\n"
"               </ p>\n"
"                 Erfassen Sie den Kunden, die Zahlungsmethode und den "
"Betrag, bevor Sie dann entweder \n"
" einfach nur die Zahlung bestätigen oder den automatischen "
"Vorschlag der auszugleichenden \n"
" Rechnungen bzw. Verkaufsbelege übernehmen und buchen.\n"
"               </ p>\n"
" "
#. module: account_voucher
#: field:account.config.settings,expense_currency_exchange_account_id:0
#: field:res.company,expense_currency_exchange_account_id:0
msgid "Loss Exchange Rate Account"
msgstr ""
msgstr "Kursverlust Konto"
#. module: account_voucher
#: view:account.voucher:0
@ -566,6 +599,9 @@ msgid ""
"settings, to manage automatically the booking of accounting entries related "
"to differences between exchange rates."
msgstr ""
"Sie sollten das Kursverlust Konto in den Einstellungen der Buchhaltung "
"definieren, um automatisch die Buchungen für die Kursverluste aus "
"Wechselkursänderungen zu generieren."
#. module: account_voucher
#: view:account.voucher:0
@ -575,7 +611,7 @@ msgstr "Aufwandspositionen"
#. module: account_voucher
#: view:account.voucher:0
msgid "Sale voucher"
msgstr ""
msgstr "Verkauf Belege"
#. module: account_voucher
#: help:account.voucher,is_multi_currency:0
@ -589,7 +625,7 @@ msgstr ""
#. module: account_voucher
#: view:account.invoice:0
msgid "Register Payment"
msgstr ""
msgstr "Erfassen Einzahlung"
#. module: account_voucher
#: field:account.statement.from.invoice.lines,line_ids:0
@ -627,17 +663,17 @@ msgstr "Kreditoren und Debitoren"
#. module: account_voucher
#: view:account.voucher:0
msgid "Voucher Payment"
msgstr ""
msgstr "Zahlung Belege"
#. module: account_voucher
#: field:sale.receipt.report,state:0
msgid "Voucher Status"
msgstr ""
msgstr "Belegstatus"
#. module: account_voucher
#: view:account.voucher:0
msgid "Are you sure to unreconcile this record?"
msgstr ""
msgstr "Möchten Sie wirklich den Ausgleich stornieren?"
#. module: account_voucher
#: field:account.voucher,company_id:0
@ -661,7 +697,7 @@ msgstr "OP-Ausgleich Saldo"
#: code:addons/account_voucher/account_voucher.py:960
#, python-format
msgid "Configuration Error !"
msgstr ""
msgstr "Konfigurationsfehler !"
#. module: account_voucher
#: view:account.voucher:0
@ -678,14 +714,14 @@ msgstr "Bruttobetrag"
#. module: account_voucher
#: view:account.voucher:0
msgid "Purchase Voucher"
msgstr ""
msgstr "Einkauf Belege"
#. module: account_voucher
#: view:account.voucher:0
#: field:account.voucher,state:0
#: view:sale.receipt.report:0
msgid "Status"
msgstr ""
msgstr "Status"
#. module: account_voucher
#: view:account.voucher:0
@ -696,7 +732,7 @@ msgstr "Zuordnung"
#: view:account.statement.from.invoice.lines:0
#: view:account.voucher:0
msgid "or"
msgstr ""
msgstr "oder"
#. module: account_voucher
#: selection:sale.receipt.report,month:0
@ -721,7 +757,7 @@ msgstr "Oktober"
#: code:addons/account_voucher/account_voucher.py:961
#, python-format
msgid "Please activate the sequence of selected journal !"
msgstr ""
msgstr "Bitte aktivieren Sie die Nummernfolge für das gewählte Journal !"
#. module: account_voucher
#: selection:sale.receipt.report,month:0
@ -779,7 +815,7 @@ msgstr "Betrag Ausgeglichen"
#: field:account.voucher,message_comment_ids:0
#: help:account.voucher,message_comment_ids:0
msgid "Comments and emails"
msgstr ""
msgstr "Kommentare und EMails"
#. module: account_voucher
#: model:ir.actions.act_window,help:account_voucher.action_vendor_payment
@ -792,6 +828,14 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
"                 Klicken Sie zur Eingabe einer Lieferanten Zahlung.\n"
"               </ p>\n"
"                 OpenERP hilft bei der Ermittlung der offenen Rechnungen für "
"Zahlungsvorschläge \n"
" und hilft bei der Verfolgung von Zahlungen .\n"
"               </ p>\n"
" "
#. module: account_voucher
#: selection:account.voucher,pay_now:0
@ -828,18 +872,18 @@ msgstr "Unternehmen"
#. module: account_voucher
#: field:account.voucher,message_summary:0
msgid "Summary"
msgstr ""
msgstr "Zusammenfassung"
#. module: account_voucher
#: field:account.voucher,active:0
msgid "Active"
msgstr ""
msgstr "Aktiv"
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:965
#, python-format
msgid "Please define a sequence on the journal."
msgstr ""
msgstr "Bitte definieren Sie eine Nummernfolge für dieses Journal."
#. module: account_voucher
#: view:account.voucher:0
@ -855,7 +899,7 @@ msgstr "Gruppiert je Rechnungsdatum"
#: code:addons/account_voucher/account_voucher.py:1093
#, python-format
msgid "Wrong bank statement line"
msgstr ""
msgstr "Falsche Bankauszugposition"
#. module: account_voucher
#: view:account.voucher:0
@ -952,7 +996,7 @@ msgstr "Abbrechen"
#. module: account_voucher
#: model:ir.actions.client,name:account_voucher.action_client_invoice_menu
msgid "Open Invoicing Menu"
msgstr ""
msgstr "Offene Rechnungen Auswahl"
#. module: account_voucher
#: selection:account.voucher,state:0
@ -972,6 +1016,8 @@ msgstr "Buchungsjournale"
#, python-format
msgid "Please define default credit/debit accounts on the journal \"%s\"."
msgstr ""
"Bitte definieren Sie je ein Standard Soll / Haben Konto für das Journal "
"\"%s\"."
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.act_pay_voucher
@ -1021,6 +1067,16 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p>\n"
" Durch diese Statistik können Sie sich einen Überblick über die "
"abgerechneten Rechnungen \n"
" verschaffen sowie den Status der nicht termingerechten "
"Zahlungen bewerten. Die \n"
" Sucheinstellung kann verwendet werden, um Statistiken zu "
"personalisieren \n"
" und bedarfsgerecht anzupassen.\n"
" </p>\n"
" "
#. module: account_voucher
#: view:account.voucher:0
@ -1050,7 +1106,7 @@ msgstr "Mai"
#. module: account_voucher
#: view:account.voucher:0
msgid "Sale Receipt"
msgstr ""
msgstr "Verkauf Buchungsbelege"
#. module: account_voucher
#: view:account.voucher:0
@ -1143,7 +1199,7 @@ msgstr "Jahr"
#: field:account.config.settings,income_currency_exchange_account_id:0
#: field:res.company,income_currency_exchange_account_id:0
msgid "Gain Exchange Rate Account"
msgstr ""
msgstr "Kursverlust Konto"
#. module: account_voucher
#: selection:sale.receipt.report,month:0
@ -1163,7 +1219,7 @@ msgstr "Standard Typ"
#. module: account_voucher
#: help:account.voucher,message_ids:0
msgid "Messages and communication history"
msgstr ""
msgstr "Nachrichten und Kommunikation Historie"
#. module: account_voucher
#: model:ir.model,name:account_voucher.model_account_statement_from_invoice_lines
@ -1187,12 +1243,14 @@ msgid ""
"The amount of the voucher must be the same amount as the one on the "
"statement line."
msgstr ""
"Der Betrag für diesen Beleg sollte identisch sein mit demjenigen auf dem "
"Bankauszug."
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:864
#, python-format
msgid "Cannot delete voucher(s) which are already opened or paid."
msgstr ""
msgstr "Offene oder bezahlte Belege können nicht storniert werden"
#. module: account_voucher
#: help:account.voucher,date:0
@ -1202,7 +1260,7 @@ msgstr "Tatsächliches Buchungsdatum"
#. module: account_voucher
#: model:mail.message.subtype,name:account_voucher.mt_voucher
msgid "Status Change"
msgstr ""
msgstr "Status Änderung"
#. module: account_voucher
#: selection:account.voucher,payment_option:0
@ -1251,7 +1309,7 @@ msgstr "Offener Saldo"
#: code:addons/account_voucher/account_voucher.py:1001
#, python-format
msgid "Insufficient Configuration!"
msgstr ""
msgstr "Unzureichende Konfiguration !"
#. module: account_voucher
#: help:account.voucher,active:0
@ -1260,6 +1318,9 @@ msgid ""
"inactive, which allow to hide the customer/supplier payment while the bank "
"statement isn't confirmed."
msgstr ""
"Standardmäßig werden die Zahlungsausgleiche aus Bank Belegen als inaktiv "
"gesetzt, um Kunden / Lieferanten Bezahlung zu verbergen, während der "
"Kontoauszug noch nicht endgültig bestätigt wurde."
#~ msgid "On Account of :"
#~ msgstr "Bezug Konto:"

View File

@ -36,7 +36,7 @@ from itertools import groupby
from operator import itemgetter
FIELD_STATES = [('clear', 'Clear'), ('anonymized', 'Anonymized'), ('not_existing', 'Not Existing')]
FIELD_STATES = [('clear', 'Clear'), ('anonymized', 'Anonymized'), ('not_existing', 'Not Existing'), ('new', 'New')]
ANONYMIZATION_STATES = FIELD_STATES + [('unstable', 'Unstable')]
WIZARD_ANONYMIZATION_STATES = [('clear', 'Clear'), ('anonymized', 'Anonymized'), ('unstable', 'Unstable')]
ANONYMIZATION_HISTORY_STATE = [('started', 'Started'), ('done', 'Done'), ('in_exception', 'Exception occured')]

View File

@ -83,11 +83,11 @@ class audittrail_rule(osv.osv):
"domain": "[('object_id','=', " + str(thisrule.object_id.id) + "), ('res_id', '=', active_id)]"
}
action_id = obj_action.create(cr, uid, val)
action_id = obj_action.create(cr, SUPERUSER_ID, val)
self.write(cr, uid, [thisrule.id], {"state": "subscribed", "action_id": action_id})
keyword = 'client_action_relate'
value = 'ir.actions.act_window,' + str(action_id)
res = obj_model.ir_set(cr, uid, 'action', keyword, 'View_log_' + thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
res = obj_model.ir_set(cr, SUPERUSER_ID, 'action', keyword, 'View_log_' + thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
#End Loop
return True
@ -109,7 +109,7 @@ class audittrail_rule(osv.osv):
setattr(function[0], function[1], function[2])
w_id = obj_action.search(cr, uid, [('name', '=', 'View Log'), ('res_model', '=', 'audittrail.log'), ('src_model', '=', thisrule.object_id.model)])
if w_id:
obj_action.unlink(cr, uid, w_id)
obj_action.unlink(cr, SUPERUSER_ID, w_id)
value = "ir.actions.act_window" + ',' + str(w_id[0])
val_id = ir_values_obj.search(cr, uid, [('model', '=', thisrule.object_id.model), ('value', '=', value)])
if val_id:

View File

@ -0,0 +1,30 @@
# French 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-11-24 02:52+0000\n"
"PO-Revision-Date: 2012-12-07 10:27+0000\n"
"Last-Translator: Quentin THEURET <Unknown>\n"
"Language-Team: French <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: auth_anonymous
#. openerp-web
#: code:addons/auth_anonymous/static/src/xml/auth_anonymous.xml:9
#, python-format
msgid "Login"
msgstr "Connexion"
#. module: auth_anonymous
#: model:res.groups,name:auth_anonymous.group_anonymous
msgid "Anonymous Group"
msgstr ""

View File

@ -0,0 +1,135 @@
# French 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-12-03 16:02+0000\n"
"PO-Revision-Date: 2012-12-07 10:28+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: French <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: auth_oauth
#: field:auth.oauth.provider,validation_endpoint:0
msgid "Validation URL"
msgstr ""
#. module: auth_oauth
#: field:auth.oauth.provider,auth_endpoint:0
msgid "Authentication URL"
msgstr ""
#. module: auth_oauth
#: model:ir.model,name:auth_oauth.model_base_config_settings
msgid "base.config.settings"
msgstr ""
#. module: auth_oauth
#: field:auth.oauth.provider,name:0
msgid "Provider name"
msgstr ""
#. module: auth_oauth
#: field:auth.oauth.provider,scope:0
msgid "Scope"
msgstr ""
#. module: auth_oauth
#: field:res.users,oauth_provider_id:0
msgid "OAuth Provider"
msgstr ""
#. module: auth_oauth
#: field:auth.oauth.provider,css_class:0
msgid "CSS class"
msgstr ""
#. module: auth_oauth
#: field:auth.oauth.provider,body:0
msgid "Body"
msgstr ""
#. module: auth_oauth
#: model:ir.model,name:auth_oauth.model_res_users
msgid "Users"
msgstr ""
#. module: auth_oauth
#: field:auth.oauth.provider,sequence:0
msgid "unknown"
msgstr ""
#. module: auth_oauth
#: field:res.users,oauth_access_token:0
msgid "OAuth Access Token"
msgstr ""
#. module: auth_oauth
#: field:auth.oauth.provider,client_id:0
#: field:base.config.settings,auth_oauth_facebook_client_id:0
#: field:base.config.settings,auth_oauth_google_client_id:0
msgid "Client ID"
msgstr ""
#. module: auth_oauth
#: model:ir.ui.menu,name:auth_oauth.menu_oauth_providers
msgid "OAuth Providers"
msgstr ""
#. module: auth_oauth
#: model:ir.model,name:auth_oauth.model_auth_oauth_provider
msgid "OAuth2 provider"
msgstr ""
#. module: auth_oauth
#: field:res.users,oauth_uid:0
msgid "OAuth User ID"
msgstr ""
#. module: auth_oauth
#: field:base.config.settings,auth_oauth_facebook_enabled:0
msgid "Allow users to sign in with Facebook"
msgstr ""
#. module: auth_oauth
#: sql_constraint:res.users:0
msgid "OAuth UID must be unique per provider"
msgstr ""
#. module: auth_oauth
#: help:res.users,oauth_uid:0
msgid "Oauth Provider user_id"
msgstr ""
#. module: auth_oauth
#: field:auth.oauth.provider,data_endpoint:0
msgid "Data URL"
msgstr ""
#. module: auth_oauth
#: view:auth.oauth.provider:0
msgid "arch"
msgstr ""
#. module: auth_oauth
#: model:ir.actions.act_window,name:auth_oauth.action_oauth_provider
msgid "Providers"
msgstr ""
#. module: auth_oauth
#: field:base.config.settings,auth_oauth_google_enabled:0
msgid "Allow users to sign in with Google"
msgstr ""
#. module: auth_oauth
#: field:auth.oauth.provider,enabled:0
msgid "Allowed"
msgstr ""

View File

@ -27,7 +27,7 @@
</xpath>
<!-- hide field set_password -->
<field name="new_password" position="replace">
<field name="new_password" groups="base.group_no_one"/>
<field name="new_password" groups="base.group_no_one" password="True"/>
</field>
</field>
</record>

View File

@ -2,43 +2,6 @@
<openerp>
<data>
<!-- Read/Unread actions -->
<record id="actions_server_crm_meeting_read" model="ir.actions.server">
<field name="name">CRM Meeting: Mark read</field>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_crm_meeting"/>
<field name="state">code</field>
<field name="code">self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context)</field>
</record>
<record id="action_crm_meeting_read" model="ir.values">
<field name="name">action_crm_meeting_read</field>
<field name="action_id" ref="actions_server_crm_meeting_read"/>
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_meeting_read'))"/>
<field name="key">action</field>
<field name="model_id" ref="model_crm_meeting"/>
<field name="model">crm.meeting</field>
<field name="key2">client_action_multi</field>
</record>
<record id="actions_server_crm_meeting_unread" model="ir.actions.server">
<field name="name">CRM Meeting: Mark unread</field>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_crm_meeting"/>
<field name="state">code</field>
<field name="code">self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context)</field>
</record>
<record id="action_crm_meeting_unread" model="ir.values">
<field name="name">action_crm_meeting_unread</field>
<field name="action_id" ref="actions_server_crm_meeting_unread"/>
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_meeting_unread'))"/>
<field name="key">action</field>
<field name="model_id" ref="model_crm_meeting"/>
<field name="model">crm.meeting</field>
<field name="key2">client_action_multi</field>
</record>
<!-- CRM Meetings Types Form View -->

View File

@ -8,14 +8,15 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-03 16:03+0000\n"
"PO-Revision-Date: 2012-12-01 11:25+0000\n"
"Last-Translator: Luiz Fernando M.França <Unknown>\n"
"PO-Revision-Date: 2012-12-07 22:49+0000\n"
"Last-Translator: Fábio Martinelli - http://zupy.com.br "
"<webmaster@guaru.net>\n"
"Language-Team: Brazilian Portuguese <pt_BR@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-12-04 05:50+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: base_calendar
#: selection:calendar.alarm,trigger_related:0
@ -364,6 +365,9 @@ msgid ""
"Holds the Chatter summary (number of messages, ...). This summary is "
"directly in html format in order to be inserted in kanban views."
msgstr ""
"Contém o resumo da conversação (número de mensagens, ...). Este resumo é "
"gerado diretamente em formato HTML para que possa ser inserido nas visões "
"kanban."
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:388
@ -518,7 +522,7 @@ msgstr "Email"
#. module: base_calendar
#: model:ir.actions.server,name:base_calendar.actions_server_crm_meeting_unread
msgid "CRM Meeting: Mark unread"
msgstr ""
msgstr "CRM Reunião : Marcar como não lida"
#. module: base_calendar
#: selection:calendar.alarm,state:0
@ -1061,7 +1065,7 @@ msgstr "Intervalo"
#. module: base_calendar
#: model:ir.actions.server,name:base_calendar.actions_server_crm_meeting_read
msgid "CRM Meeting: Mark read"
msgstr ""
msgstr "CRM Reunião: Marcar como lida"
#. module: base_calendar
#: selection:calendar.event,week_list:0
@ -1173,7 +1177,7 @@ msgstr "Detalhes do Lembrete"
#. module: base_calendar
#: model:crm.meeting.type,name:base_calendar.categ_meet3
msgid "Off-site Meeting"
msgstr ""
msgstr "Reunião Externa"
#. module: base_calendar
#: view:crm.meeting:0

View File

@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-03 16:03+0000\n"
"PO-Revision-Date: 2011-02-15 15:37+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2012-12-07 10:31+0000\n"
"Last-Translator: WANTELLET Sylvain <Swantellet@tetra-info.com>\n"
"Language-Team: French <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-12-04 05:53+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "Users"
msgstr ""
msgstr "Utilisateurs"
#, python-format
#~ msgid "Error"

View File

@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-03 16:03+0000\n"
"PO-Revision-Date: 2011-03-15 23:59+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2012-12-07 08:15+0000\n"
"Last-Translator: Denis Karataev <dskarataev@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-12-04 05:53+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "Users"
msgstr ""
msgstr "Пользователи"
#~ msgid "res.users"
#~ msgstr "res.users"

View File

@ -0,0 +1,256 @@
# Norwegian Bokmal 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-12-03 16:03+0000\n"
"PO-Revision-Date: 2012-12-06 10:25+0000\n"
"Last-Translator: Kaare Pettersen <Unknown>\n"
"Language-Team: Norwegian Bokmal <nb@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-12-07 04:36+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: base_gengo
#: view:res.company:0
msgid "Comments for Translator"
msgstr "Kommentarer til oversetter."
#. module: base_gengo
#: field:ir.translation,job_id:0
msgid "Gengo Job ID"
msgstr "Gengo jobb ID."
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:114
#, python-format
msgid "This language is not supported by the Gengo translation services."
msgstr "Dette språket er ikke støttet av Gengo oversettings tjenester."
#. module: base_gengo
#: field:res.company,gengo_comment:0
msgid "Comments"
msgstr "Kommentarer."
#. module: base_gengo
#: field:res.company,gengo_private_key:0
msgid "Gengo Private Key"
msgstr "Gengo privat nøkkel."
#. module: base_gengo
#: model:ir.model,name:base_gengo.model_base_gengo_translations
msgid "base.gengo.translations"
msgstr "Base.Gengo.Oversettelser."
#. module: base_gengo
#: help:res.company,gengo_auto_approve:0
msgid "Jobs are Automatically Approved by Gengo."
msgstr "Jobber godkjennes automatisk ved Gengo."
#. module: base_gengo
#: field:base.gengo.translations,lang_id:0
msgid "Language"
msgstr "Språk."
#. module: base_gengo
#: field:ir.translation,gengo_comment:0
msgid "Comments & Activity Linked to Gengo"
msgstr "Kommentarer og aktivitet knyttet til Gengo."
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:124
#, python-format
msgid "Gengo Sync Translation (Response)"
msgstr ""
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:72
#, python-format
msgid ""
"Gengo `Public Key` or `Private Key` are missing. Enter your Gengo "
"authentication parameters under `Settings > Companies > Gengo Parameters`."
msgstr ""
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Translation By Machine"
msgstr "Oversetting av maskin."
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:155
#, python-format
msgid ""
"%s\n"
"\n"
"--\n"
" Commented on %s by %s."
msgstr ""
"%s\n"
"\n"
"--\n"
"Kommentarer på %s by %s."
#. module: base_gengo
#: field:ir.translation,gengo_translation:0
msgid "Gengo Translation Service Level"
msgstr "Gengo Oversettelse tjeneste nivå."
#. module: base_gengo
#: constraint:ir.translation:0
msgid ""
"The Gengo translation service selected is not supported for this language."
msgstr ""
"Den Gengo oversettelses tjeneste som er valgt støttes ikke for dette språket."
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Standard"
msgstr "Standard"
#. module: base_gengo
#: help:ir.translation,gengo_translation:0
msgid ""
"You can select here the service level you want for an automatic translation "
"using Gengo."
msgstr ""
"Du kan velge her tjenestenivået du ønsker for en automatisk oversettelse ved "
"hjelp av Gengo."
#. module: base_gengo
#: field:base.gengo.translations,restart_send_job:0
msgid "Restart Sending Job"
msgstr ""
#. module: base_gengo
#: view:ir.translation:0
msgid "To Approve In Gengo"
msgstr "Slik godkjenner du I Gengo."
#. module: base_gengo
#: view:res.company:0
msgid "Private Key"
msgstr "Privat nøkkel."
#. module: base_gengo
#: view:res.company:0
msgid "Public Key"
msgstr "Offentlig nøkkel."
#. module: base_gengo
#: field:res.company,gengo_public_key:0
msgid "Gengo Public Key"
msgstr "Gengo offentlig nøkkel."
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:123
#, python-format
msgid "Gengo Sync Translation (Request)"
msgstr "Gengo synkronisering oversettelse (Forespørsel)"
#. module: base_gengo
#: view:ir.translation:0
msgid "Translations"
msgstr "Oversettelser."
#. module: base_gengo
#: field:res.company,gengo_auto_approve:0
msgid "Auto Approve Translation ?"
msgstr "Automatisk godkjenning oversettelse."
#. module: base_gengo
#: model:ir.actions.act_window,name:base_gengo.action_wizard_base_gengo_translations
#: model:ir.ui.menu,name:base_gengo.menu_action_wizard_base_gengo_translations
msgid "Gengo: Manual Request of Translation"
msgstr "Gengo: Manuell forespørsel av oversetting."
#. module: base_gengo
#: code:addons/base_gengo/ir_translation.py:62
#: code:addons/base_gengo/wizard/base_gengo_translations.py:109
#, python-format
msgid "Gengo Authentication Error"
msgstr ""
#. module: base_gengo
#: model:ir.model,name:base_gengo.model_res_company
msgid "Companies"
msgstr "Firmaer."
#. module: base_gengo
#: view:ir.translation:0
msgid ""
"Note: If the translation state is 'In Progress', it means that the "
"translation has to be approved to be uploaded in this system. You are "
"supposed to do that directly by using your Gengo Account"
msgstr ""
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:82
#, python-format
msgid ""
"Gengo connection failed with this message:\n"
"``%s``"
msgstr ""
#. module: base_gengo
#: view:res.company:0
msgid "Gengo Parameters"
msgstr ""
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "Send"
msgstr "Send."
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Ultra"
msgstr "Ultra."
#. module: base_gengo
#: model:ir.model,name:base_gengo.model_ir_translation
msgid "ir.translation"
msgstr "Ir.Oversettelse."
#. module: base_gengo
#: view:ir.translation:0
msgid "Gengo Translation Service"
msgstr "Gengo oversettelse tjeneste."
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Pro"
msgstr "Profesjonell."
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "Gengo Request Form"
msgstr "Gengo forespørsel form."
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:114
#, python-format
msgid "Warning"
msgstr "Advarsel."
#. module: base_gengo
#: help:res.company,gengo_comment:0
msgid ""
"This comment will be automatically be enclosed in each an every request sent "
"to Gengo"
msgstr ""
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "Cancel"
msgstr "Avbryt."
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "or"
msgstr "Eller."

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-11-24 02:52+0000\n"
"PO-Revision-Date: 2012-11-29 15:28+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2012-12-07 10:31+0000\n"
"Last-Translator: Numérigraphe <Unknown>\n"
"Language-Team: French <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-30 05:08+0000\n"
"X-Generator: Launchpad (build 16319)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: base_import
#. openerp-web
@ -1016,7 +1016,7 @@ msgstr ""
#: code:addons/base_import/static/src/xml/import.xml:170
#, python-format
msgid "CSV file for Products"
msgstr ""
msgstr "Fichier CSV des articles"
#. module: base_import
#. openerp-web

File diff suppressed because it is too large Load Diff

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-11-24 02:52+0000\n"
"PO-Revision-Date: 2012-12-04 10:03+0000\n"
"PO-Revision-Date: 2012-12-07 10:32+0000\n"
"Last-Translator: WANTELLET Sylvain <Swantellet@tetra-info.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-12-05 05:19+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2012-12-08 04:58+0000\n"
"X-Generator: Launchpad (build 16341)\n"
#. module: base_setup
#: view:sale.config.settings:0
@ -63,12 +63,12 @@ msgstr "Membre"
#. module: base_setup
#: view:base.config.settings:0
msgid "Portal access"
msgstr ""
msgstr "Accès au portail"
#. module: base_setup
#: view:base.config.settings:0
msgid "Authentication"
msgstr ""
msgstr "Authentification"
#. module: base_setup
#: view:sale.config.settings:0
@ -80,7 +80,7 @@ msgstr "Devis et bons de commande"
#: model:ir.actions.act_window,name:base_setup.action_general_configuration
#: model:ir.ui.menu,name:base_setup.menu_general_configuration
msgid "General Settings"
msgstr ""
msgstr "Paramètres généraux"
#. module: base_setup
#: selection:base.setup.terminology,partner:0
@ -95,7 +95,7 @@ msgstr ""
#. module: base_setup
#: field:sale.config.settings,module_crm:0
msgid "CRM"
msgstr ""
msgstr "CRM"
#. module: base_setup
#: selection:base.setup.terminology,partner:0
@ -125,7 +125,7 @@ msgstr ""
#. module: base_setup
#: field:sale.config.settings,module_web_linkedin:0
msgid "Get contacts automatically from linkedIn"
msgstr ""
msgstr "Récupérer les contacts automatiquement de LinkedIn"
#. module: base_setup
#: field:sale.config.settings,module_plugin_thunderbird:0
@ -145,7 +145,7 @@ msgstr ""
#. module: base_setup
#: view:base.config.settings:0
msgid "Import / Export"
msgstr ""
msgstr "Import / Export"
#. module: base_setup
#: view:sale.config.settings:0

View File

@ -60,6 +60,7 @@ class sale_config_settings(osv.osv_memory):
'module_web_linkedin': fields.boolean('Get contacts automatically from linkedIn',
help="""When you create a new contact (person or company), you will be able to load all the data from LinkedIn (photos, address, etc)."""),
'module_crm': fields.boolean('CRM'),
'module_sale' : fields.boolean('SALE'),
'module_plugin_thunderbird': fields.boolean('Enable Thunderbird plug-in',
help="""The plugin allows you archive email and its attachments to the selected
OpenERP objects. You can select a partner, or a lead and

View File

@ -105,7 +105,8 @@
</div>
</group>
</div>
<div name="customer feature">
<div name="customer feature" attrs="{'invisible': [('module_sale','=',False)]}">
<field name="module_sale" invisible="1"/>
<separator string="Quotations and Sales Orders"/>
<group name="Customer">
<label for="id" string="Customer Features"/>

View File

@ -176,18 +176,21 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
action = result,
view_mode = action_attrs.view_mode;
if (action_attrs.context && action_attrs.context['dashboard_merge_domains_contexts'] === false) {
// evaluate action_attrs context and domain
action_attrs.context = instance.web.pyeval.eval(
'context', action_attrs.context || {});
action_attrs.domain = instance.web.pyeval.eval(
'domain', action_attrs.domain || [], action_attrs.context);
if (action_attrs.context['dashboard_merge_domains_contexts'] === false) {
// TODO: replace this 6.1 workaround by attribute on <action/>
action.context = action_attrs.context || {};
action.domain = action_attrs.domain || [];
} else {
if (action_attrs.context) {
action.context = _.extend((action.context || {}), action_attrs.context);
}
if (action_attrs.domain) {
action.domain = action.domain || [];
action.domain.unshift.apply(action.domain, action_attrs.domain);
}
action.context = instance.web.pyeval.eval(
'contexts', [action.context || {}, action_attrs.context]);
action.domain = instance.web.pyeval.eval(
'domains', [action_attrs.domain, action.domain || []],
action.context)
}
var action_orig = _.extend({ flags : {} }, action);

View File

@ -67,15 +67,11 @@ Dashboard for CRM will include:
'security/crm_security.xml',
'security/ir.model.access.csv',
'wizard/crm_lead_to_partner_view.xml',
'wizard/crm_lead_to_opportunity_view.xml',
'wizard/crm_phonecall_to_phonecall_view.xml',
'wizard/crm_phonecall_to_partner_view.xml',
'wizard/crm_phonecall_to_opportunity_view.xml',
'wizard/crm_opportunity_to_phonecall_view.xml',
'wizard/crm_partner_to_opportunity_view.xml',
'wizard/crm_merge_opportunities_view.xml',
@ -109,6 +105,7 @@ Dashboard for CRM will include:
'test': [
'test/process/communication_with_customer.yml',
'test/process/lead2opportunity2win.yml',
'test/process/lead2opportunity_assign_salesmen.yml',
'test/process/merge_opportunity.yml',
'test/process/cancel_lead.yml',
'test/process/action_rule.yml',

View File

@ -197,8 +197,9 @@ class crm_case_categ(osv.osv):
def _find_object_id(self, cr, uid, context=None):
"""Finds id for case object"""
object_id = context and context.get('object_id', False) or False
ids = self.pool.get('ir.model').search(cr, uid, [('id', '=', object_id)])
context = context or {}
object_id = context.get('object_id', False)
ids = self.pool.get('ir.model').search(cr, uid, ['|',('id', '=', object_id),('model', '=', context.get('object_name', False))])
return ids and ids[0] or False
_defaults = {

View File

@ -1,7 +1,13 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!-- email server actions -->
<!-- demo automated actions add messge on new lead after 5 days -->
<record id="filter_draft_lead" model="ir.filters">
<field name="name">Draft Leads</field>
<field name="model_id">crm.lead</field>
<field name="domain">[('state','=','draft')]</field>
<field name="user_id" eval="False"/>
</record>
<record id="action_email_reminder_lead" model="ir.actions.server">
<field name="name">Reminder to User</field>
<field name="model_id" ref="model_crm_lead"/>
@ -10,46 +16,12 @@
<field name="state">email</field>
<field name="email">object.user_id.email</field>
<field name="subject">Reminder on Lead: [[object.id ]] [[object.partner_id and 'of ' +object.partner_id.name or '']]</field>
<field name="message">Hello [[object.user_id.name]],
can you check following lead, it's not open since 5 days ?
Lead: [[object.id ]]
Description:
[[object.description]]
Thanks,
<field name="message">Warning unprocessed incoming lead is more than 5 day old.
Name: [[object.name ]]
ID: [[object.id ]]
Description: [[object.description]]
</field>
</record>
<record id="action_email_reminder_customer_lead" model="ir.actions.server">
<field name="name">Reminder to Customer</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="state">email</field>
<field name="email">object.email_from</field>
<field name="subject">Reminder on Lead: [[object.id ]]</field>
<field name="message">Hello [[object.partner_id and object.partner_id.name or '']],
your following lead is not open since 5 days.
Lead: [[object.id ]]
Description:
[[object.description]]
Thanks,
</field>
</record>
<record id="filter_draft_lead" model="ir.filters">
<field name="name">Draft Leads</field>
<field name="model_id">crm.lead</field>
<field name="domain">[('state','=','draft')]</field>
<field name="user_id" eval="False"/>
</record>
<!-- automated actions -->
<record id="rule_set_reminder_lead" model="base.action.rule">
<field name="name">Set Auto Reminder on leads which are not open since 5 days.</field>
<field name="model_id" ref="model_crm_lead"/>
@ -58,16 +30,16 @@ Thanks,
<field name="trg_date_type">create</field>
<field name="trg_date_range">5</field>
<field name="trg_date_range_type">day</field>
<field name="server_action_ids" eval="[(6,0,[ref('action_email_reminder_customer_lead'), ref('action_email_reminder_lead')])]"/>
<field name="server_action_ids" eval="[(6,0,[ref('action_email_reminder_lead')])]"/>
</record>
<!-- demo automated actions add a followers on urgent USA leads -->
<record id="filter_usa_lead" model="ir.filters">
<field name="name">Leads from USA</field>
<field name="model_id">crm.lead</field>
<field name="domain">[('country_id','=','United States')]</field>
<field name="user_id" eval="False"/>
</record>
<record id="rule_set_followers_lead" model="base.action.rule">
<field name="name">Set Auto Followers on leads which are urgent and come from USA.</field>
<field name="model_id" ref="model_crm_lead"/>

View File

@ -30,6 +30,36 @@ from tools import html2plaintext
from base.res.res_partner import format_address
CRM_LEAD_FIELDS_TO_MERGE = ['name',
'partner_id',
'channel_id',
'company_id',
'country_id',
'section_id',
'stage_id',
'state_id',
'type_id',
'user_id',
'title',
'city',
'contact_name',
'description',
'email',
'fax',
'mobile',
'partner_name',
'phone',
'probability',
'planned_revenue',
'street',
'street2',
'zip',
'create_date',
'date_action_last',
'date_action_next',
'email_from',
'email_cc',
'partner_name']
CRM_LEAD_PENDING_STATES = (
crm.AVAILABLE_STATES[2][0], # Cancelled
crm.AVAILABLE_STATES[3][0], # Done
@ -120,11 +150,7 @@ class crm_lead(base_stage, format_address, osv.osv):
def _compute_day(self, cr, uid, ids, fields, args, context=None):
"""
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of Opendays IDs
@return: difference between current date and log date
@param context: A standard dictionary for contextual values
:return dict: difference between current date and log date
"""
cal_obj = self.pool.get('resource.calendar')
res_obj = self.pool.get('resource.resource')
@ -413,15 +439,46 @@ class crm_lead(base_stage, format_address, osv.osv):
"""
return self.set_priority(cr, uid, ids, '3')
def _merge_get_result_type(self, cr, uid, opps, context=None):
"""
Define the type of the result of the merge. If at least one of the
element to merge is an opp, the resulting new element will be an opp.
Otherwise it will be a lead.
We'll directly use a list of browse records instead of a list of ids
for performances' sake: it will spare a second browse of the
leads/opps.
:param list opps: list of browse records containing the leads/opps to process
:return string type: the type of the final element
"""
for opp in opps:
if (opp.type == 'opportunity'):
return 'opportunity'
return 'lead'
def _merge_data(self, cr, uid, ids, oldest, fields, context=None):
# prepare opportunity data into dictionary for merging
"""
Prepare lead/opp data into a dictionary for merging. Different types
of fields are processed in different ways:
- text: all the values are concatenated
- m2m and o2m: those fields aren't processed
- m2o: the first not null value prevails (the other are dropped)
- any other type of field: same as m2o
:param list ids: list of ids of the leads to process
:param list fields: list of leads' fields to process
:return dict data: contains the merged values
"""
opportunities = self.browse(cr, uid, ids, context=context)
def _get_first_not_null(attr):
if hasattr(oldest, attr):
return getattr(oldest, attr)
for opportunity in opportunities:
if hasattr(opportunity, attr):
return getattr(opportunity, attr)
for opp in opportunities:
if hasattr(opp, attr):
return getattr(opp, attr)
return False
def _get_first_not_null_id(attr):
@ -429,8 +486,9 @@ class crm_lead(base_stage, format_address, osv.osv):
return res and res.id or False
def _concat_all(attr):
return ', '.join(filter(lambda x: x, [getattr(opportunity, attr) or '' for opportunity in opportunities if hasattr(opportunity, attr)]))
return ', '.join(filter(lambda x: x, [getattr(opp, attr) or '' for opp in opportunities if hasattr(opp, attr)]))
# Process the fields' values
data = {}
for field_name in fields:
field_info = self._all_columns.get(field_name)
@ -445,30 +503,41 @@ class crm_lead(base_stage, format_address, osv.osv):
data[field_name] = _concat_all(field_name) #not lost
else:
data[field_name] = _get_first_not_null(field_name) #not lost
# Define the resulting type ('lead' or 'opportunity')
data['type'] = self._merge_get_result_type(cr, uid, opportunities, context)
return data
def _merge_find_oldest(self, cr, uid, ids, context=None):
"""
Return the oldest lead found among ids.
:param list ids: list of ids of the leads to inspect
:return object: browse record of the oldest of the leads
"""
if context is None:
context = {}
#TOCHECK: where pass 'convert' in context ?
if context.get('convert'):
ids = list(set(ids) - set(context.get('lead_ids', False)) )
#search opportunities order by create date
opportunity_ids = self.search(cr, uid, [('id', 'in', ids)], order='create_date' , context=context)
oldest_id = opportunity_ids[0]
return self.browse(cr, uid, oldest_id, context=context)
if context.get('convert'):
ids = list(set(ids) - set(context.get('lead_ids', [])))
# Search opportunities order by create date
opportunity_ids = self.search(cr, uid, [('id', 'in', ids)], order='create_date', context=context)
oldest_opp_id = opportunity_ids[0]
return self.browse(cr, uid, oldest_opp_id, context=context)
def _mail_body(self, cr, uid, lead, fields, title=False, context=None):
body = []
if title:
body.append("%s\n" % (title))
for field_name in fields:
field_info = self._all_columns.get(field_name)
if field_info is None:
continue
field = field_info.column
value = None
value = ''
if field._type == 'selection':
if hasattr(field.selection, '__call__'):
@ -479,24 +548,33 @@ class crm_lead(base_stage, format_address, osv.osv):
elif field._type == 'many2one':
if lead[field_name]:
value = lead[field_name].name_get()[0][1]
elif field._type == 'many2many':
if lead[field_name]:
for val in lead[field_name]:
field_value = val.name_get()[0][1]
value += field_value + ","
else:
value = lead[field_name]
body.append("%s: %s" % (field.string, value or ''))
return "\n".join(body + ['---'])
return "<br/>".join(body + ['<br/>'])
def _merge_notification(self, cr, uid, opportunity_id, opportunities, context=None):
def _merge_notify(self, cr, uid, opportunity_id, opportunities, context=None):
"""
Create a message gathering merged leads/opps information.
"""
#TOFIX: mail template should be used instead of fix body, subject text
details = []
merge_message = _('Merged opportunities')
result_type = self._merge_get_result_type(cr, uid, opportunities, context)
if result_type == 'lead':
merge_message = _('Merged leads')
else:
merge_message = _('Merged opportunities')
subject = [merge_message]
fields = ['name', 'partner_id', 'stage_id', 'section_id', 'user_id', 'categ_ids', 'channel_id', 'company_id', 'contact_name',
'email_from', 'phone', 'fax', 'mobile', 'state_id', 'description', 'probability', 'planned_revenue',
'country_id', 'city', 'street', 'street2', 'zip']
for opportunity in opportunities:
subject.append(opportunity.name)
title = "%s : %s" % (merge_message, opportunity.name)
details.append(self._mail_body(cr, uid, opportunity, fields, title=title, context=context))
details.append(self._mail_body(cr, uid, opportunity, CRM_LEAD_FIELDS_TO_MERGE, title=title, context=context))
# Chatter message's subject
subject = subject[0] + ": " + ", ".join(subject[1:])
@ -540,42 +618,41 @@ class crm_lead(base_stage, format_address, osv.osv):
def merge_opportunity(self, cr, uid, ids, context=None):
"""
To merge opportunities
:param ids: list of opportunities ids to merge
Different cases of merge:
- merge leads together = 1 new lead
- merge at least 1 opp with anything else (lead or opp) = 1 new opp
:param list ids: leads/opportunities ids to merge
:return int id: id of the resulting lead/opp
"""
if context is None: context = {}
#TOCHECK: where pass lead_ids in context?
lead_ids = context and context.get('lead_ids', []) or []
if len(ids) <= 1:
raise osv.except_osv(_('Warning!'),_('Please select more than one opportunity from the list view.'))
raise osv.except_osv(_('Warning!'),_('Please select more than one element (lead or opportunity) from the list view.'))
lead_ids = context.get('lead_ids', [])
ctx_opportunities = self.browse(cr, uid, lead_ids, context=context)
opportunities = self.browse(cr, uid, ids, context=context)
opportunities_list = list(set(opportunities) - set(ctx_opportunities))
oldest = self._merge_find_oldest(cr, uid, ids, context=context)
if ctx_opportunities :
if ctx_opportunities:
first_opportunity = ctx_opportunities[0]
tail_opportunities = opportunities_list + ctx_opportunities[1:]
else:
first_opportunity = opportunities_list[0]
tail_opportunities = opportunities_list[1:]
fields = ['partner_id', 'title', 'name', 'categ_ids', 'channel_id', 'city', 'company_id', 'contact_name', 'country_id', 'type_id', 'user_id', 'section_id', 'state_id', 'description', 'email', 'fax', 'mobile',
'partner_name', 'phone', 'probability', 'planned_revenue', 'street', 'street2', 'zip', 'create_date', 'date_action_last',
'date_action_next', 'email_from', 'email_cc', 'partner_name']
data = self._merge_data(cr, uid, ids, oldest, fields, context=context)
merged_data = self._merge_data(cr, uid, ids, oldest, CRM_LEAD_FIELDS_TO_MERGE, context=context)
# Merge messages and attachements into the first opportunity
self._merge_opportunity_history(cr, uid, first_opportunity.id, tail_opportunities, context=context)
self._merge_opportunity_attachments(cr, uid, first_opportunity.id, tail_opportunities, context=context)
# Merge notifications about loss of information
self._merge_notification(cr, uid, first_opportunity, opportunities, context=context)
self._merge_notify(cr, uid, first_opportunity, opportunities, context=context)
# Write merged data into first opportunity
self.write(cr, uid, [first_opportunity.id], data, context=context)
self.write(cr, uid, [first_opportunity.id], merged_data, context=context)
# Delete tail opportunities
self.unlink(cr, uid, [x.id for x in tail_opportunities], context=context)
@ -599,17 +676,17 @@ class crm_lead(base_stage, format_address, osv.osv):
stage_id = stage_ids and stage_ids[0] or False
return {
'planned_revenue': lead.planned_revenue,
'probability': lead.probability,
'name': lead.name,
'partner_id': customer and customer.id or False,
'user_id': (lead.user_id and lead.user_id.id),
'type': 'opportunity',
'stage_id': stage_id or False,
'date_action': time.strftime('%Y-%m-%d %H:%M:%S'),
'date_open': time.strftime('%Y-%m-%d %H:%M:%S'),
'email_from': customer and customer.email or lead.email_from,
'phone': customer and customer.phone or lead.phone,
'planned_revenue': lead.planned_revenue,
'probability': lead.probability,
'name': lead.name,
'partner_id': customer and customer.id or False,
'user_id': (lead.user_id and lead.user_id.id),
'type': 'opportunity',
'stage_id': stage_id or False,
'date_action': fields.datetime.now(),
'date_open': fields.datetime.now(),
'email_from': customer and customer.email or lead.email_from,
'phone': customer and customer.phone or lead.phone,
}
def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, section_id=False, context=None):
@ -668,48 +745,75 @@ class crm_lead(base_stage, format_address, osv.osv):
return partner_id
def _lead_set_partner(self, cr, uid, lead, partner_id, context=None):
"""
Assign a partner to a lead.
:param object lead: browse record of the lead to process
:param int partner_id: identifier of the partner to assign
:return bool: True if the partner has properly been assigned
"""
res = False
res_partner = self.pool.get('res.partner')
if partner_id:
res_partner.write(cr, uid, partner_id, {'section_id': lead.section_id.id or False})
contact_id = res_partner.address_get(cr, uid, [partner_id])['default']
res = lead.write({'partner_id' : partner_id, }, context=context)
res = lead.write({'partner_id': partner_id}, context=context)
self._lead_set_partner_send_note(cr, uid, [lead.id], context)
return res
def convert_partner(self, cr, uid, ids, action='create', partner_id=False, context=None):
def handle_partner_assignation(self, cr, uid, ids, action='create', partner_id=False, context=None):
"""
Convert partner based on action.
Handle partner assignation during a lead conversion.
if action is 'create', create new partner with contact and assign lead to new partner_id.
otherwise assign lead to specified partner_id
otherwise assign lead to the specified partner_id
:param list ids: leads/opportunities ids to process
:param string action: what has to be done regarding partners (create it, assign an existing one, or nothing)
:param int partner_id: partner to assign if any
:return dict: dictionary organized as followed: {lead_id: partner_assigned_id}
"""
if context is None:
context = {}
#TODO this is a duplication of the handle_partner_assignation method of crm_phonecall
partner_ids = {}
# If a partner_id is given, force this partner for all elements
force_partner_id = partner_id
for lead in self.browse(cr, uid, ids, context=context):
# If the action is set to 'create' and no partner_id is set, create a new one
if action == 'create':
if not partner_id:
partner_id = self._create_lead_partner(cr, uid, lead, context)
partner_id = force_partner_id or self._create_lead_partner(cr, uid, lead, context)
self._lead_set_partner(cr, uid, lead, partner_id, context=context)
partner_ids[lead.id] = partner_id
return partner_ids
def allocate_salesman(self, cr, uid, ids, user_ids, team_id=False, context=None):
def allocate_salesman(self, cr, uid, ids, user_ids=None, team_id=False, context=None):
"""
Assign salesmen and salesteam to a batch of leads. If there are more
leads than salesmen, these salesmen will be assigned in round-robin.
E.g.: 4 salesmen (S1, S2, S3, S4) for 6 leads (L1, L2, ... L6). They
will be assigned as followed: L1 - S1, L2 - S2, L3 - S3, L4 - S4,
L5 - S1, L6 - S2.
:param list ids: leads/opportunities ids to process
:param list user_ids: salesmen to assign
:param int team_id: salesteam to assign
:return bool
"""
index = 0
for lead_id in ids:
value = {}
if team_id:
value['section_id'] = team_id
if index < len(user_ids):
if user_ids:
value['user_id'] = user_ids[index]
index += 1
# Cycle through user_ids
index = (index + 1) % len(user_ids)
if value:
self.write(cr, uid, [lead_id], value, context=context)
return True
def schedule_phonecall(self, cr, uid, ids, schedule_time, call_summary, desc, phone, contact_name, user_id=False, section_id=False, categ_id=False, action='schedule', context=None):
"""
action :('schedule','Schedule a call'), ('log','Log a call')
:param string action: ('schedule','Schedule a call'), ('log','Log a call')
"""
phonecall = self.pool.get('crm.phonecall')
model_data = self.pool.get('ir.model.data')
@ -724,17 +828,17 @@ class crm_lead(base_stage, format_address, osv.osv):
if not user_id:
user_id = lead.user_id and lead.user_id.id or False
vals = {
'name' : call_summary,
'opportunity_id' : lead.id,
'user_id' : user_id or False,
'categ_id' : categ_id or False,
'description' : desc or '',
'date' : schedule_time,
'section_id' : section_id or False,
'partner_id': lead.partner_id and lead.partner_id.id or False,
'partner_phone' : phone or lead.phone or (lead.partner_id and lead.partner_id.phone or False),
'partner_mobile' : lead.partner_id and lead.partner_id.mobile or False,
'priority': lead.priority,
'name': call_summary,
'opportunity_id': lead.id,
'user_id': user_id or False,
'categ_id': categ_id or False,
'description': desc or '',
'date': schedule_time,
'section_id': section_id or False,
'partner_id': lead.partner_id and lead.partner_id.id or False,
'partner_phone': phone or lead.phone or (lead.partner_id and lead.partner_id.phone or False),
'partner_mobile': lead.partner_id and lead.partner_id.mobile or False,
'priority': lead.priority,
}
new_id = phonecall.create(cr, uid, vals, context=context)
phonecall.case_open(cr, uid, [new_id], context=context)
@ -744,30 +848,50 @@ class crm_lead(base_stage, format_address, osv.osv):
self.schedule_phonecall_send_note(cr, uid, [lead.id], new_id, action, context=context)
return phonecall_dict
def redirect_opportunity_view(self, cr, uid, opportunity_id, context=None):
models_data = self.pool.get('ir.model.data')
# Get Opportunity views
form_view = models_data.get_object_reference(cr, uid, 'crm', 'crm_case_form_view_oppor')
tree_view = models_data.get_object_reference(cr, uid, 'crm', 'crm_case_tree_view_oppor')
# Get opportunity views
dummy, form_view = models_data.get_object_reference(cr, uid, 'crm', 'crm_case_form_view_oppor')
dummy, tree_view = models_data.get_object_reference(cr, uid, 'crm', 'crm_case_tree_view_oppor')
return {
'name': _('Opportunity'),
'view_type': 'form',
'view_mode': 'tree, form',
'res_model': 'crm.lead',
'domain': [('type', '=', 'opportunity')],
'res_id': int(opportunity_id),
'view_id': False,
'views': [(form_view and form_view[1] or False, 'form'),
(tree_view and tree_view[1] or False, 'tree'),
(False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window',
'name': _('Opportunity'),
'view_type': 'form',
'view_mode': 'tree, form',
'res_model': 'crm.lead',
'domain': [('type', '=', 'opportunity')],
'res_id': int(opportunity_id),
'view_id': False,
'views': [(form_view or False, 'form'),
(tree_view or False, 'tree'),
(False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window',
}
def redirect_lead_view(self, cr, uid, lead_id, context=None):
models_data = self.pool.get('ir.model.data')
# Get lead views
dummy, form_view = models_data.get_object_reference(cr, uid, 'crm', 'crm_case_form_view_leads')
dummy, tree_view = models_data.get_object_reference(cr, uid, 'crm', 'crm_case_tree_view_leads')
return {
'name': _('Lead'),
'view_type': 'form',
'view_mode': 'tree, form',
'res_model': 'crm.lead',
'domain': [('type', '=', 'lead')],
'res_id': int(lead_id),
'view_id': False,
'views': [(form_view or False, 'form'),
(tree_view or False, 'tree'),
(False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window',
}
def action_makeMeeting(self, cr, uid, ids, context=None):
""" This opens Meeting's calendar view to schedule meeting on current Opportunity
@return : Dictionary value for created Meeting view
"""
Open meeting's calendar view to schedule meeting on current opportunity.
:return dict: dictionary value for created Meeting view
"""
opportunity = self.browse(cr, uid, ids[0], context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'base_calendar', 'action_crm_meeting', context)

View File

@ -247,7 +247,7 @@ Andrew</field>
<field name="contact_name">Bojing Hú</field>
<field name="partner_name">Incom Corporation</field>
<field name="email_from">bhu.a100@gmail.com</field>
<field name="partner_id" ref=""/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="country_id" ref="base.cn"/>
<field name="city">Shenzhen</field>
<field name="type_id" ref="type_lead3"/>
@ -548,6 +548,31 @@ Andrew</field>
<field eval="1" name="active"/>
</record>
<record id="crm_case_26" model="crm.lead">
<field name="type">opportunity</field>
<field name="name">Would appreciate more information about your products</field>
<field eval="11000" name="planned_revenue"/>
<field eval="45.0" name="probability"/>
<field name="partner_name">Agrolait</field>
<field name="email_from">info@agrolait.com</field>
<field name="partner_id" ref="base.res_partner_2"/>
<field name="street">69 rue de Chimay</field>
<field name="country_id" ref="base.be"/>
<field name="city">Wavre</field>
<field name="zip">1300</field>
<field name="type_id" ref="type_lead3"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">3</field>
<field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Send Catalogue by Email</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
</record>
<!-- Unsubscribe Admin from case15, subscribe Demo -->
<record id="crm_case_15" model="crm.lead">
<field name="message_follower_ids" eval="[(3, ref('base.partner_root')), (4, ref('base.partner_demo'))]"/>

View File

@ -12,7 +12,7 @@
<field name="context">{'default_type':'lead', 'stage_type':'lead'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create an unqualified lead.
Click to create an unqualified lead.
</p><p>
Use leads if you need a qualification step before creating an
opportunity or a customer. It can be a business card you received,
@ -39,48 +39,48 @@
<field name="act_window_id" ref="crm_case_category_act_leads_all"/>
</record>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
<field name="name">Opportunities</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">kanban,tree,graph,form,calendar</field>
<field name="domain">[('type','=','opportunity')]</field>
<field name="context">{'stage_type': 'opportunity', 'default_type': 'opportunity'}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a new opportunity.
</p><p>
OpenERP helps you keep track of your sales pipeline to follow
up potential sales and better forecast your future revenues.
</p><p>
You will be able to plan meetings and phone calls from
opportunities, convert them into quotations, attach related
documents, track all discussions, and much more.
</p>
</field>
</record>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
<field name="name">Opportunities</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">kanban,tree,graph,form,calendar</field>
<field name="domain">[('type','=','opportunity')]</field>
<field name="context">{'stage_type': 'opportunity', 'default_type': 'opportunity', 'default_user_id': uid}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a new opportunity.
</p><p>
OpenERP helps you keep track of your sales pipeline to follow
up potential sales and better forecast your future revenues.
</p><p>
You will be able to plan meetings and phone calls from
opportunities, convert them into quotations, attach related
documents, track all discussions, and much more.
</p>
</field>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_kanban_view_oppor11">
<field name="sequence" eval="0"/>
<field name="view_mode">kanban</field>
<field name="view_id" ref="crm_case_kanban_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_kanban_view_oppor11">
<field name="sequence" eval="0"/>
<field name="view_mode">kanban</field>
<field name="view_id" ref="crm_case_kanban_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor11">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor11">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor11">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor11">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<menuitem name="Sales" id="base.menu_sales" parent="base.menu_base_partner" sequence="1" />
<menuitem name="Leads" id="menu_crm_leads" parent="base.menu_sales" action="crm_case_category_act_leads_all" sequence="2" />

View File

@ -2,42 +2,6 @@
<openerp>
<data>
<!-- Read/Unread actions -->
<record id="actions_server_crm_lead_unread" model="ir.actions.server">
<field name="name">CRM Lead: Mark unread</field>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="state">code</field>
<field name="code">self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context)</field>
</record>
<record id="action_crm_lead_unread" model="ir.values">
<field name="name">action_crm_lead_unread</field>
<field name="action_id" ref="actions_server_crm_lead_unread"/>
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_unread'))"/>
<field name="key">action</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="model">crm.lead</field>
<field name="key2">client_action_multi</field>
</record>
<record id="actions_server_crm_lead_read" model="ir.actions.server">
<field name="name">CRM Lead: Mark read</field>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="state">code</field>
<field name="code">self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context)</field>
</record>
<record id="action_crm_lead_read" model="ir.values">
<field name="name">action_crm_lead_read</field>
<field name="action_id" ref="actions_server_crm_lead_read"/>
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_read'))"/>
<field name="key">action</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="model">crm.lead</field>
<field name="key2">client_action_multi</field>
</record>
<!--
CRM CASE STAGE
@ -152,8 +116,11 @@
<group>
<group>
<field name="partner_name" string="Company Name"/>
<!-- Preload all the partner's information -->
<field name="partner_id" string="Customer"
on_change="on_change_partner(partner_id)" options='{"create_name_field": "name"}'/>
on_change="on_change_partner(partner_id)"
options='{"create_name_field": "name"}'
context="{'default_name': contact_name, 'default_street': street, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_function': function, 'default_phone': phone, 'default_mobile': mobile, 'default_fax': fax, 'default_email': email_from, 'default_user_id': user_id, 'default_section_id': section_id}"/>
<label for="street" string="Address"/>
<div>
<field name="street" placeholder="Street..."/>
@ -169,7 +136,7 @@
<group>
<label for="contact_name"/>
<div>
<field name="contact_name" class="oe_inline"/>,
<field name="contact_name" class="oe_inline"/><span attrs="{'invisible': [('title', '=', '')]}">, </span>
<field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" class="oe_inline" options='{"no_open": True}'/>
</div>
<field name="email_from" widget="email"/>
@ -242,7 +209,6 @@
</field>
</record>
<!-- CRM Lead Tree View -->
<record model="ir.ui.view" id="crm_case_tree_view_leads">
<field name="name">Leads</field>
@ -308,7 +274,7 @@
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
<t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
<li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
<li><a name="%(opportunity2phonecall_act)d" type="action">Log Call</a></li>
<li><a name="%(opportunity2phonecall_act)d" type="action">Schedule/Log Call</a></li>
<li><a name="action_makeMeeting" type="object">Schedule Meeting</a></li>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
@ -333,7 +299,7 @@
<div class="oe_kanban_bottom_right">
<a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar" t-if="record.user_id.value"/>
</div>
<div class="oe_kanban_footer_left">
<t t-raw="record.message_summary.raw_value"/>
@ -460,6 +426,7 @@
<group>
<field name="categ_ids"
string="Categories" widget="many2many_tags"
context = "{'object_name': 'crm.lead'}"
domain="[('object_id.model', '=', 'crm.lead')]"/>
</group>
@ -568,7 +535,7 @@
<field name="model">crm.lead</field>
<field name="arch" type="xml">
<search string="Search Opportunities">
<field name="name" string="Opportunity / Customer"
<field name="name" string="Opportunity"
filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike', self)]"/>
<filter icon="terp-mail-message-new" string="Unread Messages" help="Unread messages" name="message_unread" domain="[('message_unread','=',True)]"/>
@ -596,7 +563,7 @@
<filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}"/>
</group>
<group string="Display">
<filter string="Show Sales Team" icon="terp-personal+" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
<filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
</group>
</search>
</field>

View File

@ -182,17 +182,23 @@ class crm_phonecall(base_state, osv.osv):
'phone': phonecall.partner_phone,
})
def convert_partner(self, cr, uid, ids, action='create', partner_id=False, context=None):
def handle_partner_assignation(self, cr, uid, ids, action='create', partner_id=False, context=None):
"""
This function convert partner based on action.
Handle partner assignation during a lead conversion.
if action is 'create', create new partner with contact and assign lead to new partner_id.
otherwise assign lead to specified partner_id
:param list ids: phonecalls ids to process
:param string action: what has to be done regarding partners (create it, assign an existing one, or nothing)
:param int partner_id: partner to assign if any
:return dict: dictionary organized as followed: {lead_id: partner_assigned_id}
"""
if context is None:
context = {}
#TODO this is a duplication of the handle_partner_assignation method of crm_lead
partner_ids = {}
# If a partner_id is given, force this partner for all elements
force_partner_id = partner_id
for call in self.browse(cr, uid, ids, context=context):
# If the action is set to 'create' and no partner_id is set, create a new one
if action == 'create':
partner_id = force_partner_id or self._call_create_partner(cr, uid, call, context=context)
self._call_create_partner_address(cr, uid, call, partner_id, context=context)
@ -219,7 +225,6 @@ class crm_phonecall(base_state, osv.osv):
}
return value
def convert_opportunity(self, cr, uid, ids, opportunity_summary=False, partner_id=False, planned_revenue=0.0, probability=0.0, context=None):
partner = self.pool.get('res.partner')
opportunity = self.pool.get('crm.lead')
@ -256,8 +261,9 @@ class crm_phonecall(base_state, osv.osv):
return opportunity_dict
def action_make_meeting(self, cr, uid, ids, context=None):
""" This opens Meeting's calendar view to schedule meeting on current Phonecall
@return : Dictionary value for created Meeting view
"""
Open meeting's calendar view to schedule a meeting on current phonecall.
:return dict: dictionary value for created meeting view
"""
phonecall = self.browse(cr, uid, ids[0], context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'base_calendar', 'action_crm_meeting', context)
@ -270,14 +276,27 @@ class crm_phonecall(base_state, osv.osv):
'default_name': phonecall.name,
}
return res
def action_button_convert2opportunity(self, cr, uid, ids, context=None):
"""
Convert a phonecall into an opp and then redirect to the opp view.
:param list ids: list of calls ids to convert (typically contains a single id)
:return dict: containing view information
"""
if len(ids) != 1:
raise osv.except_osv(_('Warning!'),_('It\'s only possible to convert one phonecall at a time.'))
opportunity_dict = self.convert_opportunity(cr, uid, ids, context=context)
return self.pool.get('crm.lead').redirect_opportunity_view(cr, uid, opportunity_dict[ids[0]], context)
# ----------------------------------------
# OpenChatter
# ----------------------------------------
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
return 'Phonecall'
def case_reset_send_note(self, cr, uid, ids, context=None):
message = _('Phonecall has been <b>reset and set as open</b>.')
return self.message_post(cr, uid, ids, body=message, context=context)
@ -300,5 +319,4 @@ class crm_phonecall(base_state, osv.osv):
def _call_set_partner_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Partner has been <b>created</b>."), context=context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -2,44 +2,8 @@
<openerp>
<data>
<!-- Read/Unread actions -->
<record id="actions_server_crm_phonecall_unread" model="ir.actions.server">
<field name="name">CRM Phonecall: Mark unread</field>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_crm_phonecall"/>
<field name="state">code</field>
<field name="code">self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context)</field>
</record>
<record id="action_crm_phonecall_unread" model="ir.values">
<field name="name">action_crm_phonecall_unread</field>
<field name="action_id" ref="actions_server_crm_phonecall_unread"/>
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_unread'))"/>
<field name="key">action</field>
<field name="model_id" ref="model_crm_phonecall"/>
<field name="model">crm.phonecall</field>
<field name="key2">client_action_multi</field>
</record>
<record id="actions_server_crm_phonecall_read" model="ir.actions.server">
<field name="name">CRM Phonecall: Mark read</field>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_crm_phonecall"/>
<field name="state">code</field>
<field name="code">self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context)</field>
</record>
<record id="action_crm_phonecall_read" model="ir.values">
<field name="name">action_crm_phonecall_read</field>
<field name="action_id" ref="actions_server_crm_phonecall_read"/>
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_read'))"/>
<field name="key">action</field>
<field name="model_id" ref="model_crm_phonecall"/>
<field name="model">crm.phonecall</field>
<field name="key2">client_action_multi</field>
</record>
<!-- Phonecall Categories Form View -->
<!-- Phonecall Categories Form View -->
<record id="crm_phonecall_categ_action" model="ir.actions.act_window">
<field name="name">Phonecall Categories</field>
<field name="res_model">crm.case.categ</field>
@ -60,8 +24,7 @@
<menuitem action="crm_phonecall_categ_action" name="Categories"
id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" groups="base.group_no_one"/>
<!-- PhoneCalls Tree View -->
<!-- Phonecalls Tree View -->
<record model="ir.ui.view" id="crm_case_phone_tree_view">
<field name="name">CRM - Phone Calls Tree</field>
<field name="model">crm.phonecall</field>
@ -71,13 +34,14 @@
<field name="name"/>
<field name="partner_id"/>
<button string="Meeting"
states="open,pending" icon="gtk-redo"
name="action_make_meeting" type="object"/>
<button string="Convert to Opportunity"
name="%(phonecall2opportunity_act)d"
states="open,pending"
icon="gtk-index"
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
name="action_make_meeting"
type="object"/>
<button string="Convert to Opportunity"
type="object"
name="action_button_convert2opportunity"
states="open,pending"
attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
<field name="partner_phone"/>
<field name="user_id"/>
<field name="categ_id" invisible="1"/>
@ -96,27 +60,26 @@
</field>
</record>
<!-- Phonecalls Form View -->
<!-- Phonecalls Form View -->
<record model="ir.ui.view" id="crm_case_phone_form_view">
<field name="name">CRM - Phone Call Form</field>
<field name="model">crm.phonecall</field>
<field name="arch" type="xml">
<form string="Phone Call" version="7.0">
<header>
<button name="case_close" string="Call Done" type="object" class="oe_highlight"
states="open,pending"/>
<button name="case_reset" string="Reset to Todo" type="object"
states="cancel"/>
<button name="case_cancel" string="Cancel" type="object"
states="draft,open,pending"/>
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,done"/>
</header>
<header>
<button name="case_close" string="Call Done" type="object" class="oe_highlight"
states="open,pending"/>
<button name="case_reset" string="Reset to Todo" type="object"
states="cancel"/>
<button name="case_cancel" string="Cancel" type="object"
states="draft,open,pending"/>
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,done"/>
</header>
<sheet string="Phone Call">
<div class="oe_right">
<div class="oe_right">
<button string="Convert to Opportunity"
name="%(phonecall2opportunity_act)d"
type="action"
type="object"
name="action_button_convert2opportunity"
attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state', 'not in', ('open', 'done'))]}"/>
<button string="Schedule Other Call"
name="%(phonecall_to_phonecall_act)d"
@ -133,7 +96,7 @@
</div>
<h2><field name="partner_phone"/></h2>
</div>
<group col="4">
<field name="date"/>
<field name="user_id"/>
@ -158,7 +121,6 @@
</record>
<!--Logged Phonecalls Tree View -->
<record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
<field name="name">CRM - Logged Phone Calls Tree</field>
<field name="model">crm.phonecall</field>
@ -185,7 +147,7 @@
icon="gtk-redo"
name="action_make_meeting" type="object"/>
<button string="Convert to Opportunity"
name="%(phonecall2opportunity_act)d"
name="action_button_convert2opportunity"
states="open,pending"
icon="gtk-index"
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
@ -194,7 +156,6 @@
</record>
<!-- Phonecalls Calendar View -->
<record model="ir.ui.view" id="crm_case_phone_calendar_view">
<field name="name">CRM - Phone Calls Calendar</field>
<field name="model">crm.phonecall</field>
@ -220,8 +181,8 @@
<separator/>
<filter string="Unassigned Phonecalls" icon="terp-personal-" domain="[('user_id','=',False)]" help="Unassigned Phonecalls"/>
<separator/>
<filter string="Phone Calls Assigned to Me or My Team(s)" icon="terp-personal+" domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="Phone Calls that are assigned to me or to my team(s)"/>
<filter string="Phone Calls Assigned to Me or My Team(s)" icon="terp-personal+" domain="['|', ('section_id.user_id','=',uid), ('user_id', '=', uid)]"
help="Phone Calls Assigned to the current user or with a team having the current user as team leader"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="section_id" string="Sales Team"/>
@ -236,4 +197,4 @@
</record>
</data>
</openerp>
</openerp>

View File

@ -293,7 +293,7 @@
<field name="view_id" ref="crm_case_resource_type_tree"/>
</record>
<menuitem action="crm_case_resource_type_act"
<menuitem action="crm_case_resource_type_act"
id="menu_crm_case_resource_type_act" sequence="4"
groups="base.group_no_one"
parent="base.menu_crm_config_lead"/>

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@ class res_partner(osv.osv):
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
'Phonecalls'),
'opportunity_count': fields.function(_opportunity_meeting_count, string="Opportunity", type='integer', multi='opp_meet'),
'meeting_count': fields.function(_opportunity_meeting_count, string="Meeting", type='integer', multi='opp_meet'),
'meeting_count': fields.function(_opportunity_meeting_count, string="# Meetings", type='integer', multi='opp_meet'),
}
def copy(self, cr, uid, record_id, default=None, context=None):

View File

@ -33,20 +33,4 @@
-
!python {model: crm.lead}: |
lead_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
self.convert_partner(cr, uid, lead_ids, context=context)
-
I convert one phonecall request to a customer and put him into regular customer list.
-
!python {model: crm.phonecall2partner}: |
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_phonecall_4")], 'active_id': ref("crm.crm_phonecall_4")})
new_id = self.create(cr, uid, {}, context=context)
self.make_partner(cr, uid, [new_id], context=context)
-
I check converted phonecall to partner.
-
!python {model: res.partner}: |
partner_id = self.search(cr, uid, [('phonecall_ids', '=', ref('crm.crm_phonecall_4'))])
assert partner_id, "Customer is not found in regular customer list."
data = self.browse(cr, uid, partner_id, context=context)[0]
assert data.user_id.id == ref("base.user_root"), "User not assigned properly"
assert data.name == "Wanted information about pricing of laptops", "Bad partner name"
self.handle_partner_assignation(cr, uid, lead_ids, context=context)

View File

@ -1,25 +1,15 @@
-
In order to test convert customer lead into opportunity,
In order to test the conversion of a lead into a opportunity,
-
I open customer lead.
I open a lead.
-
!python {model: crm.lead}: |
self.case_open(cr, uid, [ref("crm_case_4")])
-
I check lead state is "Open".
I check if the lead state is "Open".
-
!assert {model: crm.lead, id: crm.crm_case_4, string: Lead in open state}:
!assert {model: crm.lead, id: crm.crm_case_4, string: Lead state is Open}:
- state == "open"
-
I fill in a lead2partner wizard.
-
!record {model: crm.lead2partner, id: crm_lead2partner_id1, context: '{"active_model": "crm.lead", "active_ids": [ref("crm_case_4")]}'}:
-
I create a partner from the lead2partner wizard.
-
!python {model: crm.lead2partner}: |
context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_4')], 'active_id': ref('crm_case_4')})
self.make_partner(cr, uid ,[ref("crm_lead2partner_id1")], context=context)
-
I convert lead into opportunity for exiting customer.
-
@ -76,7 +66,7 @@
-
!python {model: crm.lead2opportunity.partner.mass}: |
context.update({'active_model': 'crm.lead', 'active_ids': [ref("crm_case_11"), ref("crm_case_2")], 'active_id': ref("crm_case_11")})
id = self.create(cr, uid, {'user_ids': [ref('base.user_root')], 'section_id': ref('crm.section_sales_department')}, context=context)
id = self.create(cr, uid, {'user_ids': [(6, 0, [ref('base.user_root')])], 'section_id': ref('crm.section_sales_department')}, context=context)
self.mass_convert(cr, uid, [id], context=context)
-
Now I check first lead converted on opportunity.

View File

@ -0,0 +1,70 @@
-
During a lead to opp conversion, salesmen should be assigned to leads following the round-robin method. Start by creating 6 leads (1 to 6) and 4 salesmen (A to D).
-
!record {model: crm.lead, id: test_crm_lead_01}:
type: 'lead'
name: 'Test lead 1'
stage_id: stage_lead1
-
!record {model: crm.lead, id: test_crm_lead_02}:
type: 'lead'
name: 'Test lead 2'
stage_id: stage_lead1
-
!record {model: crm.lead, id: test_crm_lead_03}:
type: 'lead'
name: 'Test lead 3'
stage_id: stage_lead1
-
!record {model: crm.lead, id: test_crm_lead_04}:
type: 'lead'
name: 'Test lead 4'
stage_id: stage_lead1
-
!record {model: crm.lead, id: test_crm_lead_05}:
type: 'lead'
name: 'Test lead 5'
stage_id: stage_lead1
-
!record {model: crm.lead, id: test_crm_lead_06}:
type: 'lead'
name: 'Test lead 6'
stage_id: stage_lead1
-
!record {model: res.users, id: test_res_user_01}:
name: 'Test user A'
login: 'tua'
new_password: 'tua'
-
!record {model: res.users, id: test_res_user_02}:
name: 'Test user B'
login: 'tub'
new_password: 'tub'
-
!record {model: res.users, id: test_res_user_03}:
name: 'Test user C'
login: 'tuc'
new_password: 'tuc'
-
!record {model: res.users, id: test_res_user_04}:
name: 'Test user D'
login: 'tud'
new_password: 'tud'
-
I create a mass convert wizard and convert all the leads.
-
!python {model: crm.lead2opportunity.partner.mass}: |
context.update({'active_model': 'crm.lead', 'active_ids': [ref("test_crm_lead_01"), ref("test_crm_lead_02"), ref("test_crm_lead_03"), ref("test_crm_lead_04"), ref("test_crm_lead_05"), ref("test_crm_lead_06")], 'active_id': ref("test_crm_lead_01")})
id = self.create(cr, uid, {'user_ids': [(6, 0, [ref('test_res_user_01'), ref('test_res_user_02'), ref('test_res_user_03'), ref('test_res_user_04')])], 'section_id': ref('crm.section_sales_department')}, context=context)
self.mass_convert(cr, uid, [id], context=context)
-
The leads should now be opps with a salesman and a salesteam. Also, salesmen should have been assigned following a round-robin method.
-
!python {model: crm.lead}: |
opps = self.browse(cr, uid, [ref("test_crm_lead_01"), ref("test_crm_lead_02"), ref("test_crm_lead_03"), ref("test_crm_lead_04"), ref("test_crm_lead_05"), ref("test_crm_lead_06")], context)
salesmen_ids = [ref('test_res_user_01'), ref('test_res_user_02'), ref('test_res_user_03'), ref('test_res_user_04')]
i = 0
for opp in opps:
assert opp.type == 'opportunity', 'Type mismatch: this should be an opp, not a lead'
assert opp.user_id.id == salesmen_ids[i], 'Salesman mismatch: expected salesman %r, got %r' % (salesmen_ids[i], opp.user_id.id)
i = i+1 if (i < len(salesmen_ids) - 1) else 0

View File

@ -1,34 +1,126 @@
-
I make an opportunity from customer.
During a mixed merge (involving leads and opps), data should be handled a certain way following their type (m2o, m2m, text, ...) Start by creating two leads and an opp.
-
!python {model: crm.partner2opportunity}: |
context.update({'active_model': 'res.partner', 'active_ids': [ref("base.res_partner_9")]})
res_id = self.create(cr, uid, {'name': "Enquête pour l'achat de services"}, context=context)
self.make_opportunity(cr, uid, [res_id], context=context)
!record {model: crm.lead, id: test_crm_lead_01}:
type: 'lead'
name: 'Test lead 1'
partner_id: base.res_partner_1
stage_id: stage_lead1
description: This is the description of the test lead 1.
-
I make another opportunity from a phone call with the same customer.
!record {model: crm.lead, id: test_crm_lead_02}:
type: 'lead'
name: 'Test lead 2'
partner_id: base.res_partner_3
stage_id: stage_lead1
description: This is the description of the test lead 2.
-
!python {model: crm.phonecall2opportunity}: |
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_phonecall_6")]})
res_id = self.create(cr, uid, {'name': "À propos du prix de votre autre service", 'partner_id': ref("base.res_partner_9")}, context=context)
self.make_opportunity(cr, uid, [res_id], context=context)
-
Now I merge these opportunities.
!record {model: crm.lead, id: test_crm_opp_01}:
type: 'opportunity'
name: 'Test opportunity 1'
partner_id: base.res_partner_5
stage_id: stage_lead1
description: This is the description of the test opp 1.
-
!python {model: crm.lead}: |
opportunity_ids = self.search(cr, uid, [('partner_id','=', ref("base.res_partner_9"))])
context.update({'active_model': 'crm.lead', 'active_ids': opportunity_ids, 'active_id': opportunity_ids[0]})
lead_ids = [ref('test_crm_lead_01'), ref('test_crm_lead_02'), ref('test_crm_opp_01')]
context.update({'active_model': 'crm.lead', 'active_ids': lead_ids, 'active_id': lead_ids[0]})
-
!record {model: crm.merge.opportunity, id: opportunity_merge_id }:
I create a merge wizard and merge the leads and opp together in the first item of the list.
-
!record {model: crm.merge.opportunity, id: merge_opp_wizard_01}:
-
!python {model: crm.merge.opportunity}: |
self.action_merge(cr, uid, [ref("opportunity_merge_id")], context=context)
self.action_merge(cr, uid, [ref("merge_opp_wizard_01")], context=context)
-
I check for merged opportunities for customer.
I check for the resulting merged opp (based on name and partner).
-
!python {model: crm.lead}: |
merge_id = self.search(cr, uid, [('partner_id','=', ref("base.res_partner_9"))])
assert merge_id, 'Fail to create Merge opportunity'
merge_data = self.browse(cr, uid, merge_id)[0]
assert merge_data.type == 'opportunity', 'Merged opportunity type not change!'
assert merge_data.partner_id.id == ref("base.res_partner_9"), 'Partner missmatch!'
merge_id = self.search(cr, uid, [('name', '=', 'Test lead 1'), ('partner_id','=', ref("base.res_partner_1"))])
assert merge_id, 'Fail to create merge opportunity wizard'
merge_result = self.browse(cr, uid, merge_id)[0]
assert merge_result.partner_id.id == ref("base.res_partner_1"), 'Partner mismatch: when merging leads/opps with different m2o values, the first not null value prevails (the other are dropped)'
assert merge_result.description == 'This is the description of the test lead 1., This is the description of the test lead 2., This is the description of the test opp 1.', 'Description mismatch: when merging leads/opps with different text values, these values should get concatenated and separeted with ", "'
assert merge_result.type == 'opportunity', 'Type mismatch: when at least one opp in involved in the merge, the result should be a new opp (instead of %s)' % merge_result.type
-
The other (tailing) leads/opps shouldn't exist anymore.
-
!python {model: crm.lead}: |
tailing_lead = self.search(cr, uid, [('id', '=', ref('test_crm_lead_02'))])
assert not tailing_lead, 'This tailing lead (id %s) should not exist anymore' % ref('test_crm_lead_02')
tailing_opp = self.search(cr, uid, [('id', '=', ref('test_crm_opp_01'))])
assert not tailing_opp, 'This tailing opp (id %s) should not exist anymore' % ref('test_crm_opp_01')
-
I want to test leads merge. Start by creating two leads (with the same partner).
-
!record {model: crm.lead, id: test_crm_lead_03}:
type: 'lead'
name: 'Test lead 3'
partner_id: base.res_partner_1
stage_id: stage_lead1
-
!record {model: crm.lead, id: test_crm_lead_04}:
type: 'lead'
name: 'Test lead 4'
partner_id: base.res_partner_1
stage_id: stage_lead1
-
!python {model: crm.lead}: |
lead_ids = [ref('test_crm_lead_03'), ref('test_crm_lead_04')]
context.update({'active_model': 'crm.lead', 'active_ids': lead_ids, 'active_id': lead_ids[0]})
-
I create a merge wizard and merge the leads together.
-
!record {model: crm.merge.opportunity, id: merge_opp_wizard_02}:
-
!python {model: crm.merge.opportunity}: |
self.action_merge(cr, uid, [ref("merge_opp_wizard_02")], context=context)
-
I check for the resulting merged lead (based on name and partner).
-
!python {model: crm.lead}: |
merge_id = self.search(cr, uid, [('name', '=', 'Test lead 3'), ('partner_id','=', ref("base.res_partner_1"))])
assert merge_id, 'Fail to create merge opportunity wizard'
merge_result = self.browse(cr, uid, merge_id)[0]
assert merge_result.partner_id.id == ref("base.res_partner_1"), 'Partner mismatch'
assert merge_result.type == 'lead', 'Type mismatch: when leads get merged together, the result should be a new lead (instead of %s)' % merge_result.type
tailing_lead = self.search(cr, uid, [('id', '=', ref('test_crm_lead_04'))])
assert not tailing_lead, 'This tailing lead (id %s) should not exist anymore' % ref('test_crm_lead_04')
-
I want to test opps merge. Start by creating two opportunities (with the same partner).
-
!record {model: crm.lead, id: test_crm_opp_02}:
type: 'opportunity'
name: 'Test opportunity 2'
partner_id: base.res_partner_5
stage_id: stage_lead1
-
!record {model: crm.lead, id: test_crm_opp_03}:
type: 'opportunity'
name: 'Test opportunity 3'
partner_id: base.res_partner_5
stage_id: stage_lead1
-
!python {model: crm.lead}: |
opp_ids = [ref('test_crm_opp_02'), ref('test_crm_opp_03')]
context.update({'active_model': 'crm.lead', 'active_ids': opp_ids, 'active_id': opp_ids[0]})
-
I create a merge wizard and merge the opps together.
-
!record {model: crm.merge.opportunity, id: merge_opp_wizard_03}:
-
!python {model: crm.merge.opportunity}: |
self.action_merge(cr, uid, [ref("merge_opp_wizard_03")], context=context)
-
I check for the resulting merged opp (based on name and partner).
-
!python {model: crm.lead}: |
merge_id = self.search(cr, uid, [('name', '=', 'Test opportunity 2'), ('partner_id','=', ref("base.res_partner_5"))])
assert merge_id, 'Fail to create merge opportunity wizard'
merge_result = self.browse(cr, uid, merge_id)[0]
assert merge_result.partner_id.id == ref("base.res_partner_5"), 'Partner mismatch'
assert merge_result.type == 'opportunity', 'Type mismatch: when opps get merged together, the result should be a new opp (instead of %s)' % merge_result.type
tailing_opp = self.search(cr, uid, [('id', '=', ref('test_crm_opp_03'))])
assert not tailing_opp, 'This tailing opp (id %s) should not exist anymore' % ref('test_crm_opp_03')

View File

@ -1,5 +1,5 @@
-
I create lead record to call of partner onchange, stage onchange and Mailing opt-in onchange method.
I create a lead record to call a partner onchange, stage onchange and mailing opt-in onchange method.
-
!record {model: crm.lead, id: crm_case_25}:
name: 'Need more info about your pc2'
@ -8,7 +8,7 @@
stage_id: crm.stage_lead1
state: draft
-
I create lead record to call Mailing opt-out onchange method.
I create a lead record to call a mailing opt-out onchange method.
-
!record {model: crm.lead, id: crm_case_18}:
name: 'Need 20 Days of Consultancy'
@ -16,13 +16,13 @@
state: draft
opt_out: True
-
I create phonecall record to call partner onchange method.
I create a phonecall record to call a partner onchange method.
-
!record {model: crm.phonecall, id: crm_phonecall_5}:
name: 'Bad time'
partner_id: base.res_partner_5
-
I setting next stage "New" for the lead.
I set the next stage to "New" for the lead.
-
!python {model: crm.lead}: |
self.stage_next(cr, uid, [ref("crm_case_4")], context={'stage_type': 'lead'})

View File

@ -19,16 +19,10 @@
#
##############################################################################
import crm_lead_to_partner
import crm_lead_to_opportunity
import crm_partner_binding
import crm_phonecall_to_phonecall
import crm_opportunity_to_phonecall
import crm_phonecall_to_partner
import crm_partner_to_opportunity
import crm_phonecall_to_opportunity
import crm_lead_to_opportunity
import crm_merge_opportunities
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -27,16 +27,13 @@ import re
class crm_lead2opportunity_partner(osv.osv_memory):
_name = 'crm.lead2opportunity.partner'
_description = 'Lead To Opportunity Partner'
_inherit = 'crm.lead2partner'
_inherit = 'crm.partner.binding'
_columns = {
'action': fields.selection([('exist', 'Link to an existing customer'), \
('create', 'Create a new customer'), \
('nothing', 'Do not link to a customer')], \
'Related Customer', required=True),
'name': fields.selection([('convert', 'Convert to opportunity'), \
('merge', 'Merge with existing opportunities')], \
'Conversion Action', required=True),
'name': fields.selection([
('convert', 'Convert to opportunity'),
('merge', 'Merge with existing opportunities')
], 'Conversion Action', required=True),
'opportunity_ids': fields.many2many('crm.lead', string='Opportunities', domain=[('type', '=', 'opportunity')]),
}
@ -157,8 +154,8 @@ class crm_lead2opportunity_mass_convert(osv.osv_memory):
_inherit = 'crm.lead2opportunity.partner'
_columns = {
'user_ids': fields.many2many('res.users', string='Salesmen'),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'user_ids': fields.many2many('res.users', string='Salesmen'),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
def default_get(self, cr, uid, fields, context=None):

View File

@ -7,7 +7,7 @@
<field name="model">crm.lead2opportunity.partner</field>
<field name="arch" type="xml">
<form string="Convert to Opportunity" version="7.0">
<group>
<group name="name">
<field name="name" class="oe_inline"/>
<field name="opportunity_ids" attrs="{'invisible': [('name', '!=', 'merge')]}">
<tree>
@ -18,7 +18,7 @@
</tree>
</field>
</group>
<group attrs="{'invisible': [('name', '!=', 'convert')]}">
<group name="action" attrs="{'invisible': [('name', '!=', 'convert')]}">
<field name="action" class="oe_inline"/>
<field name="partner_id"
attrs="{'required': [('action', '=', 'exist')], 'invisible':[('action','!=','exist')]}"
@ -51,21 +51,17 @@
<group string="Select Opportunities" attrs="{'invisible': [('name', '!=', 'merge')]}">
<field name="opportunity_ids" colspan="4" nolabel="1" attrs="{'invisible': [('name', '=', 'convert')]}">
<tree>
<field name="name" />
<field name="partner_id" />
<field name="user_id" />
<field name="section_id" />
<field name="name"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="section_id"/>
</tree>
</field>
</group>
<group string="Assign opportunities to" attrs="{'invisible': [('name', '=', '')]}">
<field name="section_id" />
<field name="user_ids" colspan="4">
<tree>
<field name="name" />
</tree>
</field>
<field name="section_id"/>
<field name="user_ids" widget="many2many_tags"/>
</group>
<footer>

View File

@ -1,122 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
from tools.translate import _
class crm_lead2partner(osv.osv_memory):
""" Converts lead to partner """
_name = 'crm.lead2partner'
_description = 'Lead to Partner'
_columns = {
'action': fields.selection([('exist', 'Link to an existing customer'), \
('create', 'Create a new customer')], \
'Action', required=True),
'partner_id': fields.many2one('res.partner', 'Customer'),
}
def view_init(self, cr, uid, fields, context=None):
"""
Check for precondition before wizard executes.
"""
if context is None:
context = {}
model = context.get('active_model')
model = self.pool.get(model)
rec_ids = context and context.get('active_ids', [])
for this in model.browse(cr, uid, rec_ids, context=context):
if this.partner_id:
raise osv.except_osv(_('Warning!'),
_('A partner is already defined.'))
def _select_partner(self, cr, uid, context=None):
if context is None:
context = {}
if not context.get('active_model') == 'crm.lead' or not context.get('active_id'):
return False
partner = self.pool.get('res.partner')
lead = self.pool.get('crm.lead')
this = lead.browse(cr, uid, context.get('active_id'), context=context)
if this.partner_id:
return this.partner_id.id
partner_id = False
if this.email_from:
partner_ids = partner.search(cr, uid, [('email', '=', this.email_from)], context=context)
if partner_ids:
partner_id = partner_ids[0]
if not this.partner_id and this.partner_name:
partner_ids = partner.search(cr, uid, [('name', '=', this.partner_name)], context=context)
if partner_ids:
partner_id = partner_ids[0]
return partner_id
def default_get(self, cr, uid, fields, context=None):
res = super(crm_lead2partner, self).default_get(cr, uid, fields, context=context)
partner_id = self._select_partner(cr, uid, context=context)
if 'partner_id' in fields:
res.update({'partner_id': partner_id})
if 'action' in fields:
res.update({'action': partner_id and 'exist' or 'create'})
return res
def open_create_partner(self, cr, uid, ids, context=None):
"""
Open form of create partner.
"""
view_obj = self.pool.get('ir.ui.view')
view_id = view_obj.search(cr, uid, [('model', '=', self._name), \
('name', '=', self._name+'.view')])
return {
'view_mode': 'form',
'view_type': 'form',
'view_id': view_id or False,
'res_model': self._name,
'context': context,
'type': 'ir.actions.act_window',
'target': 'new',
}
def _create_partner(self, cr, uid, ids, context=None):
"""
Create partner based on action.
"""
if context is None:
context = {}
lead = self.pool.get('crm.lead')
lead_ids = context.get('active_ids', [])
data = self.browse(cr, uid, ids, context=context)[0]
partner_id = data.partner_id and data.partner_id.id or False
return lead.convert_partner(cr, uid, lead_ids, data.action, partner_id, context=context)
def make_partner(self, cr, uid, ids, context=None):
"""
Make a partner based on action.
Only called from form view, so only meant to convert one lead at a time.
"""
lead_id = context and context.get('active_id') or False
partner_ids_map = self._create_partner(cr, uid, ids, context=context)
return self.pool.get('res.partner').redirect_partner_form(cr, uid, partner_ids_map.get(lead_id, False), context=context)
crm_lead2partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,37 +0,0 @@
<openerp>
<data>
<!-- Lead to Partner form view -->
<record id="view_crm_lead2partner" model="ir.ui.view">
<field name="name">crm.lead2partner.view</field>
<field name="model">crm.lead2partner</field>
<field name="arch" type="xml">
<form string="Create a Partner" version="7.0">
<group col="4">
<separator string="Create a Partner"/>
<field name="action"/>
<field name="partner_id" attrs="{'required': [('action', '=', 'exist')], 'invisible':[('action','!=','exist')]}"/>
</group>
<footer>
<button name="make_partner" string="Continue" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
<!-- Lead to Partner wizard -->
<record id="action_crm_lead2partner" model="ir.actions.act_window">
<field name="name">Create a Partner</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">crm.lead2partner</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_crm_lead2partner"/>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -21,33 +21,51 @@ from osv import osv, fields
from tools.translate import _
class crm_merge_opportunity(osv.osv_memory):
"""Merge two Opportunities"""
"""
Merge opportunities together.
If we're talking about opportunities, it's just because it makes more sense
to merge opps than leads, because the leads are more ephemeral objects.
But since opportunities are leads, it's also possible to merge leads
together (resulting in a new lead), or leads and opps together (resulting
in a new opp).
"""
_name = 'crm.merge.opportunity'
_description = 'Merge two Opportunities'
def action_merge(self, cr, uid, ids, context=None):
if context is None:
context = {}
lead = self.pool.get('crm.lead')
record = self.browse(cr, uid, ids[0], context=context)
opportunities = record.opportunity_ids
#TOFIX: why need to check lead_ids here
lead_ids = [opportunities[0].id]
self.write(cr, uid, ids, {'opportunity_ids' : [(6,0, lead_ids)]}, context=context)
context['lead_ids'] = lead_ids
merge_id = lead.merge_opportunity(cr, uid, [x.id for x in opportunities], context=context)
return lead.redirect_opportunity_view(cr, uid, merge_id, context=context)
_description = 'Merge opportunities'
_columns = {
'opportunity_ids': fields.many2many('crm.lead', rel='merge_opportunity_rel', id1='merge_id', id2='opportunity_id', string='Leads/Opportunities'),
}
def action_merge(self, cr, uid, ids, context=None):
if context is None:
context = {}
lead_obj = self.pool.get('crm.lead')
wizard = self.browse(cr, uid, ids[0], context=context)
opportunity2merge_ids = wizard.opportunity_ids
#TODO: why is this passed through the context ?
context['lead_ids'] = [opportunity2merge_ids[0].id]
merge_id = lead_obj.merge_opportunity(cr, uid, [x.id for x in opportunity2merge_ids], context=context)
# The newly created lead might be a lead or an opp: redirect toward the right view
merge_result = lead_obj.browse(cr, uid, merge_id, context=context)
if merge_result.type == 'opportunity':
return lead_obj.redirect_opportunity_view(cr, uid, merge_id, context=context)
else:
return lead_obj.redirect_lead_view(cr, uid, merge_id, context=context)
def default_get(self, cr, uid, fields, context=None):
"""
This function gets default values
Use active_ids from the context to fetch the leads/opps to merge.
In order to get merged, these leads/opps can't be in 'Done' or
'Cancel' state.
"""
record_ids = context and context.get('active_ids', False) or False
if context is None:
context = {}
record_ids = context.get('active_ids', False)
res = super(crm_merge_opportunity, self).default_get(cr, uid, fields, context=context)
if record_ids:
@ -61,6 +79,4 @@ class crm_merge_opportunity(osv.osv_memory):
return res
crm_merge_opportunity()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,115 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
from tools.translate import _
class crm_partner_binding(osv.osv_memory):
"""
Handle the partner binding or generation in any CRM wizard that requires
such feature, like the lead2opportunity wizard, or the
phonecall2opportunity wizard. Try to find a matching partner from the
CRM model's information (name, email, phone number, etc) or create a new
one on the fly.
Use it like a mixin with the wizard of your choice.
"""
_name = 'crm.partner.binding'
_description = 'Handle partner binding or generation in CRM wizards.'
_columns = {
'action': fields.selection([
('exist', 'Link to an existing customer'),
('create', 'Create a new customer'),
('nothing', 'Do not link to a customer')
], 'Related Customer', required=True),
'partner_id': fields.many2one('res.partner', 'Customer'),
}
def _find_matching_partner(self, cr, uid, context=None):
"""
Try to find a matching partner regarding the active model data, like
the customer's name, email, phone number, etc.
:return int partner_id if any, False otherwise
"""
if context is None:
context = {}
partner_id = False
partner_obj = self.pool.get('res.partner')
# The active model has to be a lead or a phonecall
if (context.get('active_model') == 'crm.lead') and context.get('active_id'):
active_model = self.pool.get('crm.lead').browse(cr, uid, context.get('active_id'), context=context)
elif (context.get('active_model') == 'crm.phonecall') and context.get('active_id'):
active_model = self.pool.get('crm.phonecall').browse(cr, uid, context.get('active_id'), context=context)
# Find the best matching partner for the active model
if (active_model):
partner_obj = self.pool.get('res.partner')
# A partner is set already
if active_model.partner_id:
partner_id = active_model.partner_id.id
# Search through the existing partners based on the lead's email
elif active_model.email_from:
partner_ids = partner_obj.search(cr, uid, [('email', '=', active_model.email_from)], context=context)
if partner_ids:
partner_id = partner_ids[0]
# Search through the existing partners based on the lead's partner or contact name
elif active_model.partner_name:
partner_ids = partner_obj.search(cr, uid, [('name', 'ilike', '%'+active_model.partner_name+'%')], context=context)
if partner_ids:
partner_id = partner_ids[0]
elif active_model.contact_name:
partner_ids = partner_obj.search(cr, uid, [
('name', 'ilike', '%'+active_model.contact_name+'%')], context=context)
if partner_ids:
partner_id = partner_ids[0]
return partner_id
def default_get(self, cr, uid, fields, context=None):
res = super(crm_partner_binding, self).default_get(cr, uid, fields, context=context)
partner_id = self._find_matching_partner(cr, uid, context=context)
if 'action' in fields:
res['action'] = partner_id and 'exist' or 'create'
if 'partner_id' in fields:
res['partner_id'] = partner_id
return res
def _create_partner(self, cr, uid, ids, context=None):
"""
Create partner based on action.
:return dict: dictionary organized as followed: {lead_id: partner_assigned_id}
"""
#TODO this method in only called by crm_lead2opportunity_partner
#wizard and would probably diserve to be refactored or at least
#moved to a better place
if context is None:
context = {}
lead = self.pool.get('crm.lead')
lead_ids = context.get('active_ids', [])
data = self.browse(cr, uid, ids, context=context)[0]
partner_id = data.partner_id and data.partner_id.id or False
return lead.handle_partner_assignation(cr, uid, lead_ids, data.action, partner_id, context=context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,77 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
from tools.translate import _
class crm_partner2opportunity(osv.osv_memory):
"""Converts Partner To Opportunity"""
_name = 'crm.partner2opportunity'
_description = 'Partner To Opportunity'
_columns = {
'name' : fields.char('Opportunity Name', size=64, required=True),
'planned_revenue': fields.float('Expected Revenue', digits=(16,2)),
'probability': fields.float('Success Probability', digits=(16,2)),
'partner_id': fields.many2one('res.partner', 'Customer'),
}
def action_cancel(self, cr, uid, ids, context=None):
"""
Closes Partner 2 Opportunity
"""
return {'type':'ir.actions.act_window_close'}
def default_get(self, cr, uid, fields, context=None):
"""
This function gets default values
"""
partner_obj = self.pool.get('res.partner')
data = context and context.get('active_ids', []) or []
res = super(crm_partner2opportunity, self).default_get(cr, uid, fields, context=context)
for partner in partner_obj.browse(cr, uid, data, []):
if 'name' in fields:
res.update({'name': partner.name})
if 'partner_id' in fields:
res.update({'partner_id': data and data[0] or False})
return res
def make_opportunity(self, cr, uid, ids, context=None):
partner_ids = context and context.get('active_ids', []) or []
partner_id = partner_ids[0] if partner_ids else None
partner = self.pool.get('res.partner')
lead = self.pool.get('crm.lead')
data = self.browse(cr, uid, ids, context=context)[0]
opportunity_ids = partner.make_opportunity(cr, uid, partner_ids,
data.name,
data.planned_revenue,
data.probability,
partner_id,
context=context,
)
opportunity_id = opportunity_ids[partner_ids[0]]
return lead.redirect_opportunity_view(cr, uid, opportunity_id, context=context)
crm_partner2opportunity()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,27 +0,0 @@
<openerp>
<data>
<!-- partner To Opportunity form -->
<record id="view_crm_partner2opportunity" model="ir.ui.view">
<field name="name">crm.crm.partner2opportunity</field>
<field name="model">crm.partner2opportunity</field>
<field name="arch" type="xml">
<form string="Create Opportunity" version="7.0">
<group col="4">
<field name="name"/>
<field name="partner_id"/>
<field name="planned_revenue"/>
<field name="probability"/>
</group>
<footer>
<button name="make_opportunity" string="Create Opportunity" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
</data>
</openerp>

View File

@ -1,65 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
from tools.translate import _
class crm_phonecall2opportunity(osv.osv_memory):
""" Converts Phonecall to Opportunity"""
_name = 'crm.phonecall2opportunity'
_inherit = 'crm.partner2opportunity'
_description = 'Phonecall To Opportunity'
def make_opportunity(self, cr, uid, ids, context=None):
"""
This converts Phonecall to Opportunity and opens Phonecall view
"""
if not len(ids):
return False
call_ids = context and context.get('active_ids', False) or False
this = self.browse(cr, uid, ids[0], context=context)
if not call_ids:
return {}
opportunity = self.pool.get('crm.lead')
phonecall = self.pool.get('crm.phonecall')
opportunity_ids = phonecall.convert_opportunity(cr, uid, call_ids, this.name, this.partner_id and this.partner_id.id or False, \
this.planned_revenue, this.probability, context=context)
return opportunity.redirect_opportunity_view(cr, uid, opportunity_ids[call_ids[0]], context=context)
def default_get(self, cr, uid, fields, context=None):
"""
This function gets default values
"""
record_id = context and context.get('active_id', False) or False
res = {}
if record_id:
phonecall = self.pool.get('crm.phonecall').browse(cr, uid, record_id, context=context)
if 'name' in fields:
res.update({'name': phonecall.name})
if 'partner_id' in fields:
res.update({'partner_id': phonecall.partner_id and phonecall.partner_id.id or False})
return res
crm_phonecall2opportunity()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

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