[merge]
bzr revid: rvalyi@gmail.com-20100722214132-ug6xh87qev2ahztt bzr revid: rvalyi@gmail.com-20100723095853-eeoteijy8rfmouwb bzr revid: rvalyi@gmail.com-20100723123842-qjcd3pprhbjqg0gu
This commit is contained in:
@@ -656,9 +656,18 @@ class account_journal(osv.osv):
|
||||
@param context: context arguments, like lang, time zone
|
||||
@return: return a result
|
||||
"""
|
||||
|
||||
journal_type = ('sale', 'sale_refund', 'purchase', 'purchase_refund')
|
||||
journal_seq = {
|
||||
'sale':'seq_out_invoice',
|
||||
'purchase':'seq_in_invoice',
|
||||
'purchase_refund':'seq_out_refund',
|
||||
'sale_refund':'seq_in_refund'
|
||||
}
|
||||
|
||||
seq_pool = self.pool.get('ir.sequence')
|
||||
seq_typ_pool = self.pool.get('ir.sequence.type')
|
||||
date_pool = self.pool.get('ir.model.data')
|
||||
|
||||
result = True
|
||||
|
||||
@@ -685,10 +694,13 @@ class account_journal(osv.osv):
|
||||
res.update({
|
||||
'sequence_id':seq_id
|
||||
})
|
||||
|
||||
if not journal.invoice_sequence_id:
|
||||
|
||||
if journal.type in journal_type and not journal.invoice_sequence_id:
|
||||
res_ids = date_pool.search(cr, uid, [('model','=','ir.sequence'), ('name','=',journal_seq.get(journal.type, 'sale'))])
|
||||
inv_seq_id = date_pool.browse(cr, uid, res_ids[0]).res_id
|
||||
inv_seq_id
|
||||
res.update({
|
||||
'invoice_sequence_id':seq_id
|
||||
'invoice_sequence_id':inv_seq_id
|
||||
})
|
||||
|
||||
result = self.write(cr, uid, [journal.id], res)
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
|
||||
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_generic_report" name="Management Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13"/>
|
||||
@@ -34,7 +33,6 @@
|
||||
<!-- <menuitem id="menu_finance_reporting11" name="Reporting" parent="account.menu_finance" sequence="80"/>-->
|
||||
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/>
|
||||
<!-- <menuitem id="menu_finance_legal_statement1" name="Legal Statements" parent="account.menu_finance_reporting" sequence="200"/>-->
|
||||
<!-- <menuitem id="menu_generic_report" name="Generic Reports" parent="account.menu_finance_legal_statement" sequence="8"/>-->
|
||||
|
||||
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
|
||||
groups="group_account_user"/>
|
||||
@@ -46,6 +44,17 @@
|
||||
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing"/>
|
||||
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300"/>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="final_accounting_reports"
|
||||
name="Accounting Reports"/>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="menu_journals_report"
|
||||
name="Journals"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -385,18 +385,18 @@
|
||||
Product income and expense accounts, default parameters
|
||||
-->
|
||||
|
||||
<record id="property_account_expense_prd" model="ir.property">
|
||||
<field name="name">property_account_expense</field>
|
||||
<field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_expense')]"/>
|
||||
<field eval="'account.account,'+str(ref('account.a_expense'))" name="value"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
</record>
|
||||
<record id="property_account_income_prd" model="ir.property">
|
||||
<field name="name">property_account_income</field>
|
||||
<field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_income')]"/>
|
||||
<field eval="'account.account,'+str(ref('account.a_sale'))" name="value"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
</record>
|
||||
<!-- <record id="property_account_expense_prd" model="ir.property">-->
|
||||
<!-- <field name="name">property_account_expense</field>-->
|
||||
<!-- <field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_expense')]"/>-->
|
||||
<!-- <field eval="'account.account,'+str(ref('account.a_expense'))" name="value"/>-->
|
||||
<!-- <field name="company_id" ref="base.main_company"/>-->
|
||||
<!-- </record>-->
|
||||
<!-- <record id="property_account_income_prd" model="ir.property">-->
|
||||
<!-- <field name="name">property_account_income</field>-->
|
||||
<!-- <field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_income')]"/>-->
|
||||
<!-- <field eval="'account.account,'+str(ref('account.a_sale'))" name="value"/>-->
|
||||
<!-- <field name="company_id" ref="base.main_company"/>-->
|
||||
<!-- </record>-->
|
||||
<record id="property_account_expense_categ" model="ir.property">
|
||||
<field name="name">property_account_expense_categ</field>
|
||||
<field name="fields_id" search="[('model','=','product.category'),('name','=','property_account_expense_categ')]"/>
|
||||
|
||||
+556
-261
File diff suppressed because it is too large
Load Diff
+465
-406
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-23 04:08+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -215,7 +215,7 @@ msgstr "明细"
|
||||
#. module: account
|
||||
#: wizard_view:account.aged.trial.balance,init:0
|
||||
msgid "Aged Trial Balance"
|
||||
msgstr "账龄试算平衡表"
|
||||
msgstr "旧的试算表"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_finance_recurrent_entries
|
||||
@@ -239,7 +239,7 @@ msgstr "金额"
|
||||
#: model:ir.actions.wizard,name:account.wizard_third_party_ledger
|
||||
#: model:ir.ui.menu,name:account.menu_third_party_ledger
|
||||
msgid "Partner Ledger"
|
||||
msgstr "业务伙伴总帐"
|
||||
msgstr "业务伙伴分类账"
|
||||
|
||||
#. module: account
|
||||
#: field:product.template,supplier_taxes_id:0
|
||||
@@ -460,7 +460,7 @@ msgstr "从草稿确认, 与对/ 不对账"
|
||||
#: model:ir.actions.wizard,name:account.action_account_bank_reconcile_tree
|
||||
#: model:ir.ui.menu,name:account.menu_action_account_bank_reconcile_check_tree
|
||||
msgid "Bank reconciliation"
|
||||
msgstr "银行对账"
|
||||
msgstr "银行对帐单"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.invoice:0
|
||||
@@ -680,7 +680,7 @@ msgstr "月"
|
||||
#. module: account
|
||||
#: field:account.analytic.account,partner_id:0
|
||||
msgid "Associated Partner"
|
||||
msgstr "相关业务伙伴"
|
||||
msgstr "相关的业务伙伴"
|
||||
|
||||
#. module: account
|
||||
#: view:account.invoice:0
|
||||
@@ -795,7 +795,7 @@ msgstr "之前生成的记录:"
|
||||
#: model:ir.actions.report.xml,name:account.account_analytic_account_cost_ledger
|
||||
#: model:ir.actions.wizard,name:account.account_analytic_account_cost_ledger_report
|
||||
msgid "Cost Ledger"
|
||||
msgstr "成本分类帐"
|
||||
msgstr "成本分类账"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.account.balance.report,checktype:0
|
||||
@@ -888,7 +888,7 @@ msgstr "补差额集合"
|
||||
#: field:account.model.line,amount_currency:0
|
||||
#: field:account.move.line,amount_currency:0
|
||||
msgid "Amount Currency"
|
||||
msgstr "货币金额"
|
||||
msgstr "另一货币金额"
|
||||
|
||||
#. module: account
|
||||
#: field:account.chart.template,property_account_expense_categ:0
|
||||
@@ -1897,7 +1897,7 @@ msgstr "支付发票"
|
||||
#. module: account
|
||||
#: constraint:account.invoice:0
|
||||
msgid "Error: Invalid Bvr Number (wrong checksum)."
|
||||
msgstr "错误:无效的Bvr号(错误的检验和)"
|
||||
msgstr "错误:无效的Bvr号(校验错误)"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree5
|
||||
@@ -4212,7 +4212,7 @@ msgstr "这序列提供记录集合列表的显示顺序"
|
||||
#. module: account
|
||||
#: field:account.journal,type_control_ids:0
|
||||
msgid "Type Controls"
|
||||
msgstr "类型控制"
|
||||
msgstr "控制类型"
|
||||
|
||||
#. module: account
|
||||
#: field:account.analytic.account,name:0
|
||||
@@ -5182,7 +5182,7 @@ msgstr "从手动转为草稿"
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.next_id_43
|
||||
msgid "This Month"
|
||||
msgstr "本月"
|
||||
msgstr "这月"
|
||||
|
||||
#. module: account
|
||||
#: field:account.account.type,sign:0
|
||||
@@ -5209,7 +5209,7 @@ msgstr "在确认对帐单产生的会计分录"
|
||||
#. module: account
|
||||
#: wizard_view:account_use_models,create:0
|
||||
msgid "Use Model"
|
||||
msgstr "使用模型"
|
||||
msgstr "使用模式"
|
||||
|
||||
#. module: account
|
||||
#: wizard_button:account.wizard_paid_open,init,end:0
|
||||
|
||||
@@ -33,8 +33,9 @@ class account_installer(osv.osv_memory):
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
def _get_default_accounts(self, cr, uid, context=None):
|
||||
accounts = [{'acc_name':'Current','account_type':'cash'},
|
||||
{'acc_name':'Deposit','account_type':'cash'}]
|
||||
accounts = [{'acc_name':'Current','account_type':'bank'},
|
||||
{'acc_name':'Deposit','account_type':'bank'},
|
||||
{'acc_name':'Cash','account_type':'cash'}]
|
||||
return accounts
|
||||
|
||||
def _get_charts(self, cr, uid, context=None):
|
||||
|
||||
@@ -7,41 +7,41 @@
|
||||
<field name="model">account.balance.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select period">
|
||||
<group width="650" height="200">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="display_account" required = "True"/>
|
||||
<newline/>
|
||||
<field name="fiscalyear"/>
|
||||
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
|
||||
<newline/>
|
||||
<separator string="Filters" colspan="4"/>
|
||||
<field name="state" required="True"/>
|
||||
<newline/>
|
||||
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
|
||||
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
|
||||
<separator string="Date Filter" colspan="4"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
|
||||
<separator string="Filter on Periods" colspan="4"/>
|
||||
<field name="periods" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Select period">
|
||||
<group width="650" height="200">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="display_account" required = "True"/>
|
||||
<newline/>
|
||||
<field name="fiscalyear"/>
|
||||
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
|
||||
<newline/>
|
||||
<separator string="Filters" colspan="4"/>
|
||||
<field name="state" required="True"/>
|
||||
<newline/>
|
||||
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
|
||||
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
|
||||
<separator string="Date Filter" colspan="4"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
|
||||
<separator string="Filter on Periods" colspan="4"/>
|
||||
<field name="periods" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_account_balance_report" model="ir.actions.act_window">
|
||||
<record id="action_account_balance_report" model="ir.actions.act_window">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="res_model">account.balance.report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -51,7 +51,7 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="action_account_balance_report_values">
|
||||
<record model="ir.values" id="action_account_balance_report_values">
|
||||
<field name="model_id" ref="account.model_account_account" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Account Balance</field>
|
||||
@@ -59,19 +59,19 @@
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_balance_report'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.account</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="account_balance_report_account_view" model="ir.ui.view">
|
||||
<record id="account_balance_report_account_view" model="ir.ui.view">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="model">account.balance.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Chart">
|
||||
<field name="Account_list"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
|
||||
</form>
|
||||
<form string="Select Chart">
|
||||
<field name="Account_list"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
name="Account Balance"
|
||||
action="action_account_balance_account_report"
|
||||
id="menu_account_balance_report"
|
||||
parent="account.menu_generic_report"/>
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
name="Account Balance"
|
||||
action="action_account_balance_account_report"
|
||||
id="menu_account_balance_report"
|
||||
parent="account.final_accounting_reports"/>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_central_journal" model="ir.ui.view">
|
||||
<record id="view_account_central_journal" model="ir.ui.view">
|
||||
<field name="name">Account central Journal</field>
|
||||
<field name="model">account.central.journal</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print Central Journal">
|
||||
<group height="370" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Print Central Journal">
|
||||
<group height="370" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Central Journals"
|
||||
parent="account.menu_generic_report"
|
||||
action="action_account_central_journal"
|
||||
id="menu_account_central_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
<menuitem
|
||||
name="Central Journals"
|
||||
parent="account.menu_journals_report"
|
||||
action="action_account_central_journal"
|
||||
id="menu_account_central_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_general_journal" model="ir.ui.view">
|
||||
<record id="view_account_general_journal" model="ir.ui.view">
|
||||
<field name="name">Account Genral Journal</field>
|
||||
<field name="model">account.general.journal</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print General Journal">
|
||||
<group height="380" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Print General Journal">
|
||||
<group height="380" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="General Journals"
|
||||
parent="account.menu_generic_report"
|
||||
action="action_account_general_journal"
|
||||
id="menu_account_general_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
<menuitem
|
||||
name="General Journals"
|
||||
parent="account.menu_journals_report"
|
||||
action="action_account_general_journal"
|
||||
id="menu_account_general_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<menuitem
|
||||
icon="STOCK_PRINT"
|
||||
name="General Ledger"
|
||||
parent="account.menu_generic_report"
|
||||
parent="account.final_accounting_reports"
|
||||
action="action_account_general_ledger_menu"
|
||||
id="menu_general_ledger"
|
||||
/>
|
||||
|
||||
@@ -76,11 +76,6 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="final_accounting_reports"
|
||||
name="Accounting Reports"/>
|
||||
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
name="Profit And Loss"
|
||||
action="action_pl_balance_account_report"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
<menuitem
|
||||
name="Journals"
|
||||
parent="account.menu_generic_report"
|
||||
parent="account.menu_journals_report"
|
||||
action="action_account_print_journal"
|
||||
id="menu_account_print_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
|
||||
@@ -234,22 +234,29 @@ def _coda_parsing(self, cr, uid, data, context):
|
||||
if rec_id:
|
||||
reconcile_id = pool.get('account.bank.statement.reconcile').create(cr, uid, {
|
||||
'line_ids': [(6, 0, rec_id)]
|
||||
}, context=context)
|
||||
}, context=context)
|
||||
mv = pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context)
|
||||
if mv.partner_id:
|
||||
line['partner_id'] = mv.partner_id.id
|
||||
if line['amount'] < 0 :
|
||||
line['account_id'] = mv.partner_id.property_account_payable.id
|
||||
else :
|
||||
line['account_id'] = mv.partner_id.property_account_receivable.id
|
||||
str_not1 = ''
|
||||
if line.has_key('contry_name') and line.has_key('cntry_number'):
|
||||
str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"],line["cntry_number"],line["free_comm"]+line['extra_note'],line["val_date"][0],line["entry_date"][0])
|
||||
id=pool.get('account.bank.statement.line').create(cr,uid,{
|
||||
'name':line['name'],
|
||||
'date': line['date'],
|
||||
'type':line['amount']>0 and 'customer' or 'supplier',
|
||||
'amount': line['amount'],
|
||||
'partner_id':line['partner_id'] or 0,
|
||||
'account_id':line['account_id'],
|
||||
'statement_id': bk_st_id,
|
||||
'reconcile_id': reconcile_id,
|
||||
'note':str_not1,
|
||||
'ref':line['ref'],
|
||||
})
|
||||
'name':line['name'],
|
||||
'date': line['date'],
|
||||
'type':line['amount']>0 and 'customer' or 'supplier',
|
||||
'amount': line['amount'],
|
||||
'partner_id':line['partner_id'] or 0,
|
||||
'account_id':line['account_id'],
|
||||
'statement_id': bk_st_id,
|
||||
'reconcile_id': reconcile_id,
|
||||
'note':str_not1,
|
||||
'ref':line['ref'],
|
||||
})
|
||||
|
||||
str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"],statement["acc_holder"])
|
||||
std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
# Estonian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2010-06-18 10:59+0000\n"
|
||||
"PO-Revision-Date: 2010-07-22 20:10+0000\n"
|
||||
"Last-Translator: lyyser <logard.1961@gmail.com>\n"
|
||||
"Language-Team: Estonian <et@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: 2010-07-23 04:08+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,child_ids:0
|
||||
msgid "Child Accounts"
|
||||
msgstr "Alamkontod"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,amount_currency:0
|
||||
msgid ""
|
||||
"The amount expressed in the related account currency if not equal to the "
|
||||
"company one."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"Objekti nimi peab algama x_'ga ja ei tohi sisaldada ühtegi erisümbolit !"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,name:0
|
||||
msgid "Account Name"
|
||||
msgstr "Konto nimi"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,unit_amount:0
|
||||
msgid "Specifies the amount of quantity to count."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,currency_id:0
|
||||
msgid "The related account currency if not equal to the company one."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: model:ir.module.module,description:analytic.module_meta_information
|
||||
msgid ""
|
||||
"Module for defining analytic accounting object.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,state:0
|
||||
msgid "State"
|
||||
msgstr "Riik/Osariik"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,user_id:0
|
||||
msgid "Account Manager"
|
||||
msgstr "Konto haldur"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Draft"
|
||||
msgstr "Mustand"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Closed"
|
||||
msgstr "Suletud"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,debit:0
|
||||
msgid "Debit"
|
||||
msgstr "Deebet"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.account,state:0
|
||||
msgid ""
|
||||
"* When an account is created its in 'Draft' state. "
|
||||
" \n"
|
||||
"* If any associated partner is there, it can be in 'Open' state. "
|
||||
" \n"
|
||||
"* If any pending balance is there it can be in 'Pending'. "
|
||||
" \n"
|
||||
"* And finally when all the transactions are over, it can be in 'Close' "
|
||||
"state. \n"
|
||||
"* The project can be in either if the states 'Template' and 'Running'.\n"
|
||||
" If it is template then we can make projects based on the template projects. "
|
||||
"If its in 'Running' state it is a normal project. "
|
||||
" \n"
|
||||
" If it is to be reviewed then the state is 'Pending'.\n"
|
||||
" When the project is completed the state is set to 'Done'."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,type:0
|
||||
msgid "Account Type"
|
||||
msgstr "Konto tüüp"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Template"
|
||||
msgstr "Mall"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Pending"
|
||||
msgstr "Ootel"
|
||||
|
||||
#. module: analytic
|
||||
#: model:ir.model,name:analytic.model_account_analytic_line
|
||||
msgid "Analytic Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,description:0
|
||||
#: field:account.analytic.line,name:0
|
||||
msgid "Description"
|
||||
msgstr "Kirjeldus"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,amount:0
|
||||
msgid ""
|
||||
"Calculated by multiplying the quantity and the price given in the Product's "
|
||||
"cost price."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,company_id:0
|
||||
#: field:account.analytic.line,company_id:0
|
||||
msgid "Company"
|
||||
msgstr "Ettevõte"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,quantity_max:0
|
||||
msgid "Maximum Quantity"
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,user_id:0
|
||||
msgid "User"
|
||||
msgstr "Kasutaja"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,parent_id:0
|
||||
msgid "Parent Analytic Account"
|
||||
msgstr "Ülem analüütiline konto"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,date:0
|
||||
msgid "Date"
|
||||
msgstr "Kuupäev"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,currency_id:0
|
||||
#: field:account.analytic.line,currency_id:0
|
||||
msgid "Account currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,type:0
|
||||
msgid "View"
|
||||
msgstr "Vaade"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.account,quantity_max:0
|
||||
msgid "Sets the higher limit of quantity of hours."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,credit:0
|
||||
msgid "Credit"
|
||||
msgstr "Krediit"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,amount:0
|
||||
msgid "Amount"
|
||||
msgstr "Kogus"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,contact_id:0
|
||||
msgid "Contact"
|
||||
msgstr "Kontakt"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Cancelled"
|
||||
msgstr "Katkestatud"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,balance:0
|
||||
msgid "Balance"
|
||||
msgstr "Balanss"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,date_start:0
|
||||
msgid "Date Start"
|
||||
msgstr "Alguskuupäev"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,quantity:0
|
||||
#: field:account.analytic.line,unit_amount:0
|
||||
msgid "Quantity"
|
||||
msgstr "Kvantiteet"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,date:0
|
||||
msgid "Date End"
|
||||
msgstr "Lõppkuupäev"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,code:0
|
||||
msgid "Account Code"
|
||||
msgstr "Konto kood"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,type:0
|
||||
msgid "Normal"
|
||||
msgstr "Normaalne"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,complete_name:0
|
||||
msgid "Full Account Name"
|
||||
msgstr "Täielik konto nimi"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,account_id:0
|
||||
#: model:ir.model,name:analytic.model_account_analytic_account
|
||||
#: model:ir.module.module,shortdesc:analytic.module_meta_information
|
||||
msgid "Analytic Account"
|
||||
msgstr "Analüütiline konto"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,company_currency_id:0
|
||||
msgid "Currency"
|
||||
msgstr "Rahaühik"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,amount_currency:0
|
||||
msgid "Amount currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,partner_id:0
|
||||
msgid "Associated Partner"
|
||||
msgstr "Seotud partner"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Open"
|
||||
msgstr "Ava"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,line_ids:0
|
||||
msgid "Analytic Entries"
|
||||
msgstr "Analüütilised kirjed"
|
||||
@@ -1147,7 +1147,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
|
||||
'active': fields.boolean('Active', help="If the active field is set to \
|
||||
true, it will allow you to hide the event alarm information without removing it.")
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'state': 'tentative',
|
||||
'class': 'public',
|
||||
|
||||
@@ -43,7 +43,9 @@
|
||||
'init_xml': ['base_setup_data.xml'],
|
||||
'update_xml': ['security/ir.model.access.csv',
|
||||
'base_setup_installer.xml',
|
||||
'base_setup_todo.xml','gtk_contact_form.xml'],
|
||||
'base_setup_todo.xml',
|
||||
# 'gtk_contact_form.xml'
|
||||
],
|
||||
'demo_xml': ['base_setup_demo.xml'],
|
||||
'installable': True,
|
||||
'active': True,
|
||||
|
||||
@@ -88,7 +88,7 @@ class base_setup_company(osv.osv_memory):
|
||||
'city':fields.char('City', size=128),
|
||||
'state_id':fields.selection(_get_all_states, 'State'),
|
||||
'country_id':fields.selection(_get_all_countries, 'Country'),
|
||||
'email':fields.char('E-mail', size=64, required=True),
|
||||
'email':fields.char('E-mail', size=64),
|
||||
'phone':fields.char('Phone', size=64),
|
||||
'currency':fields.many2one('res.currency', 'Currency', required=True),
|
||||
'rml_header1':fields.char('Report Header', size=200,
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Plugins" colspan="4" />
|
||||
<field name="thunderbird" />
|
||||
<label string="*Outlook*" />
|
||||
<!-- <label string="*Outlook*" />-->
|
||||
<!-- TODO <field name="outlook" />-->
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Departements Informations" groups="base.group_extended">
|
||||
<page string="Departments" groups="base.group_extended">
|
||||
<field name="context_department_id" completion="1" widget="selection" string="Department"/>
|
||||
<separator string="Managers" colspan="4"/>
|
||||
<field name="parent_id" nolabel="1" colspan="4"/>
|
||||
|
||||
@@ -46,9 +46,9 @@ class hr_installer(osv.osv_memory):
|
||||
"performance review of employees."),
|
||||
'hr_attendance': fields.boolean('Attendances (Sign In/Out)',
|
||||
help="Simplifies the management of employee attendances."),
|
||||
'hr_payroll': fields.boolean('Payroll' ,
|
||||
'hr_payroll': fields.boolean('Payroll',
|
||||
help="Generic Payroll system"),
|
||||
'hr_payroll_account': fields.boolean('Payroll with Accounting',
|
||||
'hr_payroll_account': fields.boolean('Payroll',
|
||||
help="Generic Payroll system Integrated with Accountings."),
|
||||
}
|
||||
_defaults = {
|
||||
|
||||
@@ -25,7 +25,7 @@ class mrp_price(osv.osv_memory):
|
||||
_name = 'mrp.product_price'
|
||||
_description = 'Product Price'
|
||||
_columns = {
|
||||
'number': fields.integer('Number of products to produce', required=True),
|
||||
'number': fields.integer('Quantity', required=True, help="Specify quantity of products to produce. Report of Cost structure will be displayed base on this qunatity."),
|
||||
}
|
||||
|
||||
def print_report(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -9,9 +9,11 @@
|
||||
<field name="model">mrp.product_price</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Paid ?">
|
||||
<form string="Product Cost Structure">
|
||||
<separator colspan="4" string="Print Cost Structure of Product." />
|
||||
<field name="number"/>
|
||||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-close' special="cancel"
|
||||
string="Close" />
|
||||
|
||||
@@ -230,8 +230,8 @@ class product_template(osv.osv):
|
||||
'description_sale': fields.text('Sale Description',translate=True),
|
||||
'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Will change the way procurements are processed. Consumables are stockable products with infinite stock, or for use when you have no inventory management in the system."),
|
||||
'supply_method': fields.selection([('produce','Produce'),('buy','Buy')], 'Supply method', required=True, help="Produce will generate production order or tasks, according to the product type. Purchase will trigger purchase orders when requested."),
|
||||
'sale_delay': fields.float('Customer Lead Time', help="This is the average time between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
|
||||
'produce_delay': fields.float('Manufacturing Lead Time', help="Average time to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different lead times will be summed for all levels and purchase orders."),
|
||||
'sale_delay': fields.float('Customer Lead Time', help="This is the average delay in days between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
|
||||
'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different lead times will be summed for all levels and purchase orders."),
|
||||
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
|
||||
'rental': fields.boolean('Can be Rent'),
|
||||
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# French translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-25 13:27+0000\n"
|
||||
"PO-Revision-Date: 2010-07-22 09:16+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: French <fr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-23 04:08+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: product_electronic
|
||||
#: model:ir.module.module,description:product_electronic.module_meta_information
|
||||
msgid "A module that add manufacturers and attributes on the product form"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: field:product.product,manufacturer_pref:0
|
||||
msgid "Manufacturer product code"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: view:product.electronic.attribute:0
|
||||
msgid "Product Template Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: model:ir.model,name:product_electronic.model_product_electronic_attribute
|
||||
msgid "Product attributes"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: view:product.product:0
|
||||
msgid "Manufacturing data"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: view:product.product:0
|
||||
msgid "Product reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: field:product.electronic.attribute,name:0
|
||||
msgid "Attribute"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: field:product.electronic.attribute,product_id:0
|
||||
msgid "Product"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: field:product.electronic.attribute,value:0
|
||||
msgid "Value"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: view:product.product:0
|
||||
msgid "Manufacturing Data"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: view:product.product:0
|
||||
msgid "Product name"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: view:product.product:0
|
||||
#: field:product.product,attribute_ids:0
|
||||
msgid "Attributes"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: model:ir.module.module,shortdesc:product_electronic.module_meta_information
|
||||
msgid "Products Attributes & Manufacturers"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: field:product.product,manufacturer_pname:0
|
||||
msgid "Manufacturer product name"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_electronic
|
||||
#: field:product.product,manufacturer:0
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
+40
-28
@@ -536,16 +536,7 @@ class stock_picking(osv.osv):
|
||||
if ('name' not in vals) or (vals.get('name')=='/'):
|
||||
seq_obj_name = 'stock.picking.' + vals['type']
|
||||
vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name)
|
||||
type_list = {
|
||||
'out':_('Picking List'),
|
||||
'in':_('Reception'),
|
||||
'internal': _('Internal Picking'),
|
||||
'delivery': _('Delivery Order')
|
||||
}
|
||||
new_id = super(stock_picking, self).create(cr, user, vals, context)
|
||||
if not vals.get('auto_picking', False):
|
||||
message = type_list.get(vals.get('type', False), _('Picking')) + " '" + (vals['name'] or "n/a") + _(" with origin")+" '" + (vals.get('origin') or "n/a") + "' "+ _("is created.")
|
||||
self.log(cr, user, new_id, message)
|
||||
return new_id
|
||||
|
||||
_columns = {
|
||||
@@ -626,6 +617,9 @@ class stock_picking(osv.osv):
|
||||
for r in picking.move_lines:
|
||||
if r.state == 'draft':
|
||||
todo.append(r.id)
|
||||
|
||||
self.log_picking(cr, uid, ids, context=context)
|
||||
|
||||
todo = self.action_explode(cr, uid, todo, context)
|
||||
if len(todo):
|
||||
self.pool.get('stock.move').action_confirm(cr, uid, todo, context=context)
|
||||
@@ -710,16 +704,8 @@ class stock_picking(osv.osv):
|
||||
""" Changes picking state to assigned.
|
||||
@return: True
|
||||
"""
|
||||
for pick in self.browse(cr, uid, ids, context=context):
|
||||
type_list = {
|
||||
'out':'Picking List',
|
||||
'in':'Reception',
|
||||
'internal': 'Internal picking',
|
||||
'delivery': 'Delivery order'
|
||||
}
|
||||
message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or 'n/a') + "' "+ _("is ready to be processed.")
|
||||
self.log(cr, uid, id, message)
|
||||
self.write(cr, uid, ids, {'state': 'assigned'})
|
||||
self.log_picking(cr, uid, ids, context=context)
|
||||
return True
|
||||
|
||||
def test_finnished(self, cr, uid, ids):
|
||||
@@ -758,8 +744,7 @@ class stock_picking(osv.osv):
|
||||
ids2 = [move.id for move in pick.move_lines]
|
||||
self.pool.get('stock.move').action_cancel(cr, uid, ids2, context)
|
||||
self.write(cr, uid, ids, {'state': 'cancel', 'invoice_state': 'none'})
|
||||
message = _('Picking') + " '" + pick.name + "' "+_("is cancelled")
|
||||
self.log(cr, uid, id, message)
|
||||
self.log_picking(cr, uid, ids, context=context)
|
||||
return True
|
||||
|
||||
#
|
||||
@@ -1190,6 +1175,31 @@ class stock_picking(osv.osv):
|
||||
|
||||
return res
|
||||
|
||||
def log_picking(self, cr, uid, ids, context=None):
|
||||
""" This function will create log messages for picking.
|
||||
@param cr: the database cursor
|
||||
@param uid: the current user's ID for security checks,
|
||||
@param ids: List of Picking Ids
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
for pick in self.browse(cr, uid, ids, context=context):
|
||||
type_list = {
|
||||
'out':'Picking List',
|
||||
'in':'Reception',
|
||||
'internal': 'Internal picking',
|
||||
'delivery': 'Delivery order'
|
||||
}
|
||||
message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or 'n/a') + "' "
|
||||
state_list = {
|
||||
'confirmed': "is scheduled for the '" + datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d') + "'.",
|
||||
'assigned': 'is ready to process.',
|
||||
'cancel': 'is Cancelled.',
|
||||
'done': 'is processed.',
|
||||
}
|
||||
message += state_list[pick.state]
|
||||
self.log(cr, uid, pick.id, message)
|
||||
return True
|
||||
|
||||
stock_picking()
|
||||
|
||||
class stock_production_lot(osv.osv):
|
||||
@@ -1844,8 +1854,6 @@ class stock_move(osv.osv):
|
||||
'ref': move.picking_id and move.picking_id.name,
|
||||
})
|
||||
|
||||
message = _('Move line') + " '" + move.name + "' "+ _("is processed.")
|
||||
self.log(cr, uid, move.id, message)
|
||||
# This can be removed
|
||||
#tracking_lot = False
|
||||
#if context:
|
||||
@@ -1865,9 +1873,7 @@ class stock_move(osv.osv):
|
||||
for pick_id in picking_ids:
|
||||
wf_service.trg_write(uid, 'stock.picking', pick_id, cr)
|
||||
|
||||
for (id,name) in picking_obj.name_get(cr, uid, picking_ids):
|
||||
message = _('Document') + " '" + name + "' "+ _("is processed.")
|
||||
self.log(cr, uid, id, message)
|
||||
picking_obj.log_picking(cr, uid, picking_ids, context=context)
|
||||
return True
|
||||
|
||||
def create_account_move(self, cr, uid, move,account_id, account_variation, amount, context=None):
|
||||
@@ -1940,8 +1946,11 @@ class stock_move(osv.osv):
|
||||
new_move = self.copy(cr, uid, move.id, default_val)
|
||||
#self.write(cr, uid, [new_move], {'move_history_ids':[(4,move.id)]}) #TODO : to track scrap moves
|
||||
res += [new_move]
|
||||
message = _('Product ') + " '" + move.product_id.name + "' "+ _("is scraped with") + " '" + str(move.product_qty) + "' "+ _("quantity.")
|
||||
product_obj = self.pool.get('product.product')
|
||||
for (id, name) in product_obj.name_get(cr, uid, [move.product_id.id]):
|
||||
message = _('Product ') + " '" + name + "' "+ _("is scraped with") + " '" + str(move.product_qty) + "' "+ _("quantity.")
|
||||
self.log(cr, uid, move.id, message)
|
||||
|
||||
self.action_done(cr, uid, res)
|
||||
return res
|
||||
|
||||
@@ -2068,8 +2077,11 @@ class stock_move(osv.osv):
|
||||
}
|
||||
|
||||
self.write(cr, uid, [move.id], update_val)
|
||||
message = _('Product ') + " '" + move.product_id.name + "' "+ _("is consumed with") + " '" + str(move.product_qty) + "' "+ _("quantity.")
|
||||
self.log(cr, uid, move.id, message)
|
||||
|
||||
product_obj = self.pool.get('product.product')
|
||||
for (id, name) in product_obj.name_get(cr, uid, [move.product_id.id]):
|
||||
message = _('Product ') + " '" + name + "' "+ _("is consumed with") + " '" + str(move.product_qty) + "' "+ _("quantity.")
|
||||
self.log(cr, uid, move.id, message)
|
||||
self.action_done(cr, uid, res)
|
||||
|
||||
return res
|
||||
|
||||
@@ -896,7 +896,6 @@
|
||||
<newline/>
|
||||
<field name="date_done"/>
|
||||
<field name="move_type"/>
|
||||
<field name="sale_id"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user