[MERGE] merge with main addons

bzr revid: rpr@tinyerp.com-20121102101651-gw5x3bgaw4tmmney
This commit is contained in:
Rajesh Prajapati (OpenERP)
2012-11-02 15:46:51 +05:30
141 changed files with 879 additions and 51336 deletions
+4 -4
View File
@@ -509,8 +509,8 @@
<page string="Cash Registers">
<group>
<group string="Accounts">
<field name="profit_account_id"/>
<field name="loss_account_id"/>
<field name="profit_account_id" domain="[('type','!=','view')]"/>
<field name="loss_account_id" domain="[('type','!=','view')]"/>
<field name="internal_account_id"/>
</group>
<group string="Miscellaneous">
@@ -1230,8 +1230,8 @@
<field name="move_id" string="Number (Move)"/>
<field name="account_id"/>
<field name="partner_id"/>
<field name="journal_id" context="{'journal_id':self}"/>
<field name="period_id" context="{'period_id':self}"/>
<field name="journal_id" context="{'journal_id':self}" widget="selection"/> <!-- it's important to keep widget='selection' in this filter viewbecause without that the value passed in the context is not the ID but the textual value (name) of the selected journal -->
<field name="period_id" context="{'period_id':self}" widget="selection"/> <!-- it's important to keep the widget='selection' in this field, for the same reason as explained above -->
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
+32 -35
View File
@@ -7,14 +7,15 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-06-20 16:18+0000\n"
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
"PO-Revision-Date: 2012-10-30 15:48+0000\n"
"Last-Translator: Frederic Clementi - Camptocamp.com "
"<frederic.clementi@camptocamp.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:01+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-10-31 04:40+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: code:addons/account/account_move_line.py:1215
@@ -151,7 +152,7 @@ msgstr "Définition des enfants"
#: code:addons/account/account_bank_statement.py:302
#, python-format
msgid "Journal item \"%s\" is not valid."
msgstr "Écriture \"%s\" n'est pas équilibrée"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_report_aged_receivable
@@ -1608,10 +1609,9 @@ msgid ""
"entry per accounting document: invoice, refund, supplier payment, bank "
"statements, etc."
msgstr ""
"Une pièce comptable est composée de plusieurs écritures comptables, chacune "
"étant soit un débit soit un crédit. OpenERP crée automatiquement une pièce "
"comptable par document comptable : facture, avoir, paiement de fournisseur, "
"relevés bancaires, etc."
"Un écriture est composée de plusieurs lignes, chacune étant soit un débit "
"soit un crédit. OpenERP crée automatiquement une écriture par document "
"comptable : facture, avoir, paiement de fournisseur, relevés bancaires, etc."
#. module: account
#: view:account.entries.report:0
@@ -1703,7 +1703,7 @@ msgstr "Recherche d'un relevé bancaire"
#. module: account
#: view:account.move.line:0
msgid "Unposted Journal Items"
msgstr "Pièces non comptabiliisées"
msgstr "Ecritures brouillon"
#. module: account
#: view:account.chart.template:0
@@ -2478,8 +2478,6 @@ msgid ""
"In order to delete a bank statement, you must first cancel it to delete "
"related journal items."
msgstr ""
"Pour supprimer un relevé bancaire vous devez préalablement supprimer les "
"lignes rapprochées."
#. module: account
#: field:account.invoice,payment_term:0
@@ -3629,7 +3627,7 @@ msgstr "État des ventes par type de compte"
#. module: account
#: view:account.move.line:0
msgid "Unreconciled Journal Items"
msgstr "Ecritures non lettrées"
msgstr "Ecritures non léttrées"
#. module: account
#: sql_constraint:res.currency:0
@@ -3900,7 +3898,7 @@ msgstr ""
#. module: account
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
msgid "Account balance"
msgstr "Balance des comptes"
msgstr "Balance générale"
#. module: account
#: report:account.invoice:0
@@ -3972,7 +3970,7 @@ msgstr "Nom"
#. module: account
#: model:ir.model,name:account.model_account_aged_trial_balance
msgid "Account Aged Trial balance Report"
msgstr "Rapport du solde de la balance agée"
msgstr "Balance agée"
#. module: account
#: code:addons/account/account_move_line.py:582
@@ -4181,7 +4179,7 @@ msgstr ""
#. module: account
#: view:account.move.line:0
msgid "Posted Journal Items"
msgstr "Ecritures saisies"
msgstr "Ecritures validées"
#. module: account
#: view:account.tax.template:0
@@ -4244,7 +4242,7 @@ msgstr "Titulaire du compte bancaire"
#: model:ir.actions.report.xml,name:account.account_account_balance
#: model:ir.ui.menu,name:account.menu_general_Balance_report
msgid "Trial Balance"
msgstr "Balance des comptes"
msgstr "Balance générale"
#. module: account
#: model:ir.model,name:account.model_account_invoice_cancel
@@ -4659,7 +4657,7 @@ msgstr "Sert de compte par défaut pour le crédit"
#: view:validate.account.move:0
#: view:validate.account.move.lines:0
msgid "Post Journal Entries"
msgstr "Comptabiliser les pièces comptables dans le journal"
msgstr "Valider les écritures"
#. module: account
#: selection:account.invoice,state:0
@@ -4927,7 +4925,7 @@ msgstr ""
#: code:addons/account/account.py:923
#, python-format
msgid "Opening Period"
msgstr "Période ouverte"
msgstr "Période d'ouverture"
#. module: account
#: view:account.move:0
@@ -5611,7 +5609,7 @@ msgstr "Quantité de produits"
#: selection:account.move,state:0
#: view:account.move.line:0
msgid "Unposted"
msgstr "Non comptabilisé"
msgstr "Non validée"
#. module: account
#: view:account.change.currency:0
@@ -5823,7 +5821,7 @@ msgstr "Journal d'écriture"
#: model:ir.actions.act_window,name:account.action_account_fiscalyear_close
#: model:ir.ui.menu,name:account.menu_wizard_fy_close
msgid "Generate Opening Entries"
msgstr "Générer les écritures d'ouverture"
msgstr "Générer l'écriture d'ouverture"
#. module: account
#: code:addons/account/account_move_line.py:775
@@ -7117,7 +7115,7 @@ msgstr "Sélection du journal"
#: code:addons/account/account.py:432
#, python-format
msgid "Opening Balance"
msgstr "Solde initial"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_move_reconcile
@@ -7727,8 +7725,7 @@ msgstr "Signes sur les Rapports"
#: code:addons/account/wizard/account_fiscalyear_close.py:88
#, python-format
msgid "The periods to generate opening entries were not found"
msgstr ""
"Les périodes pour générer les écritures d'ouverture n'ont pas été trouvées."
msgstr "Aucune période d'ouverture trouvée"
#. module: account
#: model:account.account.type,name:account.data_account_type_view
@@ -7822,7 +7819,7 @@ msgstr "Journal des ventes"
#: code:addons/account/wizard/account_move_journal.py:104
#, python-format
msgid "Open Journal Items !"
msgstr "Écritures ouvertes !"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_invoice_tax
@@ -7859,7 +7856,7 @@ msgstr ""
#. module: account
#: view:account.move:0
msgid "Unposted Journal Entries"
msgstr "Pièces non comptabilisées"
msgstr "Ecritures non validées"
#. module: account
#: view:product.product:0
@@ -7976,7 +7973,7 @@ msgstr "Code de la case"
#. module: account
#: view:validate.account.move:0
msgid "Post Journal Entries of a Journal"
msgstr "Comptabiliser les pièces comptables d'un journal"
msgstr "Valider les écritures"
#. module: account
#: view:product.product:0
@@ -8161,7 +8158,7 @@ msgstr "Ligne de caisse"
#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger_other
#: model:ir.ui.menu,name:account.menu_account_partner_ledger
msgid "Partner Ledger"
msgstr "Grand Livre"
msgstr "Livre des tiers"
#. module: account
#: selection:account.tax.template,type:0
@@ -8359,7 +8356,7 @@ msgstr ""
#: help:account.account,reconcile:0
msgid ""
"Check this box if this account allows reconciliation of journal items."
msgstr "Cochez si le compte autorise le lettrage des pièces."
msgstr "Cochez si le compte autorise le lettrage des écritures."
#. module: account
#: help:account.period,state:0
@@ -9220,7 +9217,7 @@ msgstr "inconnu"
#: code:addons/account/account.py:3130
#, python-format
msgid "Opening Entries Journal"
msgstr "Journal des écritures d'ouverture"
msgstr "Journal d'ouverture"
#. module: account
#: model:process.transition,note:account.process_transition_customerinvoice0
@@ -10006,7 +10003,7 @@ msgstr "Ce compte de tiers remplacera le compte par défaut."
#. module: account
#: field:account.period,special:0
msgid "Opening/Closing Period"
msgstr "Ouverture/clôture d'exercice"
msgstr "Période d'ouverture/clôture"
#. module: account
#: field:account.account,currency_id:0
@@ -10336,7 +10333,7 @@ msgstr "Date de fin"
#: model:ir.actions.act_window,name:account.action_account_open_closed_fiscalyear
#: model:ir.ui.menu,name:account.menu_wizard_account_open_closed_fiscalyear
msgid "Cancel Opening Entries"
msgstr "Annuler les écritures d'ouvertures"
msgstr "Annuler l'écriture d'ouverture"
#. module: account
#: field:account.payment.term.line,days2:0
@@ -10505,7 +10502,7 @@ msgstr "Signer pour le parent"
#. module: account
#: model:ir.model,name:account.model_account_balance_report
msgid "Trial Balance Report"
msgstr "Rapport sur la balance des comptes"
msgstr "Balance générale"
#. module: account
#: model:ir.actions.act_window,name:account.action_bank_statement_draft_tree
@@ -10688,7 +10685,7 @@ msgstr "Intervalle"
#. module: account
#: view:account.analytic.line:0
msgid "Analytic Journal Items related to a purchase journal."
msgstr "Imputations analytiques relatives au journal des achats."
msgstr "Ecritures analytiques relatives au journal des achats."
#. module: account
#: help:account.account,type:0
@@ -11213,7 +11210,7 @@ msgstr "Future"
#. module: account
#: view:account.move.line:0
msgid "Search Journal Items"
msgstr "Rechercher des écritures comptables"
msgstr "Recherche par ligne d'écritures"
#. module: account
#: help:account.tax,base_sign:0
+4 -4
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-10-26 09:03+0000\n"
"PO-Revision-Date: 2012-10-31 10:41+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:04+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: view:account.invoice.report:0
@@ -7939,7 +7939,7 @@ msgstr "Строка кассы"
#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger_other
#: model:ir.ui.menu,name:account.menu_account_partner_ledger
msgid "Partner Ledger"
msgstr "Книгапартнера"
msgstr "Книга партнера"
#. module: account
#: selection:account.tax.template,type:0
+11 -11
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-06-20 16:03+0000\n"
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
"PO-Revision-Date: 2012-11-01 18:30+0000\n"
"Last-Translator: Dusan Laznik <laznik@mentis.si>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:04+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: view:account.invoice.report:0
@@ -1587,7 +1587,7 @@ msgstr "Neobdavčeno"
#. module: account
#: view:account.partner.reconcile.process:0
msgid "Go to Next Partner"
msgstr ""
msgstr "Naslednji parner"
#. module: account
#: view:account.bank.statement:0
@@ -3150,7 +3150,7 @@ msgstr "Predloge kontnih načrtov"
#. module: account
#: model:ir.actions.act_window,name:account.action_wizard_multi_chart
msgid "Set Your Accounting Options"
msgstr ""
msgstr "Nastavitve"
#. module: account
#: view:report.account.sales:0
@@ -4358,7 +4358,7 @@ msgstr "res_config_contents"
#. module: account
#: view:account.unreconcile:0
msgid "Unreconciliate Transactions"
msgstr ""
msgstr "Neusklajene postavke"
#. module: account
#: help:account.chart.template,visible:0
@@ -4558,7 +4558,7 @@ msgstr "Datum dogodka"
#. module: account
#: view:account.unreconcile.reconcile:0
msgid "Unreconciliation Transactions"
msgstr ""
msgstr "Naknadno odprte postavke"
#. module: account
#: field:account.tax,ref_tax_code_id:0
@@ -6046,7 +6046,7 @@ msgstr "Davek(%)"
#. module: account
#: view:account.addtmpl.wizard:0
msgid "Create an Account Based on this Template"
msgstr ""
msgstr "Ustvarite konto na osnovi te predloge"
#. module: account
#: view:account.account.type:0
@@ -8827,7 +8827,7 @@ msgstr "Prodaja po vrstah"
#. module: account
#: view:account.analytic.cost.ledger.journal.report:0
msgid "Cost Ledger for Period"
msgstr ""
msgstr "Stroški za obdobje"
#. module: account
#: help:account.tax,child_depend:0
@@ -10307,7 +10307,7 @@ msgstr "Urejanje vrst dnevnikov."
#. module: account
#: view:account.payment.term:0
msgid "Description on Invoices"
msgstr ""
msgstr "Opis na računih"
#. module: account
#: model:ir.model,name:account.model_account_analytic_chart
+8 -8
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-10-25 16:26+0000\n"
"Last-Translator: AllanWong <18895563@qq.com>\n"
"PO-Revision-Date: 2012-11-01 08:44+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:07+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: view:account.invoice.report:0
@@ -2330,7 +2330,7 @@ msgstr "筛选"
#: selection:report.invoice.created,state:0
#, python-format
msgid "Open"
msgstr "打开"
msgstr "待支付"
#. module: account
#: model:process.node,note:account.process_node_draftinvoices0
@@ -4668,7 +4668,7 @@ msgstr "税适用"
#: model:ir.ui.menu,name:account.menu_eaction_account_moves_sale
#, python-format
msgid "Journal Items"
msgstr "会计凭证行"
msgstr "会计凭证明细"
#. module: account
#: code:addons/account/account.py:1095
@@ -9642,7 +9642,7 @@ msgstr "本报表让您打印或产生一个由所有账簿生成的总账"
#: selection:account.account.template,type:0
#: selection:account.entries.report,type:0
msgid "Regular"
msgstr "定期"
msgstr "常规科目"
#. module: account
#: view:account.account:0
@@ -10557,7 +10557,7 @@ msgstr "前景"
#. module: account
#: view:account.move.line:0
msgid "Search Journal Items"
msgstr "搜索分录"
msgstr "搜索会计凭证明细"
#. module: account
#: help:account.tax,base_sign:0
+2 -2
View File
@@ -144,8 +144,8 @@
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
<label for="unit_amount"/>
<div>
<field name="unit_amount" class="oe_inline"/>
<field name="product_uom_id" class="oe_inline"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
</div>
</group>
<group string="General Accounting">
@@ -42,7 +42,7 @@
<field name="arch" type="xml">
<graph string="Invoices Analysis" type="bar">
<field name="product_id"/>
<field name="user_currency_price_total"/>
<field name="price_total"/>
</graph>
</field>
</record>
+1
View File
@@ -262,6 +262,7 @@ class account_config_settings(osv.osv_memory):
'sale_tax_rate': config.sale_tax_rate,
'purchase_tax_rate': config.purchase_tax_rate,
'complete_tax_set': config.complete_tax_set,
'currency_id': config.currency_id.id,
}, context)
wizard.execute(cr, uid, [wizard_id], context)
+1 -1
View File
@@ -268,7 +268,7 @@
<field name="target">inline</field>
</record>
<menuitem id="menu_account_config" name="Accounting" parent="base.menu_config"
<menuitem id="menu_account_config" name="Invoicing" parent="base.menu_config"
sequence="14" action="action_account_config"/>
</data>
@@ -5,6 +5,7 @@
<!-- Top menu item -->
<menuitem name="Accounting"
id="account.menu_finance"/>
<menuitem id="account.menu_account_config" name="Accounting" parent="base.menu_config"/>
</data>
@@ -10,6 +10,12 @@
<field name="domain">[('invoice_id','=',False)]</field>
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
<field name="help" type="html">
<p>
You will find here timesheets and purchases you did for contracts that can be reinvoiced to the customer.
If you want to record new jobs to invoice, you should use the timesheet menu instead.
</p>
</field>
</record>
<menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="base.menu_invoiced" sequence="5"/>
@@ -38,7 +38,7 @@ Allows to automatically select analytic accounts based on criterions:
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'images': ['images/analytic_defaults.jpeg'],
'depends': ['sale'],
'depends': ['sale_stock'],
'data': [
'security/ir.model.access.csv',
'security/account_analytic_default_security.xml',
@@ -105,8 +105,7 @@ account_bank_statement_line_global()
class account_bank_statement_line(osv.osv):
_inherit = 'account.bank.statement.line'
_columns = {
'date': fields.date('Entry Date', required=True, states={'confirm': [('readonly', True)]}),
'val_date': fields.date('Valuta Date', states={'confirm': [('readonly', True)]}),
'val_date': fields.date('Value Date', states={'confirm': [('readonly', True)]}),
'globalisation_id': fields.many2one('account.bank.statement.line.global', 'Globalisation ID',
states={'confirm': [('readonly', True)]},
help="Code to identify transactions belonging to the same globalisation level within a batch payment"),
@@ -148,7 +148,7 @@
<field name="name">Bank Statement Lines</field>
<field name="res_model">account.bank.statement.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph,form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'block_statement_line_delete' : 1}</field>
<field name="search_view_id" ref="view_bank_statement_line_filter"/>
<field name="view_id" ref="view_bank_statement_line_list"/>
@@ -290,7 +290,7 @@
<field name="arch" type="xml">
<notebook position="inside">
<page string="Budget Lines" groups="account.group_account_user">
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree,graph">
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree">
<tree string="Budget Lines" editable="top">
<field name="crossovered_budget_id"/>
<field name="general_budget_id"/>
@@ -310,11 +310,6 @@
<field name="paid_date"/>
<field name="planned_amount"/>
</form>
<graph type="bar" string="Lines">
<field name="general_budget_id" />
<field name="planned_amount" operator="+"/>
<field group="True" name="analytic_account_id"/>
</graph>
</field>
</page>
</notebook>
+5 -5
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-02-10 15:03+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"PO-Revision-Date: 2012-10-30 15:45+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:13+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-10-31 04:40+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account_payment
#: field:payment.order,date_scheduled:0
@@ -653,7 +653,7 @@ msgstr "公司币别"
#: view:payment.line:0
#: view:payment.order:0
msgid "Payment"
msgstr "付款"
msgstr "支付"
#. module: account_payment
#: report:payment.order:0
+1
View File
@@ -61,6 +61,7 @@ This module manages:
'account_voucher_data.xml',
],
'test' : [
'test/case5_suppl_usd_usd.yml',
'test/account_voucher.yml',
'test/sales_receipt.yml',
'test/sales_payment.yml',
@@ -0,0 +1,185 @@
-
In order to check the Account_voucher module with multi-currency in OpenERP,
I create a supplier invoices in USD and make the payment in USD but with another exchange rate and with a write-off
-
I create a cash account with currency USD
-
!record {model: account.account, id: account_cash_usd_id}:
currency_id: base.USD
name: "cash account in usd"
code: "Xcash usd"
type: 'liquidity'
user_type: "account.data_account_type_cash"
-
I create currency USD in OpenERP for November of 1.8 Rate
-
!record {model: res.currency.rate, id: nov_usd}:
currency_id: base.USD
name: !eval "'%s-11-01' %(datetime.now().year)"
rate: 1.8
-
I create currency USD in OpenERP for December of 1.5 Rate
-
!record {model: res.currency.rate, id: dec_usd}:
currency_id: base.USD
name: !eval "'%s-12-01' %(datetime.now().year)"
rate: 1.5
-
I set the income and expense currency accounts on the main company
-
!python {model: res.company}: |
from datetime import datetime
vals = {
'income_currency_exchange_account_id': ref('account.o_expense'),
'expense_currency_exchange_account_id': ref('account.o_expense')}
self.write(cr, uid, ref('base.main_company'), vals)
-
I create a bank journal with EUR as currency
-
!record {model: account.journal, id: bank_journal_EUR}:
name: Bank Journal(EUR)
code: BEUR
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I create a bank journal with USD as currency
-
!record {model: account.journal, id: bank_journal_USD}:
name: Bank Journal(USD)
code: BUSD
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account_cash_usd_id
default_credit_account_id: account_cash_usd_id
currency: base.USD
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I set the context as would do the action in supplier invoice menuitem
-
!context
'default_type': 'in_invoice'
-
I create the invoice on 1st november for 1000 USD
-
!record {model: account.invoice, id: account_supplier_invoice_november, view: account.invoice_supplier_form}:
account_id: account.a_pay
company_id: base.main_company
currency_id: base.USD
date_invoice: !eval "'%s-11-01' %(datetime.now().year)"
period_id: account.period_1
invoice_line:
- account_id: account.a_expense
name: '[PCSC234] PC Assemble SC234'
price_unit: 1000.0
quantity: 1.0
product_id: product.product_product_3
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: base.res_partner_19
reference_type: none
check_total : 1000
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_supplier_invoice_november}
-
I check that first invoice move is correct for creditor account(debit - credit == -555.56)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_supplier_invoice_november"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == -555.56), "Invoice move is incorrect for creditor account"
assert (move_line.amount_currency == -1000), "Amount currency is incorrect for creditor account"
-
I set the context that will be used for the encoding of all the vouchers of this file
-
!context
'type': 'payment'
-
I create the voucher of payment with values $950, journal USD
-
!record {model: account.voucher, id: account_voucher_case_5_supplier_flow, view: view_vendor_payment_form}:
account_id: account.cash
amount: 950.0
company_id: base.main_company
journal_id: bank_journal_USD
name: 'Payment: Case Basic SUPPLIER USD/USD'
partner_id: base.res_partner_19
period_id: account.period_12
date: !eval time.strftime("%Y-12-01")
payment_option: 'with_writeoff'
writeoff_acc_id: account.a_expense
comment: 'Write Off'
type: 'payment'
-
I fill $1000 for the previously encoded invoice
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
voucher_id = self.browse(cr, uid, ref('account_voucher_case_5_supplier_flow'))
for item in voucher_id.line_dr_ids:
if item.amount_unreconciled == 1000.00:
self.pool.get('account.voucher.line').write(cr, uid, [item.id], {'amount': 1000})
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is -50.0
-
!assert {model: account.voucher, id: account_voucher_case_5_supplier_flow}:
- writeoff_amount == -50.0
-
I confirm the voucher
-
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_case_5_supplier_flow}
-
I check that the move of my voucher is valid and that it is posted
-
!python {model: account.voucher}: |
voucher_id = self.browse(cr, uid, ref('account_voucher_case_5_supplier_flow'))
assert voucher_id.state == 'posted', "Voucher state is not posted"
for move_line in voucher_id.move_id.line_id:
assert move_line.state == 'valid', "Voucher move is not valid"
-
I check that my creditor account is correct
-
I check that the bank entry is -$950 and 633.33€ as amount_currency and credit, respectively.
-
I check that the creditor account has 1 new line with $1000 and 666.67€ as amount_currency and debit, respectively.
-
I check that my currency rate difference is correct (111.11€ in debit/credit with no amount_currency)
-
I check that my writeoff is correct. 33.34€ in credit with -$50 as amount currency
-
!python {model: account.voucher}: |
voucher_id = self.browse(cr, uid, ref('account_voucher_case_5_supplier_flow'))
for move_line in voucher_id.move_id.line_id:
if move_line.amount_currency == -950.00:
assert move_line.credit == 633.33, "Wrong bank entry."
elif move_line.credit == 111.11 or move_line.debit == 111.11:
assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
elif move_line.credit == 33.34:
assert move_line.amount_currency == -50.0, "Writeoff amount is wrong."
elif move_line.debit == 666.67:
assert move_line.amount_currency == 1000.0, "Wrong supplier entry."
else:
assert False, "Wrong entry. Unrecognized account move line"
-
I check the residual amount of invoice, it should be 0 in residual currency and 0 in amount_residual and paid
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_supplier_invoice_november"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for supplier invoice"
@@ -290,7 +290,7 @@
<group>
<group>
<field name="state" invisible="1"/>
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'search_default_supplier': 1}"/>
<field name="currency_id" invisible="1"/>
<field name="amount" class="oe_inline"
string="Paid Amount"
+1 -1
View File
@@ -180,7 +180,7 @@ class account_analytic_account(osv.osv):
'partner_id': fields.many2one('res.partner', 'Customer'),
'user_id': fields.many2one('res.users', 'Project Manager'),
'manager_id': fields.many2one('res.users', 'Account Manager'),
'date_start': fields.date('Date Start'),
'date_start': fields.date('Start Date'),
'date': fields.date('Date End', select=True),
'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts.
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','To Renew'),('close','Closed')], 'Status', required=True,),
+4 -3
View File
@@ -336,7 +336,7 @@ class calendar_attendee(osv.osv):
('non-participant', 'For information Purpose')], 'Role', \
help='Participation role for the calendar user'),
'state': fields.selection([('needs-action', 'Needs Action'),
('tentative', 'Tentative'),
('tentative', 'Uncertain'),
('declined', 'Declined'),
('accepted', 'Accepted'),
('delegated', 'Delegated')], 'Status', readonly=True, \
@@ -559,7 +559,8 @@ property or property parameter."),
for vals in self.browse(cr, uid, ids, context=context):
if vals.ref and vals.ref.user_id:
mod_obj = self.pool.get(vals.ref._name)
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id}
res=mod_obj.read(cr,uid,[vals.ref.id],['duration','class'],context)
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id,'duration':res[0]['duration'],'class':res[0]['class']}
mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
@@ -1012,7 +1013,7 @@ class calendar_event(osv.osv):
'Show Time as', states={'done': [('readonly', True)]}),
'base_calendar_url': fields.char('Caldav URL', size=264),
'state': fields.selection([
('tentative', 'Tentative'),
('tentative', 'Uncertain'),
('cancelled', 'Cancelled'),
('confirmed', 'Confirmed'),
], 'Status', readonly=True),
+3 -2
View File
@@ -89,7 +89,8 @@
<page string="Meeting Details">
<group>
<group>
<field name="date" string="Starting at"/>
<field name="date" string="Starting at"
on_change="onchange_dates(date, duration, False, allday)"/>
<label for="duration"/>
<div>
<field name="duration" widget="float_time"
@@ -100,7 +101,7 @@
<label for="allday" string="All Day?"/>)
</div>
<field name="date_deadline" groups="base.group_no_one"
attrs="{'invisible': [('allday','=',True)]}"
attrs="{'invisible': ['|', ('allday','=',True), ('duration','&lt;', 24)]}"
on_change="onchange_dates(date,False,date_deadline)"/>
</group>
<group>
+1 -1
View File
@@ -1146,7 +1146,7 @@ msgstr ""
#: selection:calendar.attendee,state:0
#: selection:calendar.event,state:0
#: selection:calendar.todo,state:0
msgid "Tentative"
msgid "Uncertain"
msgstr ""
#. module: base_calendar
+2 -1
View File
@@ -25,7 +25,8 @@
'description': """
Automated Translations through Gengo API
----------------------------------------
This module will install passive scheduler job for automated translations
This module will install passive scheduler job for automated translations
using the Gengo API. To activate it, you must
1) Configure your Gengo authentication parameters under `Settings > Companies > Gengo Parameters`
2) Launch the wizard under `Settings > Application Terms > Gengo: Manual Request of Translation` and follow the wizard.
+6 -2
View File
@@ -251,7 +251,7 @@ class crm_lead(base_stage, format_address, osv.osv):
'street2': fields.char('Street2', size=128),
'zip': fields.char('Zip', change_default=True, size=24),
'city': fields.char('City', size=128),
'state_id': fields.many2one("res.country.state", 'State', domain="[('country_id','=',country_id)]"),
'state_id': fields.many2one("res.country.state", 'State'),
'country_id': fields.many2one('res.country', 'Country'),
'phone': fields.char('Phone', size=64),
'fax': fields.char('Fax', size=64),
@@ -896,6 +896,10 @@ class crm_lead(base_stage, format_address, osv.osv):
lead.message_post(body=message)
return True
crm_lead()
def onchange_state(self, cr, uid, ids, state_id, context=None):
if state_id:
country_id=self.pool.get('res.country.state').browse(cr, uid, state_id, context).country_id.id
return {'value':{'country_id':country_id}}
return {}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -2
View File
@@ -160,7 +160,7 @@
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
<field name="state_id" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
<field name="state_id" on_change="onchange_state(state_id)" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
@@ -477,7 +477,7 @@
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
<field name="state_id" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
<field name="state_id" options='{"no_open": True}' on_change="onchange_state(state_id)" placeholder="State" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
-8
View File
@@ -2,14 +2,6 @@
<openerp>
<data>
<act_window
id="crm_case_categ_phone_create_partner"
name="Schedule a Call"
res_model="crm.phonecall"
view_mode="tree,form,calendar"
context="{'search_default_partner_id': active_id, 'default_duration': 1.0, 'default_partner_id': active_id}"
groups="base.group_sale_salesman"
/>
<!-- TO CONFIRM: This is fine -->
<!-- act_window
+1 -1
View File
@@ -115,7 +115,7 @@
name="%(base_calendar.action_crm_meeting)d"
context="{'search_default_partner_ids': active_id, 'default_partner_ids' : [active_id]}"/>
<button type="action" string="Calls"
name="%(crm.crm_case_categ_phone_create_partner)d"
name="%(crm.crm_case_categ_phone_incoming0)d"
context="{'search_default_partner_id': active_id, 'default_duration': 1.0}" />
<button type="action" string="Opportunities" attrs="{'invisible': [('customer', '=', False)]}"
name="%(crm.crm_case_category_act_oppor11)d" context="{'search_default_partner_id': active_id}"/>
+3 -10
View File
@@ -106,12 +106,6 @@
states="draft,pending" groups="base.group_user"/>
<button name="case_close" string="Done" type="object" class="oe_highlight"
states="open,pending" groups="base.group_user"/>
<button name="case_refuse" string="Refuse" type="object" class="oe_highlight"
states="draft,open,pending" groups="base.group_user"/>
<button name="stage_previous" string="Previous Stage" type="object" groups="base.group_user"
states="open,pending" icon="gtk-go-back" attrs="{'invisible': [('stage_id','=', False)]}"/>
<button name="stage_next" string="Next Stage" type="object" groups="base.group_user"
states="open,pending" icon="gtk-go-forward" attrs="{'invisible': [('stage_id','=', False)]}"/>
<button name="case_reset" string="Reset to Draft" type="object" groups="base.group_user"
states="cancel,done"/>
<button name="case_cancel" string="Cancel" type="object" groups="base.group_user"
@@ -124,13 +118,12 @@
<field name="name"/>
<field name="date"/>
</group>
<group colspan="4" col="6">
<group colspan="4" col="4">
<field name="user_id"/>
<field name="section_id" widget="selection"/>
<field name="state" groups="base.group_no_one"/>
<newline/>
<field name="priority" groups="base.group_user"/>
<field name="section_id"/>
<field name="date_deadline"/>
<field name="state" groups="base.group_no_one"/>
</group>
<group colspan="4" col="4">
<notebook>
+7 -7
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-02-17 03:56+0000\n"
"Last-Translator: Jeff Wang <wjfonhand@hotmail.com>\n"
"PO-Revision-Date: 2012-11-02 01:52+0000\n"
"Last-Translator: Joshua Jan(SHINEIT) <popkar77@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 04:51+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: delivery
#: report:sale.shipping:0
@@ -332,13 +332,13 @@ msgstr "重量"
msgid ""
"Check this box if you want to manage delivery prices that depends on the "
"destination, the weight, the total of the order, etc."
msgstr "如果你要根据目的地、重量、订单总价来管理运费,请勾选这里。"
msgstr "如果要根据目的地、重量、订单总价来管理运费,请勾选这里。"
#. module: delivery
#: help:delivery.carrier,normal_price:0
msgid ""
"Keep empty if the pricing depends on the advanced pricing per destination"
msgstr "如果价格基于每个目的地的固定价格,这里留空。"
msgstr "默认的运费的价格,如果根据目的地定价,这里留空。"
#. module: delivery
#: constraint:stock.move:0
@@ -576,7 +576,7 @@ msgstr "一次性交货"
#. module: delivery
#: field:delivery.carrier,use_detailed_pricelist:0
msgid "Advanced Pricing per Destination"
msgstr "每个目的地的固定价格"
msgstr "根据目的地定价"
#. module: delivery
#: view:delivery.carrier:0
+3 -17
View File
@@ -101,7 +101,7 @@
<form string="Events" version="7.0">
<header>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Event Ended" name="button_done" states="confirm" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Finish Event" name="button_done" states="confirm" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object" groups="base.group_user"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" groups="base.group_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
@@ -288,7 +288,7 @@
<t t-if="record.is_subscribed.raw_value">
<button type="object" name="unsubscribe_to_event" class="oe_unsubscribe_button ">
<span>Subscribed</span>
<span class="unsubscribe">Unsubscribe</span>
<span class="oe_unsubscribe">Unsubscribe</span>
</button>
</t>
</div>
@@ -313,20 +313,6 @@
</field>
</record>
<!-- Event Graph view -->
<record model="ir.ui.view" id="view_event_graph">
<field name="name">Event Graph</field>
<field name="model">event.event</field>
<field name="arch" type="xml">
<graph string="Event by Registration" type="bar" orientation="horizontal">
<field name="name"/>
<field name="register_current" operator="+"/>
<field name="register_prospect" operator="+"/>
</graph>
</field>
</record>
<!-- Event Search View -->
<record model="ir.ui.view" id="view_event_search">
@@ -362,7 +348,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,calendar,tree,form,graph</field>
<field name="view_mode">kanban,calendar,tree,form</field>
<field name="context">{"search_default_upcoming":1}</field>
<field name="search_view_id" ref="view_event_search"/>
<field name="help" type="html">
+1 -1
View File
@@ -23,7 +23,7 @@
<separator string="Connection with username and password" colspan="4"/>
<label string="Another approach is to create a user for OpenERP in Moodle. If you do so, make sure that this user has appropriate access rights." colspan="4"/>
<field name="moodle_username"/>
<field name="moodle_password"/>
<field name="moodle_password" password="True"/>
</group>
</form>
</field>
+3 -3
View File
@@ -24,9 +24,9 @@
<field name="arch" type="xml">
<form string="Incoming Mail Server" version="7.0">
<header attrs="{'invisible' : [('type', '=', 'local')]}">
<button string="Test &amp; Confirm" type="object" name="button_confirm_login" states="draft" icon="gtk-apply"/>
<button string="Fetch Now" type="object" name="fetch_mail" states="done" icon="gtk-network"/>
<button string="Reset Confirmation" type="object" name="set_draft" icon="gtk-convert" states="done"/>
<button string="Test &amp; Confirm" type="object" name="button_confirm_login" states="draft"/>
<button string="Fetch Now" type="object" name="fetch_mail" states="done"/>
<button string="Reset Confirmation" type="object" name="set_draft" states="done"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
+1 -1
View File
@@ -29,7 +29,7 @@
'summary': 'Jobs, Departments, Employees Details',
'description': """
Human Resources Management
=========================
==========================
This application enables you to manage important aspects of your company's staff and other details such as their skills, contacts, working time...
+15 -2
View File
@@ -188,8 +188,6 @@
</field>
</record>
<menuitem id="next_id_49" name="Expenses" sequence="15" parent="hr.menu_hr_root"/>
<menuitem action="expense_all" id="menu_expense_all" name="Expenses" parent="next_id_49"/>
<record id="view_product_hr_expense_form" model="ir.ui.view">
<field name="name">product.product.expense.form</field>
@@ -203,5 +201,20 @@
</field>
</record>
<record id="hr_expense_product" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.product</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{"default_hr_expense_ok":1}</field>
<field name="domain">[('hr_expense_ok','=',True)]</field>
<field name="search_view_id" ref="product.product_search_form_view"/>
</record>
<menuitem id="menu_product_hr_config_expense" name="Expenses" parent="hr.menu_hr_configuration"/>
<menuitem id="menu_hr_product" name="Products" parent="menu_product_hr_config_expense" action="hr_expense_product"/>
<menuitem id="next_id_49" name="Expenses" sequence="15" parent="hr.menu_hr_root"/>
<menuitem action="expense_all" id="menu_expense_all" name="Expenses" parent="next_id_49"/>
</data>
</openerp>
@@ -50,6 +50,7 @@ reports.""",
],
'demo': ['hr_timesheet_invoice_demo.xml'],
'test': ['test/test_hr_timesheet_invoice.yml',
'test/test_hr_timesheet_invoice_no_prod_tax.yml',
'test/hr_timesheet_invoice_report.yml',
],
'installable': True,
@@ -94,13 +94,13 @@ class account_analytic_account(osv.osv):
def set_close(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'close'}, context=context)
message = _("Contract has been <b>closed</b>.")
self.message_post(cr, uid, ids, body=message, subtype="mt_account_closed", context=context)
self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_closed", context=context)
return True
def set_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'cancelled'}, context=context)
message = _("Contract has been <b>canceled</b>.")
self.message_post(cr, uid, ids, body=message, subtype="mt_account_canceled", context=context)
self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_canceled", context=context)
return True
def set_open(self, cr, uid, ids, context=None):
@@ -21,5 +21,16 @@
<field name="customer_name">80%</field>
<field name="factor">20.0</field>
</record>
<!-- mail: subtypes -->
<record id="mt_account_closed" model="mail.message.subtype">
<field name="name">finished</field>
<field name="res_model">account.analytic.account</field>
</record>
<record id="mt_account_canceled" model="mail.message.subtype">
<field name="name">canceled</field>
<field name="res_model">account.analytic.account</field>
</record>
</data>
</openerp>
@@ -19,10 +19,10 @@
<xpath expr="/form/sheet" position='before'>
<header>
<button name="set_pending" string="Pending" type="object" states="open" />
<button name="set_close" string="Close" type="object" states="open,pending" />
<button name="set_close" string="Contract Finished" type="object" states="open,pending" />
<button name="set_open" string="Re-open project" type="object" states="pending,close" />
<button name="set_open" string="Re-open project" type="object" states="cancelled,draft"/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending"/>
<button name="set_cancel" string="Cancel Contract" type="object" states="open,pending"/>
<field name="state" readonly="1" widget="statusbar"
statusbar_visible="open,pending,close" statusbar_colors='{"pending":"red", "template":"blue"}'/>
</header>
@@ -30,6 +30,42 @@
-
!python {model: hr.analytic.timesheet}: |
self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule0')], ref('account.analytic_agrolait'))
-
I create a Tax Codes
-
!record {model: account.tax.code, id: tax_case}:
name: Tax_case
company_id: base.main_company
sign: 1
-
I create a Tax
-
!record {model: account.tax, id: tax10}:
name: Tax 10.0
amount: 10.0
type: fixed
sequence: 1
company_id: base.main_company
type_tax_use: all
tax_code_id: tax_case
-
I create an Account with the tax
-
!record {model: account.account, id: account_income_i000}:
name: "income account"
code: "I000"
type: 'other'
user_type: "account.data_account_type_income"
tax_ids: [tax10]
-
I set the account as property_account_income on the product and I set the tax on the product
-
!record {model: product.product, id: product.product_product_consultant}:
property_account_income: account_income_i000
uom_id: product.product_uom_hour
taxes_id: [tax10]
list_price: 75
-
I create invoice on analytic Line using "Invoice analytic Line" wizard.
-
@@ -39,13 +75,11 @@
price: 1
product: product.product_product_consultant
time: 1
-
I click on "Create Invoice" button of "Invoice analytic Line" wizard to create invoice.
-
!python {model: hr.timesheet.invoice.create}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule0")]})
-
I check that Invoice is created for this timesheet.
-
@@ -67,8 +101,8 @@
assert product == product_exp
assert aline.invoice_id, "Invoice created, but analytic line wasn't updated."
assert aline.invoice_id == invoice_id, "Invoice doesn't match the one at analytic line"
# The expected amount is hard coded here, please keep updated:
assert invoice_id.amount_untaxed == 187.5, "Invoice amount mismatch: %s" % invoice_id.amount_untaxed
assert invoice_id.amount_tax == 50, "Invoice tax mismatch: %s" % invoice_id.amount_tax
-
I create final invoice for this analytic account.
-
@@ -0,0 +1,119 @@
-
In order to test hr_timesheet_invoice in OpenERP, I create account line to manage invoice based on costs.
-
I create an account analytic line.
-
!record {model: account.analytic.line, id: account_analytic_line_developyamlforhrmodule1 }:
account_id: account.analytic_agrolait
amount: -1.0
general_account_id: account.a_expense
journal_id: hr_timesheet.analytic_journal
name: develop yaml for hr module
product_id: product.product_product_consultant
product_uom_id: product.product_uom_hour
to_invoice: hr_timesheet_invoice.timesheet_invoice_factor2
unit_amount: 5.00
-
Assign partner name and price list in analytic account.
-
!record {model: account.analytic.account, id: account.analytic_agrolait}:
partner_id: base.res_partner_2
pricelist_id: product.list0
-
I open this account and make the state as pending.
-
!python {model: account.analytic.account}: |
self.set_open(cr, uid, [ref('account.analytic_agrolait')], None)
self.set_pending(cr, uid, [ref('account.analytic_agrolait')], None)
-
I assign account on analytic account line.
-
!python {model: hr.analytic.timesheet}: |
self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule1')], ref('account.analytic_agrolait'))
-
I create a Tax Code
-
!record {model: account.tax.code, id: tax_case}:
name: Tax_case
company_id: base.main_company
sign: 1
-
I create a Tax
-
!record {model: account.tax, id: tax8}:
name: Tax 8.0
amount: 8.0
type: fixed
sequence: 1
company_id: base.main_company
type_tax_use: all
tax_code_id: tax_case
-
I create an Account with the tax
-
!record {model: account.account, id: account_income_i000}:
name: "income account"
code: "I000"
type: 'other'
user_type: "account.data_account_type_income"
tax_ids: [tax8]
-
I set the account as property_account_income on the product and I set no tax on the product (so default tax from the account will be used)
-
!record {model: product.product, id: product.product_product_consultant}:
property_account_income: account_income_i000
uom_id: product.product_uom_hour
taxes_id: []
list_price: 75
-
I create invoice on analytic Line using "Invoice analytic Line" wizard.
-
!record {model: hr.timesheet.invoice.create, id: hr_timesheet_invoice_create_0}:
date: 1
name: 1
price: 1
product: product.product_product_consultant
time: 1
-
I click on "Create Invoice" button of "Invoice analytic Line" wizard to create invoice.
-
!python {model: hr.timesheet.invoice.create}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule1")]})
-
I check that Invoice is created for this timesheet.
-
!python {model: account.analytic.line}: |
aline = self.browse(cr, uid, ref('account_analytic_line_developyamlforhrmodule1'))
analytic_account_obj = self.pool.get('account.analytic.account')
data = self.pool.get('hr.timesheet.invoice.create').read(cr, uid, [ref("hr_timesheet_invoice_create_0")], [], context)[0]
partner = aline.account_id.partner_id.id
invoice_obj = self.pool.get('account.invoice')
invoice_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner)])
invoice_id = invoice_obj.browse(cr, uid, invoice_ids)[0]
for invoice in invoice_id.invoice_line:
product = invoice.product_id.id
product_exp = data['product'][0]
assert product == product_exp
assert aline.invoice_id, "Invoice created, but analytic line wasn't updated."
assert aline.invoice_id == invoice_id, "Invoice doesn't match the one at analytic line"
assert invoice_id.amount_untaxed == 187.5, "Invoice amount mismatch: %s" % invoice_id.amount_untaxed
assert invoice_id.amount_tax == 40, "Invoice tax mismatch: %s" % invoice_id.amount_tax
-
I create final invoice for this analytic account.
-
!record {model: hr.timesheet.invoice.create.final, id: hr_timesheet_invoice_create_final_0}:
date: 1
name: 1
price: 1
time: 1
-
I click on "Create Invoice" button to create Invoice and validate the invoice.
-
!python {model: hr.timesheet.invoice.create.final}: |
import netsvc
wkf_service = netsvc.LocalService("workflow")
res = self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_final_0")], {"active_ids": [ref("account.analytic_agrolait")]})
@@ -49,7 +49,6 @@ class account_analytic_line(osv.osv):
# }
def invoice_cost_create(self, cr, uid, ids, data=None, context=None):
analytic_account_obj = self.pool.get('account.analytic.account')
res_partner_obj = self.pool.get('res.partner')
account_payment_term_obj = self.pool.get('account.payment.term')
invoice_obj = self.pool.get('account.invoice')
product_obj = self.pool.get('product.product')
@@ -115,7 +114,7 @@ class account_analytic_line(osv.osv):
for product_id, user_id, factor_id, qty, uom, line_name in cr.fetchall():
if data.get('product'):
product_id = data['product'][0]
product_id = data['product'][0]
product = product_obj.browse(cr, uid, product_id, context=context2)
if not product:
raise osv.except_osv(_('Error!'), _('There is no product defined for the line %s. Please select one or force the product through the wizard.') % (line_name))
@@ -132,7 +131,7 @@ class account_analytic_line(osv.osv):
general_account = product.product_tmpl_id.property_account_income or product.categ_id.property_account_income_categ
if not general_account:
raise osv.except_osv(_("Configuration Error!"), _("Please define income account for product '%s'.") % product.name)
taxes = product.taxes_id
taxes = product.taxes_id or general_account.tax_ids
tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
curr_line = {
'price_unit': price,
@@ -211,7 +210,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
data = context and context.get('active_ids', [])
for analytic in analytic_obj.browse(cr, uid, data, context=context):
if analytic.invoice_id:
raise osv.except_osv(_('Warning!'), _("Invoice is already linked to some of the analytic line(s)!"))
raise osv.except_osv(_('Warning!'), _("Invoice is already linked to some of the analytic line(s)!"))
def do_create(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, [], context=context)[0]
+5 -5
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-08-18 17:34+0000\n"
"Last-Translator: Heling Yao <Unknown>\n"
"PO-Revision-Date: 2012-11-01 08:13+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:14+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: hr_timesheet_sheet
#: field:hr.analytic.timesheet,sheet_id:0 field:hr.attendance,sheet_id:0
@@ -967,7 +967,7 @@ msgstr "你只能做今天的签入/签出"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
msgid "Submit to Manager"
msgstr ""
msgstr "提交给经理"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,account_ids:0
@@ -26,7 +26,6 @@
<field name="product_id" invisible="1"/>
<field name="account_id" invisible="1" groups="analytic.group_analytic_accounting"/>
<field name="general_account_id" invisible="1"/>
<field name="quantity" sum="Hours"/>
<field name="cost" sum="Total Cost"/>
</tree>
@@ -32,6 +32,7 @@ class timesheet_report(osv.osv):
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'date': fields.date('Date', readonly=True),
'name': fields.char('Description', size=64,readonly=True),
'product_id' : fields.many2one('product.product', 'Product'),
'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
@@ -63,6 +64,7 @@ class timesheet_report(osv.osv):
select
min(aal.id) as id,
htss.name,
aal.date as date,
htss.date_from,
htss.date_to,
to_char(htss.date_from, 'YYYY-MM-DD') as day,
@@ -96,6 +98,7 @@ class timesheet_report(osv.osv):
left join hr_timesheet_sheet_sheet as htss ON (hat.line_id=htss.id)
group by
aal.account_id,
aal.date,
htss.date_from,
htss.date_to,
aal.unit_amount,
@@ -17,6 +17,7 @@
<field name="model">timesheet.report</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';black:state in ('confirm','new');gray:state == 'cancel'" string="Timesheet">
<field name="date" invisible="1"/>
<field name="name" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="date_from" invisible="1"/>
+1 -1
View File
@@ -473,7 +473,7 @@
<field name="name">CODA Statement Lines</field>
<field name="res_model">coda.bank.statement.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph,form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'block_statement_line_delete' : 1}</field>
<field name="search_view_id" ref="view_coda_bank_statement_line_filter"/>
<field name="view_id" ref="view_coda_bank_statement_line_list"/>
+83
View File
@@ -0,0 +1,83 @@
# German translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-23 09:56+0000\n"
"PO-Revision-Date: 2012-10-31 15:43+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_receivable
msgid "Receivable"
msgstr "Forderungen"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_expense
msgid "Expense"
msgstr "Ausgaben"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_equity
msgid "Equity"
msgstr ""
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_tax
msgid "Tax"
msgstr "Steuer"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_cash
msgid "Cash"
msgstr "Barkasse"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_payable
msgid "Payable"
msgstr "Verbindlichkeiten"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_asset
msgid "Asset"
msgstr "Anlagegüter"
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_income
msgid "Income"
msgstr "Einnahmen"
#. module: l10n_ve
#: model:ir.actions.todo,note:l10n_ve.config_call_account_template_ve_chart
msgid ""
"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
"the name of the company, the chart template to follow, the no. of digits to "
"generate the code for your accounts and Bank account, currency to create "
"Journals. Thus,the pure copy of chart Template is generated.\n"
"This is the same wizard that runs from Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template.\n"
"Genere el Plan de cuentas de una Plantilla de Carta. Le pedirán pasar el "
"nombre de la compania, la plantilla de carta para seguir, el no. de digitos "
"para generar el codigo para sus cuentas y cuenta Bancaria, dinero para crear "
"Diarios. Asi, la copia pura de la carta la Plantilla es generada.\n"
"Esto es el mismo wizard que corre de la Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template.\n"
" "
msgstr ""
#. module: l10n_ve
#: model:account.account.type,name:l10n_ve.account_type_view
msgid "View"
msgstr "Sicht"
+11 -11
View File
@@ -8,20 +8,20 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-09 00:36+0000\n"
"PO-Revision-Date: 2012-10-26 17:02+0000\n"
"PO-Revision-Date: 2012-10-30 09:52+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:33+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-10-31 04:40+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: mail
#: field:mail.compose.message,subtype:0 field:mail.message,subtype:0
#: field:mail.message.common,subtype:0
msgid "Message Type"
msgstr ""
msgstr "Тип сообщения"
#. module: mail
#: help:mail.compose.message,auto_delete:0
@@ -51,7 +51,7 @@ msgstr "История общения"
#. module: mail
#: view:mail.message:0
msgid "Group By..."
msgstr "Объеденить по..."
msgstr "Группировать по ..."
#. module: mail
#: model:ir.actions.act_window,name:mail.action_email_compose_message_wizard
@@ -80,7 +80,7 @@ msgstr "Получатели сообщения"
#: field:mail.compose.message,body_text:0 field:mail.message,body_text:0
#: field:mail.message.common,body_text:0
msgid "Text Contents"
msgstr ""
msgstr "Текстовое содержимое"
#. module: mail
#: view:mail.message:0 selection:mail.message,state:0
@@ -196,7 +196,7 @@ msgstr "Получатели"
#. module: mail
#: model:ir.model,name:mail.model_mail_compose_message
msgid "Email composition wizard"
msgstr ""
msgstr "Мастер составления эл. почты"
#. module: mail
#: field:mail.compose.message,res_id:0 field:mail.message,res_id:0
@@ -219,7 +219,7 @@ msgstr "Ответ:"
#: field:mail.compose.message,model:0 field:mail.message,model:0
#: field:mail.message.common,model:0
msgid "Related Document Model"
msgstr ""
msgstr "Модель связанного документа"
#. module: mail
#: view:mail.message:0
@@ -287,7 +287,7 @@ msgstr "%(sender_name)s написал:"
#: field:mail.compose.message,body_html:0 field:mail.message,body_html:0
#: field:mail.message.common,body_html:0
msgid "Rich-text Contents"
msgstr ""
msgstr "Форматированное содержимое"
#. module: mail
#: field:mail.message,original:0
@@ -359,7 +359,7 @@ msgstr "[OpenERP-Forward-Failed] %s"
#. module: mail
#: field:mail.message,user_id:0
msgid "Related User"
msgstr ""
msgstr "Относится к пользователю"
#. module: mail
#: help:mail.compose.message,headers:0 help:mail.message,headers:0
@@ -454,7 +454,7 @@ msgstr "Сообщения"
#: field:mail.compose.message,headers:0 field:mail.message,headers:0
#: field:mail.message.common,headers:0
msgid "Message Headers"
msgstr ""
msgstr "Заголовки сообщений"
#. module: mail
#: field:mail.compose.message,email_bcc:0 field:mail.message,email_bcc:0
+1 -1
View File
@@ -156,7 +156,7 @@ class mail_thread(osv.AbstractModel):
old = set(fol.partner_id.id for fol in fol_obj.browse(cr, SUPERUSER_ID, fol_ids))
new = set(old)
for command in value:
for command in value or []:
if isinstance(command, (int, long)):
new.add(command)
elif command[0] == 0:
+1 -1
View File
@@ -124,7 +124,7 @@
<field name="act_window_id" ref="action_membership_products"/>
</record>
<menuitem name="Association" id="base.menu_association" icon="terp-calendar" sequence="9"/>
<menuitem name="Association" id="base.menu_association" icon="terp-calendar" sequence="10"/>
<menuitem name="Members" id="menu_membership" sequence="0" parent="base.menu_association"/>
<menuitem name="Configuration" id="base.menu_marketing_config_association"
parent="base.menu_association" sequence="30"/>
+21 -21
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:49+0000\n"
"PO-Revision-Date: 2011-01-12 15:34+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2012-11-01 19:12+0000\n"
"Last-Translator: Dusan Laznik <laznik@mentis.si>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 04:50+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: mrp
#: view:mrp.routing.workcenter:0
@@ -34,7 +34,7 @@ msgstr ""
#. module: mrp
#: help:mrp.production,location_src_id:0
msgid "Location where the system will look for components."
msgstr "Lokacije, kjer bo sistem iskal komponente"
msgstr ""
#. module: mrp
#: field:mrp.production,workcenter_lines:0
@@ -59,7 +59,7 @@ msgstr "Število ciklov"
#. module: mrp
#: model:product.uom.categ,name:mrp.product_uom_categ_fluid
msgid "Fluid"
msgstr ""
msgstr "Tekočina"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_minimumstockprocure0
@@ -155,7 +155,7 @@ msgstr ""
#. module: mrp
#: view:mrp.production:0
msgid "Products to Finish"
msgstr "Produkti za dokončanje"
msgstr "Izdelki za dokončanje"
#. module: mrp
#: selection:mrp.bom,method:0
@@ -166,7 +166,7 @@ msgstr ""
#: view:mrp.production:0
#: field:mrp.production,state:0
msgid "State"
msgstr "Stanje"
msgstr "Status"
#. module: mrp
#: field:mrp.workcenter,costs_hour:0
@@ -176,7 +176,7 @@ msgstr "Strošek na uro"
#. module: mrp
#: model:product.template,name:mrp.product_orange_product_template
msgid "Orange"
msgstr ""
msgstr "Pomaranča"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_servicemts0
@@ -188,7 +188,7 @@ msgstr ""
#. module: mrp
#: view:mrp.production:0
msgid "UOM"
msgstr "ME"
msgstr "EM"
#. module: mrp
#: field:change.production.qty,product_qty:0
@@ -241,7 +241,7 @@ msgstr "["
#. module: mrp
#: model:process.transition,name:mrp.process_transition_procureserviceproduct0
msgid "Procurement of services"
msgstr ""
msgstr "Nabava storitev"
#. module: mrp
#: view:mrp.workcenter:0
@@ -279,7 +279,7 @@ msgstr "Partnerjev sklic"
#: field:mrp.production,origin:0
#: report:mrp.production.order:0
msgid "Source Document"
msgstr ""
msgstr "Izvorni dokument"
#. module: mrp
#: field:mrp.production,product_lines:0
@@ -329,13 +329,13 @@ msgstr ""
#. module: mrp
#: view:mrp.bom:0
msgid "Default UOM"
msgstr ""
msgstr "Privzeta EM"
#. module: mrp
#: sql_constraint:mrp.production:0
#: sql_constraint:stock.picking:0
msgid "Reference must be unique per Company!"
msgstr ""
msgstr "Referenca mora biti enoznačna"
#. module: mrp
#: code:addons/mrp/report/price.py:139
@@ -441,7 +441,7 @@ msgstr ""
#. module: mrp
#: sql_constraint:res.company:0
msgid "The company name must be unique !"
msgstr ""
msgstr "Ime podjetja mora biti unikatno !"
#. module: mrp
#: model:ir.actions.act_window,help:mrp.mrp_property_group_action
@@ -463,7 +463,7 @@ msgstr ""
#. module: mrp
#: model:process.node,note:mrp.process_node_serviceproduct1
msgid "For Services."
msgstr ""
msgstr "Za storitve."
#. module: mrp
#: help:mrp.workcenter,costs_cycle_account_id:0
@@ -494,7 +494,7 @@ msgstr ""
#. module: mrp
#: constraint:product.product:0
msgid "Error: Invalid ean code"
msgstr ""
msgstr "Napaka: neveljavna EAN črtna koda"
#. module: mrp
#: field:mrp.production,move_created_ids:0
@@ -564,7 +564,7 @@ msgstr ""
#: field:mrp.production,product_uom:0
#: field:mrp.production.product.line,product_uom:0
msgid "Product UOM"
msgstr "ME proizvoda"
msgstr "EM"
#. module: mrp
#: selection:mrp.production,state:0
@@ -611,7 +611,7 @@ msgstr ""
#: code:addons/mrp/procurement.py:43
#, python-format
msgid "No BoM defined for this product !"
msgstr ""
msgstr "Izdelek nima kosovnice"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_bom_form_action2
@@ -622,12 +622,12 @@ msgstr ""
#. module: mrp
#: model:ir.model,name:mrp.model_stock_move
msgid "Stock Move"
msgstr ""
msgstr "Prenos zaloge"
#. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_planning
msgid "Planning"
msgstr ""
msgstr "Načrtovanje"
#. module: mrp
#: view:mrp.production:0
+2 -27
View File
@@ -192,7 +192,7 @@ class mrp_bom(osv.osv):
return res
_columns = {
'name': fields.char('Name', size=64, required=True),
'name': fields.char('Name', size=64),
'code': fields.char('Reference', size=16),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the bills of material without removing it."),
'type': fields.selection([('normal','Normal BoM'),('phantom','Sets / Phantom')], 'BoM Type', required=True,
@@ -420,28 +420,6 @@ class mrp_production(osv.osv):
result[prod.id]['cycle_total'] += wc.cycle
return result
def _production_date_end(self, cr, uid, ids, prop, unknow_none, context=None):
""" Finds production end date.
@param prop: Name of field.
@param unknow_none:
@return: Dictionary of values.
"""
result = {}
for prod in self.browse(cr, uid, ids, context=context):
result[prod.id] = prod.date_planned
return result
def _production_date(self, cr, uid, ids, prop, unknow_none, context=None):
""" Finds production planned date.
@param prop: Name of field.
@param unknow_none:
@return: Dictionary of values.
"""
result = {}
for prod in self.browse(cr, uid, ids, context=context):
result[prod.id] = prod.date_planned[:10]
return result
def _src_id_default(self, cr, uid, ids, context=None):
src_location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context)
return src_location_id.id
@@ -469,13 +447,9 @@ class mrp_production(osv.osv):
'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True,
readonly=True, states={'draft':[('readonly',False)]},
help="Location where the system will stock the finished products."),
'date_planned_end': fields.function(_production_date_end, type='date', string='Scheduled End Date'),
'date_planned_date': fields.function(_production_date, type='date', string='Scheduled Date'),
'date_planned': fields.datetime('Scheduled Date', required=True, select=1, readonly=True, states={'draft':[('readonly',False)]}),
'date_start': fields.datetime('Start Date', select=True, readonly=True),
'date_finished': fields.datetime('End Date', select=True, readonly=True),
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)], readonly=True, states={'draft':[('readonly',False)]},
help="Bill of Materials allow you to define the list of required raw materials to make a finished product."),
'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft':[('readonly',False)]},
@@ -515,6 +489,7 @@ class mrp_production(osv.osv):
'state': lambda *a: 'draft',
'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'product_qty': lambda *a: 1.0,
'user_id': lambda self, cr, uid, c: uid,
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/',
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c),
'location_src_id': _src_id_default,
+5 -5
View File
@@ -366,7 +366,7 @@
</div>
</group>
<group>
<field name="name" class="oe_inline"/>
<field name="name" groups="base.group_no_one"/>
<field name="code" string="Reference"/>
<field name="type"/>
<p colspan="2" class="oe_grey" attrs="{'invisible': [('type','=','normal')]}">
@@ -442,11 +442,11 @@
<field name="arch" type="xml">
<tree string="Bill of Materials" colors="blue:method">
<field name="sequence" invisible="1"/>
<field name="name"/>
<field name="code"/>
<field name="name" invisible="1"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="code"/>
<field name="type"/>
<field name="method"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
@@ -462,9 +462,9 @@
<field name="arch" type="xml">
<tree string="BoM Structure" colors="blue:method">
<field name="sequence" invisible="1"/>
<field name="name" string="Component Name"/>
<field name="name" groups="base.group_no_one"/>
<field name="code"/>
<field name="product_id" string="Component Product"/>
<field name="product_id"/>
<field name="bom_id"/>
<field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/>
-12
View File
@@ -50,17 +50,6 @@ class stock_move(osv.osv):
stock_move()
class mrp_production_workcenter_line(osv.osv):
def _get_date_date(self, cr, uid, ids, field_name, arg, context=None):
""" Finds starting date.
@return: Dictionary of values.
"""
res={}
for op in self.browse(cr, uid, ids, context=context):
if op.date_start:
res[op.id] = op.date_start[:10]
else:
res[op.id]=False
return res
def _get_date_end(self, cr, uid, ids, field_name, arg, context=None):
""" Finds ending date.
@@ -92,7 +81,6 @@ class mrp_production_workcenter_line(osv.osv):
"* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pending' status.\n" \
"* When the user cancels the work order it will be set in 'Canceled' status.\n" \
"* When order is completely processed that time it is set in 'Finished' status."),
'date_start_date': fields.function(_get_date_date, string='Start Date', type='date'),
'date_planned': fields.datetime('Scheduled Date', select=True),
'date_planned_end': fields.function(_get_date_end, string='End Date', type='datetime'),
'date_start': fields.datetime('Start Date'),
@@ -328,7 +328,7 @@
<field name="model">mrp.production.workcenter.line</field>
<field name="arch" type="xml">
<graph string="Hours by Work Center" type="bar">
<field name="date_start_date"/>
<field name="date_start"/>
<field name="hour" operator="+"/>
<field name="workcenter_id" group="True"/>
</graph>
+1 -6
View File
@@ -34,16 +34,11 @@
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice" class="oe_highlight"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
<button name="action_cancel" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="object" attrs="{'invisible':[('invoice_method','!=','none')]}"/>
<button name="action_cancel" states="invoice_except" string="Cancel Repair" type="object" attrs="{'invisible':[('invoice_method','!=','none')]}"/>
<button name="action_cancel" string="Cancel Repair" type="object" attrs="{'invisible':['|',('invoice_method','!=','none'), ('state', 'not in',('confirmed','2binvoiced','ready','under_repair', 'invoice_except'))]}"/>
<button name="cancel" states="draft" string="Cancel Repair"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/>
</header>
<sheet string="Repairs order">
<label for="product_id" class="oe_edit_only"/>
<h1>
</h1>
<label for="name" class="oe_edit_only"/>
<h1>
Repair Order <field name="name" class="oe_inline"/>
</h1>
+1 -1
View File
@@ -144,7 +144,7 @@
<record id="trans_ready_repair_start" model="workflow.transition">
<field name="act_from" ref="act_repair_ready"/>
<field name="act_to" ref="act_repair_start"/>
<field name="signal">action_repair_start</field>
<field name="signal">repair_ready</field>
</record>
<record id="trans_repair_repair_end" model="workflow.transition">
@@ -22,7 +22,7 @@
-
I start the Repairing process by clicking on "Start Repair" button.
-
!workflow {model: mrp.repair, action: action_repair_start, ref: mrp_repair_rmrp2}
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp2}
-
Repairing process for this product is in Done state and I end this process by clicking on "End Repair" button for Invoice Method 'Before Repair'.
-
+12 -12
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-05-10 18:27+0000\n"
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
"PO-Revision-Date: 2012-10-31 09:46+0000\n"
"Last-Translator: Krešimir Jeđud <kresimir.jedud@infokom.hr>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 04:54+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: point_of_sale
#: field:report.transaction.pos,product_nb:0
@@ -916,7 +916,7 @@ msgstr "POS Order lines"
#. module: point_of_sale
#: view:pos.receipt:0
msgid "Receipt :"
msgstr "Receipt :"
msgstr "Račun"
#. module: point_of_sale
#: field:account.bank.statement.line,pos_statement_id:0
@@ -1671,7 +1671,7 @@ msgstr "Račun br."
#: model:ir.actions.act_window,name:point_of_sale.action_report_pos_receipt
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:231
msgid "Receipt"
msgstr "Receipt"
msgstr "Račun"
#. module: point_of_sale
#: view:pos.open.statement:0
@@ -2639,7 +2639,7 @@ msgstr "Godina"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:31
msgid "Disc (%)"
msgstr ""
msgstr "Popust(%)"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:41
@@ -2650,7 +2650,7 @@ msgstr ""
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:45
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:268
msgid "Tax:"
msgstr ""
msgstr "Porez:"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:64
@@ -2671,17 +2671,17 @@ msgstr ""
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:113
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:288
msgid "Change:"
msgstr ""
msgstr "Za vratiti:"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:124
msgid "Back to Products"
msgstr ""
msgstr "Povratak"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:127
msgid "Validate"
msgstr ""
msgstr "Potvrdi"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:140
@@ -2703,7 +2703,7 @@ msgstr ""
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:238
msgid "Next Order"
msgstr ""
msgstr "Sljedeći račun"
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:248
+3 -2
View File
@@ -484,7 +484,8 @@ class pos_order(osv.osv):
'name': order['name'],
'user_id': order['user_id'] or False,
'session_id': order['pos_session_id'],
'lines': order['lines']
'lines': order['lines'],
'pos_reference':order['name']
}, context)
for payments in order['statement_ids']:
@@ -592,7 +593,7 @@ class pos_order(osv.osv):
'picking_id': fields.many2one('stock.picking', 'Picking', readonly=True),
'note': fields.text('Internal Notes'),
'nb_print': fields.integer('Number of Print', readonly=True),
'pos_reference': fields.char('Receipt Ref', size=64, readonly=True),
'sale_journal': fields.related('session_id', 'config_id', 'journal_id', relation='account.journal', type='many2one', string='Sale Journal', store=True, readonly=True),
}
+4 -1
View File
@@ -88,6 +88,7 @@
<field name="user_id"/>
<field name="pricelist_id" groups="product.group_sale_pricelist" domain="[('type','=','sale')]"/>
<field name="picking_id" readonly="1"/>
<field name="pos_reference"/>
</group>
<group string="Accounting Information">
<field name="sale_journal" domain="[('type','=','sale')]"/>
@@ -131,6 +132,7 @@
<field name="arch" type="xml">
<tree string="POS Orders" colors="blue:state == 'draft';gray:state in ('done','cancel');black:state not in('done','cancel')">
<field name="name"/>
<field name="pos_reference"/>
<field name="partner_id"/>
<field name="date_order"/>
<field name="user_id"/>
@@ -149,6 +151,7 @@
<search string="Search Sales Order">
<field name="name" string="Sales Order"/>
<field name="date_order"/>
<field name="pos_reference"/>
<filter icon="terp-document-new" string="New" domain="[('state','=','draft')]"/>
<filter icon="gtk-apply" string="Done" domain="[('state','in',('paid','invoiced','done'))]"/>
<filter icon="terp-check" string="Invoiced" domain="[('state','=','invoiced')]"/>
@@ -890,7 +893,7 @@
<field name="cash_control" invisible="1" />
<group>
<field name="user_id"/>
<field name="config_id" attrs="{'invisible' : [('config_id', '!=', False)]}"/>
<field name="config_id"/>
</group>
<group>
<field name="start_at" attrs="{'invisible' : [('state', '=', 'opening_control')]}"/>
+12 -10
View File
@@ -91,16 +91,17 @@ class pos_details(report_sxw.rml_parse):
def _get_sum_dis_2(self):
return self.discount or 0.0
def _get_sum_discount(self, objects):
def _get_sum_discount(self, form):
#code for the sum of discount value
return reduce(lambda acc, object:
acc + reduce(
lambda sum_dis, line:
sum_dis + ((line.price_unit * line.qty) * (line.discount / 100)),
object.lines,
0.0),
objects,
0.0)
pos_obj = self.pool.get('pos.order')
user_obj = self.pool.get('res.users')
user_ids = form['user_ids'] or self._get_all_users()
company_id = user_obj.browse(self.cr, self.uid, self.uid).company_id.id
pos_ids = pos_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('user_id','in',user_ids),('company_id','=',company_id)])
for pos in pos_obj.browse(self.cr, self.uid, pos_ids):
for pol in pos.lines:
self.total_discount += ((pol.price_unit * pol.qty) * (pol.discount / 100))
return self.total_discount or False
def _get_payments(self, form):
statement_line_obj = self.pool.get("account.bank.statement.line")
@@ -179,11 +180,12 @@ class pos_details(report_sxw.rml_parse):
self.qty = 0.0
self.total_invoiced = 0.0
self.discount = 0.0
self.total_discount = 0.0
self.localcontext.update({
'time': time,
'strip_name': self._strip_name,
'getpayments': self._get_payments,
'getsumdisc': self._get_sum_dis_2,
'getsumdisc': self._get_sum_discount,
'gettotalofthaday': self._total_of_the_day,
'gettaxamount': self._get_tax_amount,
'pos_sales_details':self._pos_sales_details,
+2 -2
View File
@@ -373,8 +373,8 @@
<para style="terp_default_Bold_9">Total discount</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
</td>
<para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
</td>
</tr>
<tr>
<td>
@@ -60,7 +60,7 @@ class pos_order_report(osv.osv):
to_date(to_char(s.date_order, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
sum(l.qty * u.factor) as product_qty,
sum(l.qty * l.price_unit) as price_total,
sum(l.qty * l.discount) as total_discount,
sum((l.qty * l.price_unit) * (l.discount / 100)) as total_discount,
(sum(l.qty*l.price_unit)/sum(l.qty * u.factor))::decimal(16,2) as average_price,
sum(cast(to_char(date_trunc('day',s.date_order) - date_trunc('day',s.create_date),'DD') as int)) as delay_validation,
to_char(s.date_order, 'YYYY') as year,
@@ -103,6 +103,12 @@
<td>
<para style="P1">[[ repeatIn(o.lines,'line') ]]</para>
<para style="terp_default_9b">[[ line.product_id.name ]]</para>
<para style="terp_default_Right_9">
<font face="Helvetica">With a [[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ '%.2f' % line.discount ]]) % discount.</font>
</para>
<para style="terp_default_9b">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Right_9">[[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]]</para>
@@ -102,6 +102,11 @@
border: 1px solid #cecbcb;
border-radius: 4px;
}
.point-of-sale .pos-disc-font {
font-size: 12px;
font-style:italic;
color: #808080;
}
/* ********* The black header bar ********* */
+10 -2
View File
@@ -178,9 +178,12 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
[['state','=','open'],['pos_session_id', '=', self.get('pos_session').id]]
);
}).pipe(function(bank_statements){
var journals = new Array();
_.each(bank_statements,function(statement) {
journals.push(statement.journal_id[0])
});
self.set('bank_statements', bank_statements);
return self.fetch('account.journal', undefined, [['user_id','=', self.get('pos_session').user_id[0]]]);
return self.fetch('account.journal', undefined, [['id','in', journals]]);
}).pipe(function(journals){
self.set('journals',journals);
@@ -614,6 +617,11 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return sum + orderLine.get_price_with_tax();
}), 0);
},
getDiscountTotal: function() {
return (this.get('orderLines')).reduce((function(sum, orderLine) {
return sum + (orderLine.get_list_price() * (orderLine.get_discount()/100) * orderLine.get_quantity());
}), 0);
},
getTotalTaxExcluded: function() {
return (this.get('orderLines')).reduce((function(sum, orderLine) {
return sum + orderLine.get_price_without_tax();
@@ -967,6 +967,9 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this.$('#payment-paid-total').html(paidTotal.toFixed(2));
this.$('#payment-remaining').html(remaining.toFixed(2));
this.$('#payment-change').html(change.toFixed(2));
if((currentOrder.selected_orderline == undefined))
remaining = 1
if(this.pos_widget.action_bar){
this.pos_widget.action_bar.set_button_disabled('validation', remaining > 0);
}
+10 -1
View File
@@ -541,8 +541,9 @@
<t t-name="PosTicket">
<div class="pos-sale-ticket">
<div class="pos-right-align"><t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate + ' ' +
Date.CultureInfo.formatPatterns.longTime)"/></div>
Date.CultureInfo.formatPatterns.longTime)"/><t t-esc="widget.currentOrder.attributes.name"/></div>
<br />
<t t-esc="widget.company.name"/><br />
Phone: <t t-esc="widget.company.phone || ''"/><br />
@@ -553,6 +554,11 @@
<tr t-foreach="widget.currentOrderLines.toArray()" t-as="order">
<td>
<t t-esc="order.get_product().get('name')"/>
<t t-if="order.get_discount() > 0">
<div class="pos-disc-font">
With a <t t-esc="order.get_discount()"/>% discount
</div>
</t>
</td>
<td class="pos-right-align">
<t t-esc="order.get_quantity().toFixed(0)"/>
@@ -567,6 +573,9 @@
<tr><td>Tax:</td><td class="pos-right-align">
<t t-esc="widget.format_currency(widget.currentOrder.getTax().toFixed(2))"/>
</td></tr>
<tr><td>Discount:</td><td class="pos-right-align">
<t t-esc="widget.format_currency(widget.currentOrder.getDiscountTotal().toFixed(2))"/>
</td></tr>
<tr class="emph"><td>Total:</td><td class="pos-right-align">
<t t-esc="widget.format_currency(widget.currentOrder.getTotal().toFixed(2))"/>
</td></tr>
+2 -2
View File
@@ -561,10 +561,10 @@ class stock_warehouse_orderpoint(osv.osv):
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'product_min_qty': fields.float('Minimum Quantity', required=True,
help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\
"a procurement to bring the virtual stock to the Max Quantity."),
"a procurement to bring the forecasted quantity to the Max Quantity."),
'product_max_qty': fields.float('Maximum Quantity', required=True,
help="When the virtual stock goes below the Min Quantity, OpenERP generates "\
"a procurement to bring the virtual stock to the Quantity specified as Max Quantity."),
"a procurement to bring the forecasted quantity to the Quantity specified as Max Quantity."),
'qty_multiple': fields.integer('Qty Multiple', required=True,
help="The procurement quantity will be rounded up to this multiple."),
'procurement_id': fields.many2one('procurement.order', 'Latest procurement', ondelete="set null"),
@@ -111,9 +111,11 @@ class account_invoice_line(osv.osv):
if res_dict.get('item_id',False) and res_dict['item_id'].get(pricelist,False):
item = res_dict['item_id'].get(pricelist,False)
item_base = item_obj.read(cr, uid, [item], ['base'])[0]['base']
if item_base > 0:
field_name = price_type_obj.browse(cr, uid, item_base).field
item_read = item_obj.read(cr, uid, [item], ['base'])
if item_read:
item_base = item_read[0]['base']
if item_base > 0:
field_name = price_type_obj.browse(cr, uid, item_base).field
product = product_obj.browse(cr, uid, product_id, context)
product_read = product_obj.read(cr, uid, product_id, [field_name], context=context)
+41 -5
View File
@@ -178,7 +178,18 @@ class project(osv.osv):
res = super(project, self).unlink(cr, uid, ids, *args, **kwargs)
mail_alias.unlink(cr, uid, alias_ids, *args, **kwargs)
return res
def _get_attached_docs(self, cr, uid, ids, field_name, arg, context):
res = {}
attachment = self.pool.get('ir.attachment')
task = self.pool.get('project.task')
for id in ids:
project_attachments = attachment.search(cr, uid, [('res_model', '=', 'project.project'), ('res_id', 'in', [id])], context=context, count=True)
task_ids = task.search(cr, uid, [('project_id', 'in', [id])], context=context)
task_attachments = attachment.search(cr, uid, [('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)], context=context, count=True)
res[id] = project_attachments or 0 + task_attachments or 0
return res
def _task_count(self, cr, uid, ids, field_name, arg, context=None):
res = dict.fromkeys(ids, 0)
task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
@@ -189,7 +200,26 @@ class project(osv.osv):
def _get_alias_models(self, cr, uid, context=None):
"""Overriden in project_issue to offer more options"""
return [('project.task', "Tasks")]
def attachment_tree_view(self, cr, uid, ids, context):
task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
domain = [
('|',
'&', 'res_model', '=', 'project.project'), ('res_id', 'in', ids),
'&', ('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)
]
res_id = ids and ids[0] or False
return {
'name': _('Attachments'),
'domain': domain,
'res_model': 'ir.attachment',
'type': 'ir.actions.act_window',
'view_id': False,
'view_mode': 'tree,form',
'view_type': 'form',
'limit': 80,
'context': "{'default_res_model': '%s','default_res_id': %d}" % (self._name, res_id)
}
# Lambda indirection method to avoid passing a copy of the overridable method when declaring the field
_alias_models = lambda self, *args, **kwargs: self._get_alias_models(*args, **kwargs)
_columns = {
@@ -232,6 +262,7 @@ class project(osv.osv):
help="The kind of document created when an email is received on this project's email alias"),
'privacy_visibility': fields.selection([('public','Public'), ('followers','Followers Only')], 'Privacy / Visibility', required=True),
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'Status', required=True,),
'doc_count':fields.function(_get_attached_docs, string="Number of documents attached", type='int')
}
def _get_type_common(self, cr, uid, context):
@@ -728,11 +759,11 @@ class task(base_stage, osv.osv):
If the case needs to be reviewed then the status is \
set to \'Pending\'.'),
'categ_ids': fields.many2many('project.category', string='Tags'),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State',
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State',
help="A task's kanban state indicates special situations affecting it:\n"
" * Normal is the default situation\n"
" * Blocked indicates something is preventing the progress of this task\n"
" * Ready To Pull indicates the task is ready to be pulled to the next stage",
" * Ready for next stage indicates the task is ready to be pulled to the next stage",
readonly=True, required=False),
'create_date': fields.datetime('Create Date', readonly=True,select=True),
'date_start': fields.datetime('Starting Date',select=True),
@@ -792,6 +823,11 @@ class task(base_stage, osv.osv):
"""
return self.write(cr, uid, ids, {'priority' : priority})
def set_very_high_priority(self, cr, uid, ids, *args):
"""Set task priority to very high
"""
return self.set_priority(cr, uid, ids, '0')
def set_high_priority(self, cr, uid, ids, *args):
"""Set task priority to high
"""
@@ -1398,7 +1434,7 @@ class project_task_history(osv.osv):
'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select=True),
'type_id': fields.many2one('project.task.type', 'Stage'),
'state': fields.selection([('draft', 'New'), ('cancelled', 'Cancelled'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done')], 'Status'),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State', required=False),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State', required=False),
'date': fields.date('Date', select=True),
'end_date': fields.function(_get_date, string='End Date', type="date", store={
'project.task.history': (_get_related_date, None, 20)
+19 -11
View File
@@ -63,8 +63,8 @@
<field name="arch" type="xml">
<form string="Project" version="7.0">
<header>
<button name="set_done" string="Close Project" type="object" states="open,pending"/>
<button name="set_open" string="Re-open project" type="object" states="pending" class="oe_highlight"/>
<button name="set_done" string="Close Project" type="object" states="open,pending"/>
<button name="set_open" string="Re-open project" type="object" states="cancelled,close"/>
<button name="set_pending" string="Pending" type="object" states="open"/>
<button name="set_template" string="Set as Template" type="object" states="open"/>
@@ -88,7 +88,7 @@
<div class="oe_right oe_button_box" name="buttons">
<button name="%(act_project_project_2_project_task_all)d" string="Tasks"
type="action" attrs="{'invisible':[('use_tasks','=', 0)]}"/>
<button name="%(base.action_attachment)d" string="Documents" type="action"/>
<button name="attachment_tree_view" string="Documents" type="object"/>
</div>
<group>
<group>
@@ -223,6 +223,7 @@
<field name="task_count"/>
<field name="alias_id"/>
<field name="alias_domain"/>
<field name="doc_count"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_global_click">
@@ -238,7 +239,13 @@
<h4><field name="name"/></h4>
<div class="oe_kanban_project_list">
<a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px"> <field name="task_count"/> Tasks</a>
<a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px">
<span t-if="record.task_count.raw_value gt 1"><field name="task_count"/> Tasks</span>
<span t-if="record.task_count.raw_value lt 2"><field name="task_count"/> Task</span>
</a>
</div>
<div class="oe_kanban_project_list">
<a t-if="record.doc_count.raw_value" name="attachment_tree_view" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a>
</div>
<div class="oe_kanban_footer_left">
<span groups="project.group_time_work_estimation_tasks">
@@ -389,7 +396,7 @@
states="cancelled,done" context="{'button_reactivate':True}" groups="base.group_user"/>
<button name="action_close" string="Done" type="object"
states="draft,open,pending" groups="base.group_user"/>
<button name="do_cancel" string="Cancel" type="object"
<button name="do_cancel" string="Cancel Task" type="object"
states="draft,open,pending" groups="base.group_user"/>
<field name="stage_id" widget="statusbar" clickable="True"/>
</header>
@@ -403,12 +410,15 @@
<field name="project_id" on_change="onchange_project(project_id)" context="{'default_use_tasks':1}"/>
<field name="user_id" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}" options='{"no_open": True}'/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="planned_hours" widget="float_time"
groups="project.group_time_work_estimation_tasks"
on_change="onchange_planned(planned_hours, effective_hours)"/>
</group>
<group>
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
<field name="categ_ids" widget="many2many_tags"/>
<field name="progress" widget="progressbar"
groups="project.group_time_work_estimation_tasks"/>
groups="project.group_time_work_estimation_tasks" attrs="{'invisible':[('state','=','cancelled')]}"/>
</group>
</group>
<notebook>
@@ -458,9 +468,6 @@
<field name="priority" groups="base.group_user"/>
<field name="sequence"/>
<field name="partner_id"/>
<field name="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}"
groups="project.group_time_work_estimation_tasks"
on_change="onchange_planned(planned_hours, effective_hours)"/>
<field name="state" invisible="1"/>
</group>
</page>
@@ -525,10 +532,11 @@
</div>
<div class="oe_kanban_bottom_right">
<a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Stage Done" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready for next stage" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a>
<a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a>
<a t-if="record.priority.raw_value == 1" type="object" string="Priority" name="set_normal_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value != 1" type="object" string="Priority" name="set_high_priority" class="oe_e oe_star_off">7</a>
<a t-if="record.priority.raw_value == 2" type="object" string="Important" name="set_very_high_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value == 1 or record.priority.raw_value == 3 or record.priority.raw_value == 4" type="object" string="Normal" name="set_normal_priority" class="oe_e oe_star_off">7</a>
<a t-if="record.priority.raw_value == 0" type="object" string="Very Important" name="set_high_priority" class="oe_e oe_star_very_high_priority">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"/>
</div>
<div class="oe_kanban_footer_left">
+17 -1
View File
@@ -2,13 +2,29 @@
margin: 2px;
}
.openerp .oe_kanban_view .oe_kanban_content .oe_star_very_high_priority {
color: #cccccc;
text-shadow: 0 0 2px black;
vertical-align: top;
position: relative;
top: -5px;
}
.openerp .oe_kanban_view .oe_kanban_content .oe_star_very_high_priority:hover {
text-decoration: none;
}
.openerp .oe_kanban_view .oe_kanban_content .oe_star_very_high_priority {
color: red;
}
.oe_kanban_project {
width: 220px;
min-height: 160px;
}
.oe_kanban_project_list {
.oe_kanban_project_list > a > span:hover{
margin: 4px 0;
text-decoration: underline;
}
.openerp .oe_kanban_content h4 {
+11 -1
View File
@@ -57,6 +57,12 @@ openerp.project = function(openerp) {
} else if (self.dataset.model === 'project.task') {
self.project_display_categ_names();
}
},
on_record_moved: function(record, old_group, old_index, new_group, new_index){
var self = this;
this._super.apply(this, arguments);
if(new_group.state.folded)
new_group.do_action_toggle_fold();
}
});
@@ -67,6 +73,10 @@ openerp.project = function(openerp) {
} else {
this._super.apply(this, arguments);
}
}
},
bind_events: function() {
this._super();
this.view.project_display_categ_names();
},
});
};
+1 -1
View File
@@ -240,7 +240,7 @@ class project_issue(base_stage, osv.osv):
'date_closed': fields.datetime('Closed', readonly=True,select=True),
'date': fields.datetime('Date'),
'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),
'categ_ids': fields.many2many('project.category', string='Categories'),
'categ_ids': fields.many2many('project.category', string='Tags'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
'version_id': fields.many2one('project.issue.version', 'Version'),
'stage_id': fields.many2one ('project.task.type', 'Stage',
+4 -6
View File
@@ -125,15 +125,11 @@
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}" class="oe_inline"/>
</div>
<field name="categ_ids" widget="many2many_tags"/>
<field name="version_id"/>
</group>
</group>
<notebook>
<page string="Description">
<group>
<group>
<field name="version_id" widget="selection"/>
</group>
</group>
<field name="description" placeholder="Add a description..."/>
</page>
<page string="Extra Info" groups="base.group_no_one">
@@ -380,7 +376,9 @@
<xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
<a t-if="record.use_issues.raw_value" style="margin-right: 10px"
name="%(act_project_project_2_project_issue_all)d" type="action">
<field name="issue_count"/> Issues</a>
<span t-if="record.issue_count.raw_value gt 1"><field name="issue_count"/> Issues</span>
<span t-if="record.issue_count.raw_value lt 2"><field name="issue_count"/> Issue</span>
</a>
</xpath>
</field>
</record>
@@ -63,7 +63,6 @@
<filter string="Sale Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" />
<filter string="Project" name="project" icon="terp-folder-violet" context="{'group_by':'project_id'}" />
<filter string="Task" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'task_id'}"/>
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}" />
<filter string="Version" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'version_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
@@ -120,7 +120,10 @@
</field>
<xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
<a t-if="record.use_phases.raw_value"
name="%(act_project_phases)d" type="action">Phases(<field name="phase_count"/>)</a>
name="%(act_project_phases)d" type="action">
<span t-if="record.phase_count.raw_value gt 1">Phases(<field name="phase_count"/>)</span>
<span t-if="record.phase_count.raw_value lt 2">Phase(<field name="phase_count"/>)</span>
</a>
</xpath>
</field>
</record>
@@ -86,7 +86,7 @@ class project_work(osv.osv):
emp = emp_obj.browse(cr, uid, emp_id[0])
if not emp.product_id:
raise osv.except_osv(_('Bad Configuration !'),
_('Please define product on the related employee.\nFill in the timesheet tab of the employee form.'))
_('Please define product and product category property account on the related employee.\nFill in the HR Settings tab of the employee form.'))
if not emp.journal_id:
raise osv.except_osv(_('Bad Configuration !'),
@@ -86,11 +86,9 @@
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="view_id" ref="view_account_analytic_line_tree_inherit_account_id"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a work to invoice.
</p><p>
You will find here all works made on tasks that you can
invoice.
<p>
You will find here timesheets and purchases you did for contracts that can be reinvoiced to the customer.
If you want to record new jobs to invoice, you should use the timesheet menu instead.
</p>
</field>
</record>
+27 -9
View File
@@ -137,6 +137,17 @@ class purchase_order(osv.osv):
invoiced = True
res[purchase.id] = invoiced
return res
def _get_journal(self, cr, uid, context=None):
if context is None:
context = {}
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
company_id = context.get('company_id', user.company_id.id)
journal_obj = self.pool.get('account.journal')
res = journal_obj.search(cr, uid, [('type', '=', 'purchase'),
('company_id', '=', company_id)],
limit=1)
return res and res[0] or False
STATE_SELECTION = [
('draft', 'Draft PO'),
@@ -204,6 +215,7 @@ class purchase_order(osv.osv):
'product_id': fields.related('order_line','product_id', type='many2one', relation='product.product', string='Product'),
'create_uid': fields.many2one('res.users', 'Responsible'),
'company_id': fields.many2one('res.company','Company',required=True,select=1),
'journal_id': fields.many2one('account.journal', 'Journal'),
}
_defaults = {
'date_order': fields.date.context_today,
@@ -214,6 +226,7 @@ class purchase_order(osv.osv):
'invoiced': 0,
'pricelist_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').browse(cr, uid, context['partner_id']).property_product_pricelist_purchase.id,
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'purchase.order', context=c),
'journal_id': _get_journal,
}
_sql_constraints = [
('name_uniq', 'unique(name, company_id)', 'Order Reference must be unique per Company!'),
@@ -890,14 +903,16 @@ class purchase_order_line(osv.osv):
account_tax = self.pool.get('account.tax')
# - check for the presence of partner_id and pricelist_id
if not partner_id:
raise osv.except_osv(_('No Partner!'), _('Select a partner in purchase order to choose a product.'))
if not pricelist_id:
raise osv.except_osv(_('No Pricelist !'), _('Select a price list in the purchase order form before choosing a product.'))
#if not partner_id:
# raise osv.except_osv(_('No Partner!'), _('Select a partner in purchase order to choose a product.'))
#if not pricelist_id:
# raise osv.except_osv(_('No Pricelist !'), _('Select a price list in the purchase order form before choosing a product.'))
# - determine name and notes based on product in partner lang.
lang = res_partner.browse(cr, uid, partner_id).lang
context_partner = {'lang': lang, 'partner_id': partner_id}
context_partner = context.copy()
if partner_id:
lang = res_partner.browse(cr, uid, partner_id).lang
context_partner.update( {'lang': lang, 'partner_id': partner_id} )
product = product_product.browse(cr, uid, product_id, context=context_partner)
name = product.name
if product.description_purchase:
@@ -926,7 +941,7 @@ class purchase_order_line(osv.osv):
qty = qty or 1.0
supplierinfo = False
for supplier in product.seller_ids:
if supplier.name.id == partner_id:
if partner_id and (supplier.name.id == partner_id):
supplierinfo = supplier
if supplierinfo.product_uom.id != uom_id:
res['warning'] = {'title': _('Warning!'), 'message': _('The selected supplier only sells this product by %s') % supplierinfo.product_uom.name }
@@ -940,8 +955,11 @@ class purchase_order_line(osv.osv):
res['value'].update({'date_planned': date_planned or dt, 'product_qty': qty})
# - determine price_unit and taxes_id
price = product_pricelist.price_get(cr, uid, [pricelist_id],
product.id, qty or 1.0, partner_id, {'uom': uom_id, 'date': date_order})[pricelist_id]
if pricelist_id:
price = product_pricelist.price_get(cr, uid, [pricelist_id],
product.id, qty or 1.0, partner_id or False, {'uom': uom_id, 'date': date_order})[pricelist_id]
else:
price = product.standard_price
taxes = account_tax.browse(cr, uid, map(lambda x: x.id, product.supplier_taxes_id))
fpos = fiscal_position_id and account_fiscal_position.browse(cr, uid, fiscal_position_id, context=context) or False
+4 -3
View File
@@ -226,6 +226,7 @@
<field name="partner_ref"/>
<field domain="[('type','=','purchase')]" name="pricelist_id" groups="product.group_purchase_pricelist" on_change="onchange_pricelist(pricelist_id, context)"/>
<field name="currency_id" invisible='1'/>
<field name="journal_id" invisible='1'/>
</group>
<group>
<field name="date_order"/>
@@ -451,7 +452,7 @@
<field name="name">purchase.order.line.tree</field>
<field name="model">purchase.order.line</field>
<field name="arch" type="xml">
<tree string="Purchase Order Lines">
<tree string="Purchase Order Lines" create="false">
<field name="order_id"/>
<field name="name"/>
<field name="partner_id" string="Supplier" />
@@ -471,11 +472,11 @@
<field name="model">purchase.order.line</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<form string="Purchase Order Line" version="7.0">
<form string="Purchase Order Line" version="7.0" create="false">
<sheet>
<label for="order_id" class="oe_edit_only"/>
<h1>
<field name="order_id" class="oe_inline"/>
<field name="order_id" class="oe_inline" domain="[('invoice_method','=','manual')]" />
<label string="," attrs="{'invisible':[('date_order','=',False)]}"/>
<field name="date_order" class="oe_inline"/>
</h1>
+2 -2
View File
@@ -18,7 +18,7 @@
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date']" position="before">
<field name="purchase_id"/>
<field name="purchase_id" domain="[('invoice_method','=','picking')]" context="{'search_default_partner_id':partner_id,'default_partner_id':partner_id, 'default_invoice_method':'picking'}"/>
</xpath>
<xpath expr="//field[@name='company_id']" position="after">
<field name="warehouse_id" groups="stock.group_locations"/>
@@ -59,7 +59,7 @@
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="domain">[('type','=','in')]</field>
<field name="domain">[('type','=','in'),('purchase_id.invoice_method','=','picking')]</field>
<field name="context">{"default_type": "in", "contact_display": "partner_address", "search_default_done": 1, "search_default_to_invoice": 1}</field>
<field name="search_view_id" ref="stock.view_picking_in_search"/>
<field name="help" type="html">
@@ -8,7 +8,7 @@
<field name="inherit_id" ref="purchase.purchase_order_line_form"/>
<field name="arch" type="xml">
<field name="account_analytic_id" position="replace">
<field name="analytics_id" domain="[('plan_id','&lt;&gt;',False)]"/>
<field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','&lt;&gt;',False)]"/>
</field>
</field>
</record>
@@ -19,7 +19,7 @@
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<field name="account_analytic_id" position="replace">
<field name="analytics_id" domain="[('plan_id','&lt;&gt;',False)]"/>
<field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','&lt;&gt;',False)]"/>
</field>
</field>
</record>
+2 -1
View File
@@ -36,7 +36,8 @@ It handles the full sales workflow:
* **Quotation** -> **Sales order** -> **Invoice**
Preferences (only with Warehouse Management installed)
-----------
------------------------------------------------------
If you also installed the Warehouse Management, you can deal with the following preferences:
* Shipping: Choice of delivery at once or partial delivery
+1
View File
@@ -948,6 +948,7 @@ class sale_order_line(osv.osv):
elif uom: # whether uos is set or not
default_uom = product_obj.uom_id and product_obj.uom_id.id
q = product_uom_obj._compute_qty(cr, uid, uom, qty, default_uom)
result['product_uom'] = default_uom
if product_obj.uos_id:
result['product_uos'] = product_obj.uos_id.id
result['product_uos_qty'] = qty * product_obj.uos_coeff
+18 -18
View File
@@ -7,21 +7,21 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-09-20 07:32+0000\n"
"PO-Revision-Date: 2012-10-25 17:47+0000\n"
"Last-Translator: ccdos <Unknown>\n"
"PO-Revision-Date: 2012-10-30 16:29+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:36+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-10-31 04:41+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: sale_stock
#: help:sale.config.settings,group_invoice_deli_orders:0
msgid ""
"To allow your salesman to make invoices for Delivery Orders using the menu "
"'Deliveries to Invoice'."
msgstr ""
msgstr "允许销售员 使用菜单“按已交付数量开票” 根据发运单开发票"
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:496
@@ -77,7 +77,7 @@ msgstr "调拨出去或调拨给客户的单据"
#. module: sale_stock
#: field:sale.config.settings,group_multiple_shops:0
msgid "Manage multiple shops"
msgstr ""
msgstr "管理多个商店"
#. module: sale_stock
#: model:process.transition.action,name:sale_stock.process_transition_action_validate0
@@ -280,7 +280,7 @@ msgstr "默认选项"
#. module: sale_stock
#: field:sale.config.settings,module_project_mrp:0
msgid "Project MRP"
msgstr ""
msgstr "项目MRP"
#. module: sale_stock
#: help:sale.order.line,type:0
@@ -314,7 +314,7 @@ msgstr "已送货"
msgid ""
"To allow your salesman to make invoices for sale order lines using the menu "
"'Lines to Invoice'."
msgstr ""
msgstr "允许销售员 使用菜单“逐行开票” 根据销售单明细逐行开发票"
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:260
@@ -350,7 +350,7 @@ msgstr "允许追加运输成本"
#. module: sale_stock
#: view:sale.order:0
msgid "days"
msgstr ""
msgstr "天数"
#. module: sale_stock
#: field:sale.order.line,product_packaging:0
@@ -371,7 +371,7 @@ msgstr "允许开发运单"
#: code:addons/sale_stock/sale_stock.py:689
#, python-format
msgid "Advance of %s %%"
msgstr ""
msgstr "%s %% 的预付款"
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:601
@@ -465,7 +465,7 @@ msgstr "编号必须在公司内唯一!"
#: code:addons/sale_stock/sale_stock.py:698
#, python-format
msgid "Advance of %s %s"
msgstr ""
msgstr "%s %s 的预付款"
#. module: sale_stock
#: model:process.node,note:sale_stock.process_node_saleprocurement0
@@ -559,7 +559,7 @@ msgstr "生成发票"
#. module: sale_stock
#: help:sale.config.settings,group_mrp_properties:0
msgid "Allows you to tag sale order lines with properties."
msgstr ""
msgstr "允许你用 属性 来标记销售订单 明细"
#. module: sale_stock
#: field:sale.config.settings,task_work:0
@@ -591,13 +591,13 @@ msgstr "贸易术语"
#. module: sale_stock
#: constraint:stock.move:0
msgid "You try to assign a lot which is not from the same product."
msgstr ""
msgstr "您企图为不一样的产品创建批号"
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:659
#, python-format
msgid "Cannot cancel sales order line!"
msgstr ""
msgstr "不能取消销售订单明细"
#. module: sale_stock
#: view:sale.order:0
@@ -637,14 +637,14 @@ msgstr "公司名必须唯一!"
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_sale_config_settings
msgid "sale.config.settings"
msgstr ""
msgstr "sale.config.settings"
#. module: sale_stock
#: help:sale.order,picking_ids:0
msgid ""
"This is a list of delivery orders that has been generated for this sales "
"order."
msgstr ""
msgstr "这是一个销售订单生产的发运单列表"
#. module: sale_stock
#: model:process.node,name:sale_stock.process_node_saleorderprocurement0
@@ -674,12 +674,12 @@ msgstr ""
#. module: sale_stock
#: view:sale.order:0
msgid "Recreate Delivery Order"
msgstr ""
msgstr "重建发运单"
#. module: sale_stock
#: help:sale.config.settings,group_multiple_shops:0
msgid "This allows to configure and use multiple shops."
msgstr ""
msgstr "允许配置和使用多个商店"
#. module: sale_stock
#: field:sale.order,picked_rate:0
+1 -1
View File
@@ -373,7 +373,7 @@ class product_product(osv.osv):
"typed as 'internal'."),
'virtual_available': fields.function(_product_available, multi='qty_available',
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
string='Future Quantity',
string='Forecasted Quantity',
help="Forecast quantity (computed as Quantity On Hand "
"- Outgoing + Incoming)\n"
"In a context with a single Stock Location, this includes "
+1 -1
View File
@@ -219,7 +219,7 @@
</xpath>
<ul position="inside">
<li t-if="record.type.raw_value != 'service'">On hand: <field name="qty_available"/> <field name="uom_id"/></li>
<li t-if="record.type.raw_value != 'service'">Available: <field name="virtual_available"/> <field name="uom_id"/></li>
<li t-if="record.type.raw_value != 'service'">Forecasted: <field name="virtual_available"/> <field name="uom_id"/></li>
</ul>
</field>
</record>
+1 -1
View File
@@ -629,7 +629,7 @@ class stock_picking(osv.osv):
'name': fields.char('Reference', size=64, select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'origin': fields.char('Source Document', size=64, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Reference of the document", select=True),
'backorder_id': fields.many2one('stock.picking', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, readonly=True, help="Shipping type specify, goods coming in or going out."),
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
'note': fields.text('Notes', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'stock_journal_id': fields.many2one('stock.journal','Stock Journal', select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'location_id': fields.many2one('stock.location', 'Location', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Keep empty if you produce at the location where the finished products are needed." \
+5 -5
View File
@@ -540,7 +540,7 @@
</group>
<group string="Chained Locations">
<field name="chained_location_type"/>
<field name="chained_location_id" attrs="{'required':[('chained_location_type','=','fixed')]}"/>
<field name="chained_location_id" attrs="{'required':[('chained_location_type','=','fixed')],'invisible':[('chained_location_type','in',['none','customer'])]}"/>
<field name="chained_auto_packing"/>
<field name="chained_delay"/>
<field name="chained_journal_id"/>
@@ -551,9 +551,9 @@
<field name="posx"/>
<field name="posy"/>
<field name="posz"/>
</group><group string="Accounting Information">
<field name="valuation_in_account_id" attrs="{'readonly':[('usage','not in',('inventory','production'))]}"/>
<field name="valuation_out_account_id" attrs="{'readonly':[('usage','not in',('inventory','production'))]}"/>
</group><group string="Accounting Information" attrs="{'invisible':[('usage','not in',('inventory','production'))]}">
<field name="valuation_in_account_id"/>
<field name="valuation_out_account_id"/>
</group>
</group>
<separator string="Additional Information"/>
@@ -782,7 +782,7 @@
<group>
<group>
<field name="move_type"/>
<field name="type" groups="base.group_no_one"/>
<field name="type" invisible="1"/>
<field name="auto_picking" groups="base.group_user"/>
</group>
<group>
@@ -6,7 +6,7 @@
<field name="model">stock.fill.inventory</field>
<field name="arch" type="xml">
<form string="Import Inventory" version="7.0">
<separator string="Import current product inventory from the following location"/>
<separator string="Import the current inventory"/>
<group>
<field name="location_id" groups="stock.group_locations"/>
<field name="recursive" groups="stock.group_locations"/>
@@ -52,7 +52,6 @@ class action_traceability(osv.osv_memory):
value = {
'domain': "[('id','in',["+','.join(map(str, ids))+"])]",
'name': ((type1=='move_history_ids2') and _('Upstream Traceability')) or _('Downstream Traceability'),
'view_type': 'tree',
'view_mode': 'tree',
'res_model': 'stock.move',
'field_parent': type1,
+5 -5
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:37+0000\n"
"PO-Revision-Date: 2011-01-12 19:03+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2012-10-30 22:46+0000\n"
"Last-Translator: Nicola Riolini - Micronaet <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:20+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-01 04:36+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: stock_location
#: selection:product.pulled.flow,picking_type:0
@@ -164,7 +164,7 @@ msgstr "Azienda"
#. module: stock_location
#: view:product.product:0
msgid "Logistics Flows"
msgstr ""
msgstr "Flussi logistici"
#. module: stock_location
#: help:stock.move,cancel_cascade:0
-26
View File
@@ -1,26 +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/>.
#
##############################################################################
import stock_planning
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-248
View File
@@ -1,248 +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/>.
#
##############################################################################
{
'name': 'Master Procurement Schedule',
'version': '1.2',
'author': 'OpenERP SA and Grzegorz Grzelak (OpenGLOBE)',
'category' : 'Manufacturing',
'images': ['images/master_procurement_schedule.jpeg','images/sales_forecast.jpeg','images/stock_planning_line.jpeg','images/stock_sales_period.jpeg'],
'depends': ['crm', 'stock','sale'],
'description': """
MPS allows to create a manual procurement plan apart of the normal MRP scheduling, which works automatically based on minimum stock rules.
==========================================================================================================================================
Quick Glossary:
---------------
- Stock Period - the time boundaries (between Start Date and End Date) for
your Sales and Stock forecasts and planning
- Sales Forecast - the quantity of products you plan to sell during the
related Stock Period.
- Stock Planning - the quantity of products you plan to purchase or produce
for the related Stock Period.
To avoid confusion with the terms used by the ``sale_forecast`` module,
('Sales Forecast' and 'Planning' are amounts) we use terms 'Stock and Sales
Forecast' and 'Stock Planning' to emphasize that we use quantity values.
Where to begin:
---------------
Using this module is done in three steps:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Create Stock Periods via the **Warehouse** > **Configuration** > **Stock Periods** menu
(Mandatory step)
* Create Sale Forecasts fill them with forecast quantities, via the
**Sales** > **Sales Forecast** menu. (Optional step but useful for further planning)
* Create the actual MPS plan, check the balance and trigger the procurements
as required. The actual procurement is the final step for the Stock Period.
Stock Period configuration:
---------------------------
You have two menu items for Periods in "**Warehouse** > **Configuration** > **Stock Periods**".
There are:
~~~~~~~~~~
* "Create Stock Periods" - can automatically creating daily, weekly or
monthly periods.
* 'Stock Periods' - allows to create any type of periods, change the dates
and change the state of period.
Creating periods is the first step. You can create custom periods using the 'New'
button in 'Stock Periods', but it is recommended to use the automatic assistant
'Create Stock Periods'.
Remarks:
++++++++
- These periods (Stock Periods) are completely distinct from Financial or
other periods in the system.
- Periods are not assigned to companies (when you use multicompany). Module
suppose that you use the same periods across companies. If you wish to use
different periods for different companies define them as you wish (they can
overlap). Later on in this text will be indications how to use such periods.
- When periods are created automatically their start and finish dates are with
start hour 00:00:00 and end hour 23:59:00. When you create daily periods they
will have start date 31.01.2010 00:00:00 and end date 31.01.2010 23:59:00.
It works only in automatic creation of periods. When you create periods
manually you have to take care about hours because you can have incorrect
values form sales or stock.
- If you use overlapping periods for the same product, warehouse and company
results can be unpredictable.
- If current date doesn't belong to any period or you have holes between
periods results can be unpredictable.
Sales Forecasts configuration:
------------------------------
You have few menus for Sales forecast in "**Sales** > **Sales Forecasts**":
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- "Create Sales Forecasts" - can automatically create forecast lines
according to your needs
- 'Sales Forecasts' - for managing the Sales forecasts
Menu 'Create Sales Forecasts' creates Forecasts for products from selected
Category, for selected Period and for selected Warehouse.
It is also possible to copy the previous forecast.
Remarks:
++++++++
- This tool doesn't duplicate lines if you already have an entry for the same
Product, Period, Warehouse, created or validated by the same user. If you
wish to create another forecast, if relevant lines exists you have to do it
manually as described below.
- When created lines are validated by someone else you can use this tool to
create another line for the same Period, Product and Warehouse.
- When you choose 'Copy Last Forecast', created line take quantity and other
settings from your (validated by you or created by you if not validated yet)
forecast which is for last period before period of created forecast.
On 'Sales Forecast' form mainly you have to enter a forecast quantity in
'Product Quantity'. Further calculation can work for draft forecasts. But
validation can save your data against any accidental changes. You can click
'Validate' button but it is not mandatory.
Instead of forecast quantity you may enter the amount of forecast sales via the
'Product Amount' field. The system will count quantity from amount according to
Sale price of the Product.
All values on the form are expressed in unit of measure selected on form. You can
select a unit of measure from the default category or from secondary category.
When you change unit of measure the forecast product quantity will be re-computed
according to new UoM.
To work out your Sale Forecast you can use the 'Sales History' of the product.
You have to enter parameters to the top and left of this table and system will
count sale quantities according to these parameters. So you can get results for
a given sales team or period.
MPS or Procurement Planning:
----------------------------
An MPS planning consists in Stock Planning lines, used to analyze and possibly
drive the procurement of products for each relevant Stock Period and Warehouse.
The menu is located in "**Warehouse** > **Schedulers** > **Master Procurement Schedule**":
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- "Create Stock Planning Lines" - a wizard to help automatically create many
planning lines
- 'Master Procurement Schedule' - management of your planning lines
Similarly to the way Sales forecast serves to define your sales planning, the MPS
lets you plan your procurements (Purchase/Manufacturing).You can quickly populate
the MPS with the 'Create Stock Planning Lines' wizard, and then proceed to review
them via the 'Master Procurement Schedule' menu.
The 'Create Stock Planning Lines' wizard lets you to quickly create all MPS lines
for a given Product Category, and a given Period and Warehouse.When you enable
the 'All Products with Forecast' option of the wizard, the system creates lines
for all products having sales forecast for selected Period and Warehouse (the
selected Category will be ignored in this case).
Under menu 'Master Procurement Schedule' you will usually change the 'Planned Out'
and 'Planned In' quantities and observe the resulting 'Stock Simulation' value
to decide if you need to procure more products for the given Period. 'Planned Out'
will be initially based on 'Warehouse Forecast' which is the sum of all outgoing
stock moves already planned for the Period and Warehouse. Of course you can alter
this value to provide your own quantities. It is not necessary to have any forecast.
'Planned In' quantity is used to calculate field 'Incoming Left' which is the
quantity to be procured to reach the 'Stock Simulation' at the end of Period. You
can compare 'Stock Simulation' quantity to minimum stock rules visible on the form.
And you can plan different quantity than in Minimum Stock Rules. Calculations are
done for whole Warehouse by default, if you want to see values for Stock location
of calculated warehouse you can check 'Stock Location Only'.
When you are satisfied with the 'Planned Out', 'Planned In' and end of period
'Stock Simulation', you can click on 'Procure Incoming Left' to create a
procurement for the 'Incoming Left' quantity. You can decide if procurement will
go to the to Stock or Input location of the Warehouse.
If you don't want to Produce or Buy the product but just transfer the calculated
quantity from another warehouse you can click 'Supply from Another Warehouse'
(instead of 'Procure Incoming Left') and the system will create the appropriate
picking list (stock moves). You can choose to take the goods from the Stock or
the Output location of the source warehouse. Destination location (Stock or Input)
in the destination warehouse will be taken as for the procurement case.
To see update the quantities of 'Confirmed In', 'Confirmed Out', 'Confirmed In
Before', 'Planned Out Before' and 'Stock Simulation' you can press 'Calculate
Planning'.
All values on the form are expressed in unit of measure selected on form. You can
select one of unit of measure from default category or from secondary category.
When you change unit of measure the editable quantities will be re-computed
according to new UoM. The others will be updated after pressing 'Calculate Planning'.
Computation of Stock Simulation quantities:
-------------------------------------------
The Stock Simulation value is the estimated stock quantity at the end of the
period. The calculation always starts with the real stock on hand at the beginning
of the current period, then adds or subtracts the computed quantities.
When you are in the same period (current period is the same as calculated) Stock Simulation is calculated as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Stock Simulation =** Stock of beginning of current Period - Planned Out + Planned In
When you calculate period next to current:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Stock Simulation =** Stock of beginning of current Period - Planned Out of current Period + Confirmed In of current Period (incl. Already In) - Planned Out of calculated Period + Planned In of calculated Period .
As you see the calculated Period is taken the same way as in previous case, but
the calculation in the current Period is a little bit different. First you should
note that system takes for only Confirmed moves for the current period. This means
that you should complete the planning and procurement of the current Period before
going to the next one.
When you plan for future Periods:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Stock Simulation =** Stock of beginning of current Period - Sum of Planned Out of Periods before calculated + Sum of Confirmed In of Periods before calculated (incl. Already In) - Planned Out of calculated Period + Planned In of calculated Period.
Here 'Periods before calculated' designates all periods starting with the current
until the period before the one being calculated.
Remarks:
++++++++
- Remember to make the proceed with the planning of each period in chronological
order, otherwise the numbers will not reflect the reality
- If you planned for future periods and find that real Confirmed Out is larger
than Planned Out in some periods before, you can repeat Planning and make
another procurement. You should do it in the same planning line. If you
create another planning line the suggestions can be wrong.
- When you wish to work with different periods for some products, define two
kinds of periods (e.g. Weekly and Monthly) and use them for different
products. Example: If you use always Weekly periods for Product A, and
Monthly periods for Product B all calculations will work correctly. You
can also use different kind of periods for the same product from different
warehouse or companies. But you cannot use overlapping periods for the same
product, warehouse and company because results can be unpredictable. The
same applies to Forecasts lines.
""",
'data': [
'security/stock_planning_security.xml',
'security/ir.model.access.csv',
'stock_planning_view.xml',
'wizard/stock_planning_create_periods_view.xml',
'wizard/stock_planning_forecast_view.xml',
'wizard/stock_planning_createlines_view.xml',
],
'test': ['test/stock_planning.yml'],
'auto_install': False,
'installable': True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff

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