[MERGE]: Merge with lp:openobject-addons

bzr revid: aag@tinyerp.com-20111219095152-6l50rizk3ovhr726
This commit is contained in:
Atik Agewan (OpenERP) 2011-12-19 15:21:52 +05:30
commit c5476c236b
139 changed files with 16596 additions and 9291 deletions

View File

@ -261,7 +261,7 @@ class account_invoice(osv.osv):
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',
help='Bank Account Number, Company bank account if Invoice is customer or supplier refund, otherwise Partner bank account number.', readonly=True, states={'draft':[('readonly',False)]}),
'move_lines':fields.function(_get_lines, type='many2many', relation='account.move.line', string='Entry Lines'),
'residual': fields.function(_amount_residual, digits_compute=dp.get_precision('Account'), string='Residual',
'residual': fields.function(_amount_residual, digits_compute=dp.get_precision('Account'), string='To Pay',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line','move_id'], 50),
'account.invoice.tax': (_get_invoice_tax, None, 50),

View File

@ -120,7 +120,7 @@
<field name="number"/>
<field name="partner_id" groups="base.group_user"/>
<field name="reference" invisible="1"/>
<field name="name"/>
<field name="name" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="period_id" invisible="1" groups="account.group_account_user"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
@ -269,15 +269,13 @@
<newline/>
<field name="date_invoice"/>
<field name="period_id" domain="[('state', '=', 'draft')]" groups="account.group_account_user" widget="selection"/>
<group colspan="2" col="1" groups="account.group_account_user">
<label align="0.0" string="(keep empty to use the current period)"/>
</group>
<field name="payment_term" widget="selection"/>
<newline/>
<field domain="[('company_id', '=', company_id),('type','=', 'receivable')]" name="account_id" groups="account.group_account_user"/>
<field name="name" groups="base.group_extended"/>
</group>
<notebook colspan="4">
<page string="Invoice">
<field domain="[('company_id', '=', company_id),('type','=', 'receivable')]" name="account_id" groups="account.group_account_user"/>
<field name="name"/>
<field name="payment_term" widget="selection"/>
<field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}"/>
<group col="1" colspan="2">
<field name="tax_line" nolabel="1">

View File

@ -10,7 +10,7 @@
<field name="arch" type="xml">
<tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts">
<field name="complete_name"/>
<field name="code"/>
<field name="code" groups="base.group_extended"/>
<field name="quantity"/>
<field name="date"/>
<field name="user_id" invisible="1"/>
@ -59,7 +59,7 @@
<field name="arch" type="xml">
<tree colors="red:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1">
<field name="name"/>
<field name="code"/>
<field name="code" groups="base.group_extended"/>
<field name="quantity"/>
<field name="debit"/>
<field name="credit"/>
@ -82,8 +82,8 @@
<field name="arch" type="xml">
<form string="Analytic account">
<group colspan="4" col="6">
<field name="name" select="1" colspan="4"/>
<field name="code" select="1"/>
<field name="name" colspan="4"/>
<field name="code" groups="base.group_extended"/>
<field name="parent_id" on_change="on_change_parent(parent_id)" groups="base.group_extended"/>
<field name="company_id" on_change="on_change_company(company_id)" select="2" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/>
<field name="type" select="2"/>

View File

@ -32,13 +32,11 @@
help="Analytic Accounts with a past deadline in one month." />
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="partner_id" select="1">
<field name="name" filter_domain="['|', ('name','ilike',self),('code','ilike',self)]" string="Contract"/>
<field name="partner_id">
<filter string="A contract in OpenERP is an analytic account having a partner set on it." name="has_partner" domain="[('partner_id', '!=', False)]" icon="terp-partner" />
</field>
<field name="user_id">
<filter string="My Accounts" domain="[('user_id','=',uid)]" icon="terp-personal" name="my_accounts" />
<filter string="No Account Manager" domain="[('user_id', '=', False)]" icon="terp-personal-" />
</field>
@ -64,7 +62,7 @@
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'search_default_has_partner':1, 'search_default_my_accounts':1, 'search_default_draft':1, 'search_default_pending':1, 'search_default_open':1, 'search_default_renew':1}</field>
<field name="context">{'search_default_has_partner':1, 'search_default_user_id':uid, 'search_default_draft':1, 'search_default_pending':1, 'search_default_open':1, 'search_default_renew':1}</field>
<field name="domain">[('type','=','normal')]</field>
<field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
<field name="help">You will find here the contracts to be renewed because the deadline is passed or the working hours are higher than the allocated hours. OpenERP automatically sets these analytic accounts to the pending state, in order to raise a warning during the timesheets recording. Salesmen should review all pending accounts and reopen or close the according to the negotiation with the customer.</field>
@ -76,7 +74,7 @@
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'search_default_has_partner':1, 'search_default_my_accounts':1, 'search_default_draft':1, 'search_default_pending':1, 'search_default_open':1}</field>
<field name="context">{'search_default_has_partner':1, 'search_default_user_id':uid, 'search_default_draft':1, 'search_default_pending':1, 'search_default_open':1}</field>
<field name="domain">[('type','=','normal')]</field>
<field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
</record>

View File

@ -16,14 +16,14 @@
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<group name="invoice_stats" position="inside">
<field name="hours_qtt_non_invoiced"/>
<field name="ca_to_invoice"/>
<field name="hours_qtt_non_invoiced" attrs="{'invisible': [('to_invoice','=',0)]}"/>
<field name="ca_to_invoice" attrs="{'invisible': [('to_invoice','=',0)]}"/>
<label string="" colspan="1"/>
<button
name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
string="Create Invoice"
type="action"
attrs="{'readonly':[('ca_to_invoice','=',0.0)]}"
attrs="{'readonly':[('ca_to_invoice','=',0.0)], 'invisible': [('to_invoice','=',0)]}"
icon="gtk-go-forward"/>
</group>
</field>

View File

@ -0,0 +1,293 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:51+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:48+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_invoiced:0
msgid ""
"Number of hours that can be invoiced plus those that already have been "
"invoiced."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_ca:0
msgid "Computed using the formula: Max Invoice Price - Invoiced Amount."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_hours:0
msgid "Computed using the formula: Maximum Quantity - Hours Tot."
msgstr ""
#. module: account_analytic_analysis
#: code:addons/account_analytic_analysis/account_analytic_analysis.py:532
#: code:addons/account_analytic_analysis/account_analytic_analysis.py:703
#, python-format
msgid "AccessError"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,last_invoice_date:0
msgid "Date of the last invoice created for this analytic account."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.module.module,description:account_analytic_analysis.module_meta_information
msgid ""
"\n"
"This module is for modifying account analytic view to show\n"
"important data to project manager of services companies.\n"
"Adds menu to show relevant information to each manager..\n"
"\n"
"You can also view the report of account analytic summary\n"
"user-wise as well as month wise.\n"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,last_invoice_date:0
msgid "Last Invoice Date"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,theorical_margin:0
msgid "Computed using the formula: Theorial Revenue - Total Costs"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,real_margin_rate:0
msgid "Real Margin Rate (%)"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_theorical:0
msgid "Theoretical Revenue"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,last_worked_invoiced_date:0
msgid ""
"If invoice from the costs, this is the date of the latest work or cost that "
"have been invoiced."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_invoicing
msgid "Billing"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,last_worked_date:0
msgid "Date of Last Cost/Work"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,total_cost:0
msgid "Total Costs"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_quantity:0
msgid ""
"Number of hours you spent on the analytic account (from timesheet). It "
"computes on all journal of type 'general'."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_hours:0
msgid "Remaining Hours"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,theorical_margin:0
msgid "Theoretical Margin"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_theorical:0
msgid ""
"Based on the costs you had on the project, what would have been the revenue "
"if all these costs have been invoiced at the normal sale price provided by "
"the pricelist."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,user_ids:0
#: field:account_analytic_analysis.summary.user,user:0
msgid "User"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_to_invoice:0
msgid "Uninvoiced Amount"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,real_margin:0
msgid "Computed using the formula: Invoiced Amount - Total Costs."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_non_invoiced:0
msgid "Uninvoiced Hours"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,last_worked_date:0
msgid "Date of the latest work done on this account."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.module.module,shortdesc:account_analytic_analysis.module_meta_information
msgid "report_account_analytic"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_user
msgid "Hours Summary by User"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_invoiced:0
msgid "Invoiced Amount"
msgstr ""
#. module: account_analytic_analysis
#: code:addons/account_analytic_analysis/account_analytic_analysis.py:533
#: code:addons/account_analytic_analysis/account_analytic_analysis.py:704
#, python-format
msgid "You try to bypass an access rule (Document type: %s)."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,last_worked_invoiced_date:0
msgid "Date of Last Invoiced Cost"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_invoiced:0
msgid "Invoiced Hours"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,real_margin:0
msgid "Real Margin"
msgstr ""
#. module: account_analytic_analysis
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_invoiced:0
msgid "Total customer invoiced amount for this account."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_month
msgid "Hours summary by month"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,real_margin_rate:0
msgid "Computes using the formula: (Real Margin / Total Costs) * 100."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_non_invoiced:0
msgid ""
"Number of hours (from journal of type 'general') that can be invoiced if you "
"invoice based on analytic account."
msgstr ""
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Analytic accounts"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_ca:0
msgid "Remaining Revenue"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_to_invoice:0
msgid ""
"If invoice from analytic account, the remaining amount you can invoice to "
"the customer based on the total costs."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,revenue_per_hour:0
msgid "Computed using the formula: Invoiced Amount / Hours Tot."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,revenue_per_hour:0
msgid "Revenue per Hours (real)"
msgstr ""
#. module: account_analytic_analysis
#: field:account_analytic_analysis.summary.month,unit_amount:0
#: field:account_analytic_analysis.summary.user,unit_amount:0
msgid "Total Time"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,month_ids:0
#: field:account_analytic_analysis.summary.month,month:0
msgid "Month"
msgstr ""
#. module: account_analytic_analysis
#: field:account_analytic_analysis.summary.month,account_id:0
#: field:account_analytic_analysis.summary.user,account_id:0
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_account
msgid "Analytic Account"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_overpassed
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_managed_overpassed
msgid "Overpassed Accounts"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_hr_tree_invoiced_all
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_hr_tree_invoiced_all
msgid "All Uninvoiced Entries"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_quantity:0
msgid "Hours Tot"
msgstr ""
#. module: account_analytic_analysis
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,total_cost:0
msgid ""
"Total of costs for this account. It includes real costs (from invoices) and "
"indirect costs, like time spent on timesheets."
msgstr ""

View File

@ -0,0 +1,191 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:50+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_analytic_default
#: model:ir.module.module,shortdesc:account_analytic_default.module_meta_information
msgid "Account Analytic Default"
msgstr ""
#. module: account_analytic_default
#: help:account.analytic.default,partner_id:0
msgid ""
"select a partner which will use analytical account specified in analytic "
"default (eg. create new cutomer invoice or Sale order if we select this "
"partner, it will automatically take this as an analytical account)"
msgstr ""
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_partner
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_product
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_user
msgid "Analytic Rules"
msgstr ""
#. module: account_analytic_default
#: help:account.analytic.default,analytic_id:0
msgid "Analytical Account"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Current"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Group By..."
msgstr ""
#. module: account_analytic_default
#: help:account.analytic.default,date_stop:0
msgid "Default end date for this Analytical Account"
msgstr ""
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_stock_picking
msgid "Picking List"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Conditions"
msgstr ""
#. module: account_analytic_default
#: help:account.analytic.default,company_id:0
msgid ""
"select a company which will use analytical account specified in analytic "
"default (eg. create new cutomer invoice or Sale order if we select this "
"company, it will automatically take this as an analytical account)"
msgstr ""
#. module: account_analytic_default
#: help:account.analytic.default,date_start:0
msgid "Default start date for this Analytical Account"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
#: field:account.analytic.default,product_id:0
msgid "Product"
msgstr ""
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_account_analytic_default
msgid "Analytic Distribution"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
#: field:account.analytic.default,company_id:0
msgid "Company"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
#: field:account.analytic.default,user_id:0
msgid "User"
msgstr ""
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.act_account_acount_move_line_open
msgid "Entries"
msgstr ""
#. module: account_analytic_default
#: field:account.analytic.default,date_stop:0
msgid "End Date"
msgstr ""
#. module: account_analytic_default
#: help:account.analytic.default,user_id:0
msgid ""
"select a user which will use analytical account specified in analytic default"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
#: model:ir.actions.act_window,name:account_analytic_default.action_analytic_default_list
#: model:ir.ui.menu,name:account_analytic_default.menu_analytic_default_list
msgid "Analytic Defaults"
msgstr ""
#. module: account_analytic_default
#: model:ir.module.module,description:account_analytic_default.module_meta_information
msgid ""
"\n"
"Allows to automatically select analytic accounts based on criterions:\n"
"* Product\n"
"* Partner\n"
"* User\n"
"* Company\n"
"* Date\n"
" "
msgstr ""
#. module: account_analytic_default
#: help:account.analytic.default,product_id:0
msgid ""
"select a product which will use analytical account specified in analytic "
"default (eg. create new cutomer invoice or Sale order if we select this "
"product, it will automatically take this as an analytical account)"
msgstr ""
#. module: account_analytic_default
#: field:account.analytic.default,sequence:0
msgid "Sequence"
msgstr ""
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_account_invoice_line
msgid "Invoice Line"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
#: field:account.analytic.default,analytic_id:0
msgid "Analytic Account"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Accounts"
msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
#: field:account.analytic.default,partner_id:0
msgid "Partner"
msgstr ""
#. module: account_analytic_default
#: field:account.analytic.default,date_start:0
msgid "Start Date"
msgstr ""
#. module: account_analytic_default
#: help:account.analytic.default,sequence:0
msgid ""
"Gives the sequence order when displaying a list of analytic distribution"
msgstr ""
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

View File

@ -0,0 +1,530 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-03 16:56+0000\n"
"PO-Revision-Date: 2011-12-18 16:52+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid ""
"This distribution model has been saved.You will be able to reuse it later."
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,plan_id:0
msgid "Plan Id"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "From Date"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
#: view:account.crossovered.analytic:0
#: model:ir.actions.act_window,name:account_analytic_plans.action_account_crossovered_analytic
#: model:ir.actions.report.xml,name:account_analytic_plans.account_analytic_account_crossovered_analytic
msgid "Crossovered Analytic"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,name:0
#: field:account.analytic.plan.line,plan_id:0
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_form_action
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_plan_action
msgid "Analytic Plan"
msgstr ""
#. module: account_analytic_plans
#: model:ir.module.module,shortdesc:account_analytic_plans.module_meta_information
msgid "Multiple-plans management in Analytic Accounting"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,journal_id:0
#: view:account.crossovered.analytic:0
#: field:account.crossovered.analytic,journal_ids:0
msgid "Analytic Journal"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_line
msgid "Analytic Plan Line"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:60
#, python-format
msgid "User Error"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
msgid "Analytic Plan Instance"
msgstr ""
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid "Ok"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "You can not create move line on closed account."
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,plan_id:0
msgid "Model's Plan"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account2_ids:0
msgid "Account2 Id"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account_ids:0
msgid "Account Id"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Amount"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Code"
msgstr ""
#. module: account_analytic_plans
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account6_ids:0
msgid "Account6 Id"
msgstr ""
#. module: account_analytic_plans
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_multi_plan_action
msgid "Multi Plans"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement_line
msgid "Bank Statement Line"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,analytic_account_id:0
msgid "Analytic Account"
msgstr ""
#. module: account_analytic_plans
#: sql_constraint:account.journal:0
msgid "The code of the journal must be unique per company !"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,ref:0
msgid "Analytic Account Reference"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid ""
"You can not create move line on receivable/payable account without partner"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_sale_order_line
msgid "Sales Order Line"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:47
#: view:analytic.plan.create.model:0
#, python-format
msgid "Distribution Model Saved"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_instance_action
msgid "Analytic Distribution's Models"
msgstr ""
#. module: account_analytic_plans
#: view:account.crossovered.analytic:0
msgid "Print"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Percentage"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:201
#, python-format
msgid "A model having this name and code already exists !"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "No analytic plan defined !"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,rate:0
msgid "Rate (%)"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,plan_ids:0
#: field:account.journal,plan_id:0
msgid "Analytic Plans"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Perc(%)"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,max_required:0
msgid "Maximum Allowed (%)"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Printing date"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
msgid "Analytic Plan Lines"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.bank.statement.line:0
msgid ""
"The amount of the voucher must be the same amount as the one on the "
"statement line"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_invoice_line
msgid "Invoice Line"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Currency"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,date1:0
msgid "Start Date"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Company"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account5_ids:0
msgid "Account5 Id"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance_line
msgid "Analytic Instance Line"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,root_analytic_id:0
msgid "Root Account"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "To Date"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:321
#: code:addons/account_analytic_plans/account_analytic_plans.py:462
#, python-format
msgid "You have to define an analytic journal on the '%s' journal!"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,empty_line:0
msgid "Dont show empty lines"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.action_analytic_plan_create_model
msgid "analytic.plan.create.model.action"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account :"
msgstr ""
#. module: account_analytic_plans
#: model:ir.module.module,description:account_analytic_plans.module_meta_information
msgid ""
"This module allows to use several analytic plans, according to the general "
"journal,\n"
"so that multiple analytic lines are created when the invoice or the entries\n"
"are confirmed.\n"
"\n"
"For example, you can define the following analytic structure:\n"
" Projects\n"
" Project 1\n"
" SubProj 1.1\n"
" SubProj 1.2\n"
" Project 2\n"
" Salesman\n"
" Eric\n"
" Fabien\n"
"\n"
"Here, we have two plans: Projects and Salesman. An invoice line must\n"
"be able to write analytic entries in the 2 plans: SubProj 1.1 and\n"
"Fabien. The amount can also be split. The following example is for\n"
"an invoice that touches the two subproject and assigned to one salesman:\n"
"\n"
"Plan1:\n"
" SubProject 1.1 : 50%\n"
" SubProject 1.2 : 50%\n"
"Plan2:\n"
" Eric: 100%\n"
"\n"
"So when this line of invoice will be confirmed, it will generate 3 analytic "
"lines,\n"
"for one account entry.\n"
"The analytic plan validates the minimum and maximum percentage at the time "
"of creation\n"
"of distribution models.\n"
" "
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account Reference:"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,name:0
msgid "Plan Name"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan,default_instance_id:0
msgid "Default Entries"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_move_line
msgid "Journal Items"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account1_ids:0
msgid "Account1 Id"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "Company must be same for its related account and period."
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,min_required:0
msgid "Minimum Allowed (%)"
msgstr ""
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_id:0
msgid "Root account of this plan."
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:201
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "Error"
msgstr ""
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid "Save This Distribution as a Model"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Quantity"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#, python-format
msgid "Please put a name and a code before saving the model !"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_crossovered_analytic
msgid "Print Crossovered Analytic"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:321
#: code:addons/account_analytic_plans/account_analytic_plans.py:462
#, python-format
msgid "No Analytic Journal !"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
msgid "Bank Statement"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
msgid "Account3 Id"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_invoice
msgid "Invoice"
msgstr ""
#. module: account_analytic_plans
#: view:account.crossovered.analytic:0
#: view:analytic.plan.create.model:0
msgid "Cancel"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
msgid "Account4 Id"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Lines"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:214
#, python-format
msgid "The Total Should be Between %s and %s"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "at"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Account Name"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Line"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,code:0
msgid "Distribution Code"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "%"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "100.00%"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.default,analytics_id:0
#: view:account.analytic.plan.instance:0
#: field:account.analytic.plan.instance,name:0
#: field:account.bank.statement.line,analytics_id:0
#: field:account.invoice.line,analytics_id:0
#: field:account.move.line,analytics_id:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_default
msgid "Analytic Distribution"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_journal
msgid "Journal"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_analytic_plan_create_model
msgid "analytic.plan.create.model"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,date2:0
msgid "End Date"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_instance_model_open
msgid "Distribution Models"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,sequence:0
msgid "Sequence"
msgstr ""
#. module: account_analytic_plans
#: sql_constraint:account.journal:0
msgid "The name of the journal must be unique per company !"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:214
#, python-format
msgid "Value Error"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "You can not create move line on view account."
msgstr ""

View File

@ -0,0 +1,107 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:52+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_anglo_saxon
#: view:product.category:0
msgid " Accounting Property"
msgstr ""
#. module: account_anglo_saxon
#: sql_constraint:purchase.order:0
msgid "Order Reference must be unique !"
msgstr ""
#. module: account_anglo_saxon
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
msgstr ""
#. module: account_anglo_saxon
#: constraint:product.template:0
msgid ""
"Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_account_invoice_line
msgid "Invoice Line"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_purchase_order
msgid "Purchase Order"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_product_template
msgid "Product Template"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_product_category
msgid "Product Category"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
msgid "Stock Accounting for Anglo Saxon countries"
msgstr ""
#. module: account_anglo_saxon
#: field:product.category,property_account_creditor_price_difference_categ:0
#: field:product.template,property_account_creditor_price_difference:0
msgid "Price Difference Account"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_account_invoice
msgid "Invoice"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_stock_picking
msgid "Picking List"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
msgid ""
"This module will support the Anglo-Saxons accounting methodology by\n"
" changing the accounting logic with stock transactions. The difference "
"between the Anglo-Saxon accounting countries\n"
" and the Rhine or also called Continental accounting countries is the "
"moment of taking the Cost of Goods Sold versus Cost of Sales.\n"
" Anglo-Saxons accounting does take the cost when sales invoice is "
"created, Continental accounting will take the cost at the moment the goods "
"are shipped.\n"
" This module will add this functionality by using a interim account, to "
"store the value of shipped goods and will contra book this interim account\n"
" when the invoice is created to transfer this amount to the debtor or "
"creditor account.\n"
" Secondly, price differences between actual purchase price and fixed "
"product standard price are booked on a separate account"
msgstr ""
#. module: account_anglo_saxon
#: help:product.category,property_account_creditor_price_difference_categ:0
#: help:product.template,property_account_creditor_price_difference:0
msgid ""
"This account will be used to value price difference between purchase price "
"and cost price."
msgstr ""

View File

@ -131,7 +131,7 @@ class account_asset_asset(osv.osv):
if asset.prorata:
undone_dotation_number += 1
return undone_dotation_number
def compute_depreciation_board(self, cr, uid, ids, context=None):
depreciation_lin_obj = self.pool.get('account.asset.depreciation.line')
for asset in self.browse(cr, uid, ids, context=context):
@ -141,7 +141,7 @@ class account_asset_asset(osv.osv):
old_depreciation_line_ids = depreciation_lin_obj.search(cr, uid, [('asset_id', '=', asset.id), ('move_id', '=', False)])
if old_depreciation_line_ids:
depreciation_lin_obj.unlink(cr, uid, old_depreciation_line_ids, context=context)
amount_to_depr = residual_amount = asset.value_residual
if asset.prorata:
depreciation_date = datetime.strptime(self._get_last_depreciation_date(cr, uid, [asset.id], context)[asset.id], '%Y-%m-%d')
@ -198,6 +198,16 @@ class account_asset_asset(osv.osv):
res.setdefault(id, 0.0)
return res
def onchange_company_id(self, cr, uid, ids, company_id=False, context=None):
val = {}
if company_id:
company = self.pool.get('res.company').browse(cr, uid, company_id, context=context)
if company.currency_id.company_id and company.currency_id.company_id.id != company_id:
val['currency_id'] = False
else:
val['currency_id'] = company.currency_id.id
return {'value': val}
_columns = {
'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),
'name': fields.char('Asset', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
@ -224,7 +234,7 @@ class account_asset_asset(osv.osv):
'method_end': fields.date('Ending Date', readonly=True, states={'draft':[('readonly',False)]}),
'method_progress_factor': fields.float('Degressive Factor', readonly=True, states={'draft':[('readonly',False)]}),
'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual Value'),
'method_time': fields.selection([('number','Number of Depreciations'),('end','Ending Date')], 'Time Method', required=True, readonly=True, states={'draft':[('readonly',False)]},
'method_time': fields.selection([('number','Number of Depreciations'),('end','Ending Date')], 'Time Method', required=True, readonly=True, states={'draft':[('readonly',False)]},
help="Choose the method to use to compute the dates and number of depreciation lines.\n"\
" * Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" \
" * Ending Date: Choose the time between 2 depreciations and the date the depreciations won't go beyond."),
@ -246,7 +256,7 @@ class account_asset_asset(osv.osv):
'currency_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
'company_id': lambda self, cr, uid, context: self.pool.get('res.company')._company_default_get(cr, uid, 'account.asset.asset',context=context),
}
def _check_recursion(self, cr, uid, ids, context=None, parent=None):
return super(account_asset_asset, self)._check_recursion(cr, uid, ids, context=context, parent=parent)
@ -295,7 +305,7 @@ class account_asset_asset(osv.osv):
result = []
period_obj = self.pool.get('account.period')
depreciation_obj = self.pool.get('account.asset.depreciation.line')
period = period_obj.browse(cr, uid, period_id, context=context)
period = period_obj.browse(cr, uid, period_id, context=context)
depreciation_ids = depreciation_obj.search(cr, uid, [('asset_id', 'in', ids), ('depreciation_date', '<', period.date_stop), ('depreciation_date', '>', period.date_start), ('move_check', '=', False)], context=context)
return depreciation_obj.create_move(cr, uid, depreciation_ids, context=context)
@ -394,7 +404,7 @@ class account_asset_depreciation_line(osv.osv):
self.write(cr, uid, line.id, {'move_id': move_id}, context=context)
created_move_ids.append(move_id)
if can_close:
asset_obj.write(cr, uid, [line.asset_id.id], {'state': 'close'}, context=context)
asset_obj.write(cr, uid, [line.asset_id.id], {'state': 'close'}, context=context)
return created_move_ids
account_asset_depreciation_line()
@ -416,7 +426,7 @@ class account_asset_history(osv.osv):
'user_id': fields.many2one('res.users', 'User', required=True),
'date': fields.date('Date', required=True),
'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True),
'method_time': fields.selection([('number','Number of Depreciations'),('end','Ending Date')], 'Time Method', required=True,
'method_time': fields.selection([('number','Number of Depreciations'),('end','Ending Date')], 'Time Method', required=True,
help="The method to use to compute the dates and number of depreciation lines.\n"\
"Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" \
"Ending Date: Choose the time between 2 depreciations and the date the depreciations won't go beyond."),
@ -430,7 +440,7 @@ class account_asset_history(osv.osv):
'date': lambda *args: time.strftime('%Y-%m-%d'),
'user_id': lambda self, cr, uid, ctx: uid
}
account_asset_history()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -2,7 +2,7 @@
<data>
<!--
Asset Category
Asset Category
-->
<record model="ir.ui.view" id="view_account_asset_category_form">
@ -87,7 +87,7 @@
<field name="salvage_value"/>
<field name="value_residual"/>
<field name="currency_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
</group>
<notebook colspan="4">
<page string="General">
@ -103,7 +103,7 @@
<field name="method_period"/>
<field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','=','number')]}"/>
<newline/>
<button name="%(action_asset_modify)d" states="open" string="Change Duration" type="action" icon="terp-stock_effects-object-colorize" colspan="2"/>
<button name="%(action_asset_modify)d" states="open" string="Change Duration" type="action" icon="terp-stock_effects-object-colorize" colspan="2"/>
</group>
<group colspan="2" col="2">
<separator string="Depreciation Method" colspan="2"/>
@ -209,9 +209,9 @@
</search>
</field>
</record>
<!--
Asset History
Asset History
-->
<record model="ir.ui.view" id="view_account_asset_history_form">
@ -274,7 +274,7 @@
</field>
</field>
</record>
<record id="view_account_move_line_filter_inherit" model="ir.ui.view">
<field name="name">Journal Items (Search)</field>
<field name="model">account.move.line</field>
@ -302,7 +302,7 @@
</record>
<menuitem parent="menu_finance_assets" id="menu_action_account_asset_asset_form" action="action_account_asset_asset_form"/>
<act_window id="act_entries_open" name="Entries" res_model="account.move.line" src_model="account.asset.asset" context="{'search_default_asset_id': [active_id], 'default_asset_id': active_id}"/>
<menuitem id="menu_finance_config_assets" name="Assets" parent="account.menu_finance_accounting"/>
@ -314,19 +314,19 @@
</record>
<menuitem parent="menu_finance_config_assets" id="menu_action_account_asset_asset_list_normal" action="action_account_asset_asset_list_normal"/>
<record model="ir.actions.act_window" id="action_account_asset_asset_form_normal">
<field name="name">Review Asset Categories</field>
<field name="res_model">account.asset.category</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="asset_category_form_view_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_asset_asset_form_normal"/>
<field name="category_id" ref="account.category_accounting_configuration"/>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,441 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:52+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_budget
#: field:crossovered.budget,creating_user_id:0
msgid "Responsible User"
msgstr ""
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Confirmed"
msgstr ""
#. module: account_budget
#: model:ir.actions.act_window,name:account_budget.open_budget_post_form
#: model:ir.ui.menu,name:account_budget.menu_budget_post_form
msgid "Budgetary Positions"
msgstr ""
#. module: account_budget
#: code:addons/account_budget/account_budget.py:119
#, python-format
msgid "The General Budget '%s' has no Accounts!"
msgstr ""
#. module: account_budget
#: report:account.budget:0
msgid "Printed at:"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
msgid "Confirm"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,validating_user_id:0
msgid "Validate User"
msgstr ""
#. module: account_budget
#: model:ir.actions.act_window,name:account_budget.action_account_budget_crossvered_summary_report
msgid "Print Summary"
msgstr ""
#. module: account_budget
#: field:crossovered.budget.lines,paid_date:0
msgid "Paid Date"
msgstr ""
#. module: account_budget
#: field:account.budget.analytic,date_to:0
#: field:account.budget.crossvered.report,date_to:0
#: field:account.budget.crossvered.summary.report,date_to:0
#: field:account.budget.report,date_to:0
msgid "End of period"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
#: selection:crossovered.budget,state:0
msgid "Draft"
msgstr ""
#. module: account_budget
#: report:account.budget:0
msgid "at"
msgstr ""
#. module: account_budget
#: view:account.budget.report:0
#: model:ir.actions.act_window,name:account_budget.action_account_budget_analytic
#: model:ir.actions.act_window,name:account_budget.action_account_budget_crossvered_report
msgid "Print Budgets"
msgstr ""
#. module: account_budget
#: report:account.budget:0
msgid "Currency:"
msgstr ""
#. module: account_budget
#: model:ir.model,name:account_budget.model_account_budget_crossvered_report
msgid "Account Budget crossvered report"
msgstr ""
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Validated"
msgstr ""
#. module: account_budget
#: field:crossovered.budget.lines,percentage:0
msgid "Percentage"
msgstr ""
#. module: account_budget
#: report:crossovered.budget.report:0
msgid "to"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,state:0
msgid "Status"
msgstr ""
#. module: account_budget
#: model:ir.actions.act_window,help:account_budget.act_crossovered_budget_view
msgid ""
"A budget is a forecast of your company's income and expenses expected for a "
"period in the future. With a budget, a company is able to carefully look at "
"how much money they are taking in during a given period, and figure out the "
"best way to divide it among various categories. By keeping track of where "
"your money goes, you may be less likely to overspend, and more likely to "
"meet your financial goals. Forecast a budget by detailing the expected "
"revenue per analytic account and monitor its evolution based on the actuals "
"realised during that period."
msgstr ""
#. module: account_budget
#: view:account.budget.crossvered.summary.report:0
msgid "This wizard is used to print summary of budgets"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "%"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Description"
msgstr ""
#. module: account_budget
#: report:crossovered.budget.report:0
msgid "Currency"
msgstr ""
#. module: account_budget
#: report:crossovered.budget.report:0
msgid "Total :"
msgstr ""
#. module: account_budget
#: field:account.budget.post,company_id:0
#: field:crossovered.budget,company_id:0
#: field:crossovered.budget.lines,company_id:0
msgid "Company"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
msgid "To Approve"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
msgid "Reset to Draft"
msgstr ""
#. module: account_budget
#: view:account.budget.post:0
#: view:crossovered.budget:0
#: field:crossovered.budget.lines,planned_amount:0
msgid "Planned Amount"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Perc(%)"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
#: selection:crossovered.budget,state:0
msgid "Done"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Practical Amt"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
#: view:account.budget.post:0
#: view:crossovered.budget:0
#: field:crossovered.budget.lines,practical_amount:0
msgid "Practical Amount"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,date_to:0
#: field:crossovered.budget.lines,date_to:0
msgid "End Date"
msgstr ""
#. module: account_budget
#: model:ir.model,name:account_budget.model_account_budget_analytic
#: model:ir.model,name:account_budget.model_account_budget_report
msgid "Account Budget report for analytic account"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
msgid "Theoritical Amount"
msgstr ""
#. module: account_budget
#: field:account.budget.post,name:0
#: field:crossovered.budget,name:0
msgid "Name"
msgstr ""
#. module: account_budget
#: model:ir.model,name:account_budget.model_crossovered_budget_lines
msgid "Budget Line"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
#: view:account.budget.post:0
msgid "Lines"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: view:crossovered.budget:0
#: field:crossovered.budget.lines,crossovered_budget_id:0
#: report:crossovered.budget.report:0
#: model:ir.actions.report.xml,name:account_budget.account_budget
#: model:ir.model,name:account_budget.model_crossovered_budget
msgid "Budget"
msgstr ""
#. module: account_budget
#: code:addons/account_budget/account_budget.py:119
#, python-format
msgid "Error!"
msgstr ""
#. module: account_budget
#: field:account.budget.post,code:0
#: field:crossovered.budget,code:0
msgid "Code"
msgstr ""
#. module: account_budget
#: view:account.budget.analytic:0
#: view:account.budget.crossvered.report:0
msgid "This wizard is used to print budget"
msgstr ""
#. module: account_budget
#: model:ir.actions.act_window,name:account_budget.act_crossovered_budget_view
#: model:ir.actions.act_window,name:account_budget.action_account_budget_post_tree
#: model:ir.actions.act_window,name:account_budget.action_account_budget_report
#: model:ir.actions.report.xml,name:account_budget.report_crossovered_budget
#: model:ir.ui.menu,name:account_budget.menu_act_crossovered_budget_view
#: model:ir.ui.menu,name:account_budget.menu_action_account_budget_post_tree
#: model:ir.ui.menu,name:account_budget.next_id_31
#: model:ir.ui.menu,name:account_budget.next_id_pos
msgid "Budgets"
msgstr ""
#. module: account_budget
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr ""
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Cancelled"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
msgid "Approve"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,date_from:0
#: field:crossovered.budget.lines,date_from:0
msgid "Start Date"
msgstr ""
#. module: account_budget
#: view:account.budget.post:0
#: field:crossovered.budget.lines,general_budget_id:0
#: model:ir.model,name:account_budget.model_account_budget_post
msgid "Budgetary Position"
msgstr ""
#. module: account_budget
#: field:account.budget.analytic,date_from:0
#: field:account.budget.crossvered.report,date_from:0
#: field:account.budget.crossvered.summary.report,date_from:0
#: field:account.budget.report,date_from:0
msgid "Start of period"
msgstr ""
#. module: account_budget
#: model:ir.model,name:account_budget.model_account_budget_crossvered_summary_report
msgid "Account Budget crossvered summary report"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Theoretical Amt"
msgstr ""
#. module: account_budget
#: view:account.budget.analytic:0
#: view:account.budget.crossvered.report:0
#: view:account.budget.crossvered.summary.report:0
#: view:account.budget.report:0
msgid "Select Dates Period"
msgstr ""
#. module: account_budget
#: view:account.budget.analytic:0
#: view:account.budget.crossvered.report:0
#: view:account.budget.crossvered.summary.report:0
#: view:account.budget.report:0
msgid "Print"
msgstr ""
#. module: account_budget
#: model:ir.module.module,description:account_budget.module_meta_information
msgid ""
"This module allows accountants to manage analytic and crossovered budgets.\n"
"\n"
"Once the Master Budgets and the Budgets are defined (in "
"Accounting/Budgets/),\n"
"the Project Managers can set the planned amount on each Analytic Account.\n"
"\n"
"The accountant has the possibility to see the total of amount planned for "
"each\n"
"Budget and Master Budget in order to ensure the total planned is not\n"
"greater/lower than what he planned for this Budget/Master Budget. Each list "
"of\n"
"record can also be switched to a graphical view of it.\n"
"\n"
"Three reports are available:\n"
" 1. The first is available from a list of Budgets. It gives the "
"spreading, for these Budgets, of the Analytic Accounts per Master Budgets.\n"
"\n"
" 2. The second is a summary of the previous one, it only gives the "
"spreading, for the selected Budgets, of the Analytic Accounts.\n"
"\n"
" 3. The last one is available from the Analytic Chart of Accounts. It "
"gives the spreading, for the selected Analytic Accounts, of the Master "
"Budgets per Budgets.\n"
"\n"
msgstr ""
#. module: account_budget
#: field:crossovered.budget.lines,analytic_account_id:0
#: model:ir.model,name:account_budget.model_account_analytic_account
msgid "Analytic Account"
msgstr ""
#. module: account_budget
#: report:account.budget:0
msgid "Budget :"
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Planned Amt"
msgstr ""
#. module: account_budget
#: view:account.budget.post:0
#: field:account.budget.post,account_ids:0
msgid "Accounts"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
#: field:account.analytic.account,crossovered_budget_line:0
#: view:account.budget.post:0
#: field:account.budget.post,crossovered_budget_line:0
#: view:crossovered.budget:0
#: field:crossovered.budget,crossovered_budget_line:0
#: view:crossovered.budget.lines:0
#: model:ir.actions.act_window,name:account_budget.act_account_analytic_account_cb_lines
#: model:ir.actions.act_window,name:account_budget.act_crossovered_budget_lines_view
#: model:ir.ui.menu,name:account_budget.menu_act_crossovered_budget_lines_view
msgid "Budget Lines"
msgstr ""
#. module: account_budget
#: view:account.budget.analytic:0
#: view:account.budget.crossvered.report:0
#: view:account.budget.crossvered.summary.report:0
#: view:account.budget.report:0
#: view:crossovered.budget:0
msgid "Cancel"
msgstr ""
#. module: account_budget
#: model:ir.module.module,shortdesc:account_budget.module_meta_information
msgid "Budget Management"
msgstr ""
#. module: account_budget
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr ""
#. module: account_budget
#: report:account.budget:0
#: report:crossovered.budget.report:0
msgid "Analysis from"
msgstr ""

View File

@ -0,0 +1,32 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:53+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_cancel
#: model:ir.module.module,description:account_cancel.module_meta_information
msgid ""
"\n"
" Module adds 'Allow cancelling entries' field on form view of account "
"journal. If set to true it allows user to cancel entries & invoices.\n"
" "
msgstr ""
#. module: account_cancel
#: model:ir.module.module,shortdesc:account_cancel.module_meta_information
msgid "Account Cancel"
msgstr ""

View File

@ -0,0 +1,28 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:54+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_chart
#: model:ir.module.module,description:account_chart.module_meta_information
msgid "Remove minimal account chart"
msgstr ""
#. module: account_chart
#: model:ir.module.module,shortdesc:account_chart.module_meta_information
msgid "Charts of Accounts"
msgstr ""

View File

@ -0,0 +1,259 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:54+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
#: field:account.coda.import,journal_id:0
msgid "Bank Journal"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda.import,note:0
msgid "Log"
msgstr ""
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda_import
msgid "Account Coda Import"
msgstr ""
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Group By..."
msgstr ""
#. module: account_coda
#: field:account.coda.import,awaiting_account:0
msgid "Default Account for Unrecognized Movement"
msgstr ""
#. module: account_coda
#: help:account.coda,date:0
msgid "Import Date"
msgstr ""
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Import"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Coda import"
msgstr ""
#. module: account_coda
#: code:addons/account_coda/account_coda.py:51
#, python-format
msgid "Coda file not found for bank statement !!"
msgstr ""
#. module: account_coda
#: help:account.coda.import,awaiting_account:0
msgid ""
"Set here the default account that will be used, if the partner is found but "
"does not have the bank account, or if he is domiciled"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,company_id:0
msgid "Company"
msgstr ""
#. module: account_coda
#: help:account.coda.import,def_payable:0
msgid ""
"Set here the payable account that will be used, by default, if the partner "
"is not found"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Search Coda"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,user_id:0
msgid "User"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,date:0
msgid "Date"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_statement
msgid "Coda Import Logs"
msgstr ""
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr ""
#. module: account_coda
#: field:account.coda.import,def_payable:0
msgid "Default Payable Account"
msgstr ""
#. module: account_coda
#: help:account.coda,name:0
msgid "Store the detail of bank statements"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Cancel"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Open Statements"
msgstr ""
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:167
#, python-format
msgid "The bank account %s is not defined for the partner %s.\n"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_import
msgid "Import Coda Statements"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
#: model:ir.actions.act_window,name:account_coda.action_account_coda_import
msgid "Import Coda Statement"
msgstr ""
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
msgid ""
"\n"
" Module provides functionality to import\n"
" bank statements from coda files.\n"
" "
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Statements"
msgstr ""
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Results :"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Result of Imported Coda Statements"
msgstr ""
#. module: account_coda
#: help:account.coda.import,def_receivable:0
msgid ""
"Set here the receivable account that will be used, by default, if the "
"partner is not found"
msgstr ""
#. module: account_coda
#: field:account.coda.import,coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
msgid "Coda File"
msgstr ""
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_bank_statement
msgid "Bank Statement"
msgstr ""
#. module: account_coda
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda Logs"
msgstr ""
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:311
#, python-format
msgid "Result"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Click on 'New' to select your file :"
msgstr ""
#. module: account_coda
#: field:account.coda.import,def_receivable:0
msgid "Default Receivable Account"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Close"
msgstr ""
#. module: account_coda
#: field:account.coda,statement_ids:0
msgid "Generated Bank Statements"
msgstr ""
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA - import bank statements from coda file"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Configure Your Journal and Account :"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Coda Import"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,journal_id:0
msgid "Journal"
msgstr ""

View File

@ -0,0 +1,718 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:48+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_followup
#: code:addons/account_followup/wizard/account_followup_print.py:295
#, python-format
msgid "Followup Summary"
msgstr ""
#. module: account_followup
#: view:account_followup.followup:0
msgid "Search Followup"
msgstr ""
#. module: account_followup
#: model:ir.module.module,description:account_followup.module_meta_information
msgid ""
"\n"
" Modules to automate letters for unpaid invoices, with multi-level "
"recalls.\n"
"\n"
" You can define your multiple levels of recall through the menu:\n"
" Accounting/Configuration/Miscellaneous/Follow-Ups\n"
"\n"
" Once it is defined, you can automatically print recalls every day\n"
" through simply clicking on the menu:\n"
" Accounting/Periodical Processing/Billing/Send followups\n"
"\n"
" It will generate a PDF with all the letters according to the the\n"
" different levels of recall defined. You can define different policies\n"
" for different companies. You can also send mail to the customer.\n"
"\n"
" Note that if you want to change the followup level for a given "
"partner/account entry, you can do from in the menu:\n"
" Accounting/Reporting/Generic Reporting/Partner Accounts/Follow-ups "
"Sent\n"
"\n"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
msgid "Group By..."
msgstr ""
#. module: account_followup
#: code:addons/account_followup/wizard/account_followup_print.py:290
#, python-format
msgid ""
"\n"
"\n"
"E-Mail sent to following Partners successfully. !\n"
"\n"
"%s"
msgstr ""
#. module: account_followup
#: view:account_followup.followup:0
#: field:account_followup.followup,followup_line:0
msgid "Follow-Up"
msgstr ""
#. module: account_followup
#: field:account_followup.followup,company_id:0
#: view:account_followup.stat:0
#: field:account_followup.stat,company_id:0
#: field:account_followup.stat.by.partner,company_id:0
msgid "Company"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Invoice Date"
msgstr ""
#. module: account_followup
#: field:account.followup.print.all,email_subject:0
msgid "Email Subject"
msgstr ""
#. module: account_followup
#: model:ir.actions.act_window,help:account_followup.action_followup_stat
msgid ""
"Follow up on the reminders sent over to your partners for unpaid invoices."
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
#: view:account_followup.followup.line:0
msgid "Legend"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "Ok"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "Select Partners to Remind"
msgstr ""
#. module: account_followup
#: constraint:account.move.line:0
msgid "You can not create move line on closed account."
msgstr ""
#. module: account_followup
#: field:account.followup.print,date:0
msgid "Follow-up Sending Date"
msgstr ""
#. module: account_followup
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr ""
#. module: account_followup
#: selection:account_followup.followup.line,start:0
msgid "Net Days"
msgstr ""
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.action_account_followup_definition_form
#: model:ir.ui.menu,name:account_followup.account_followup_menu
msgid "Follow-Ups"
msgstr ""
#. module: account_followup
#: view:account_followup.stat.by.partner:0
msgid "Balance > 0"
msgstr ""
#. module: account_followup
#: view:account.move.line:0
msgid "Total debit"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "%(heading)s: Move line header"
msgstr ""
#. module: account_followup
#: view:res.company:0
#: field:res.company,follow_up_msg:0
msgid "Follow-up Message"
msgstr ""
#. module: account_followup
#: field:account.followup.print,followup_id:0
msgid "Follow-up"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "VAT:"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
#: field:account_followup.stat,partner_id:0
#: field:account_followup.stat.by.partner,partner_id:0
msgid "Partner"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Date :"
msgstr ""
#. module: account_followup
#: field:account.followup.print.all,partner_ids:0
msgid "Partners"
msgstr ""
#. module: account_followup
#: code:addons/account_followup/wizard/account_followup_print.py:138
#, python-format
msgid "Invoices Reminder"
msgstr ""
#. module: account_followup
#: model:ir.model,name:account_followup.model_account_followup_followup
msgid "Account Follow Up"
msgstr ""
#. module: account_followup
#: selection:account_followup.followup.line,start:0
msgid "End of Month"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
msgid "Not Litigation"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "%(user_signature)s: User name"
msgstr ""
#. module: account_followup
#: field:account_followup.stat,debit:0
msgid "Debit"
msgstr ""
#. module: account_followup
#: view:account.followup.print:0
msgid ""
"This feature allows you to send reminders to partners with pending invoices. "
"You can send them the default message for unpaid invoices or manually enter "
"a message should you need to remind them of a specific information."
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Ref"
msgstr ""
#. module: account_followup
#: help:account_followup.followup.line,sequence:0
msgid "Gives the sequence order when displaying a list of follow-up lines."
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
#: field:account.followup.print.all,email_body:0
msgid "Email body"
msgstr ""
#. module: account_followup
#: field:account.move.line,followup_line_id:0
msgid "Follow-up Level"
msgstr ""
#. module: account_followup
#: field:account_followup.stat,date_followup:0
#: field:account_followup.stat.by.partner,date_followup:0
msgid "Latest followup"
msgstr ""
#. module: account_followup
#: model:account_followup.followup.line,description:account_followup.demo_followup_line2
msgid ""
"\n"
"Dear %(partner_name)s,\n"
"\n"
"We are disappointed to see that despite sending a reminder, that your "
"account is now seriously overdue.\n"
"\n"
"It is essential that immediate payment is made, otherwise we will have to "
"consider placing a stop on your account which means that we will no longer "
"be able to supply your company with (goods/services).\n"
"Please, take appropriate measures in order to carry out this payment in the "
"next 8 days\n"
"\n"
"If there is a problem with paying invoice that we are not aware of, do not "
"hesitate to contact our accounting department at (+32).10.68.94.39. so that "
"we can resolve the matter quickly.\n"
"\n"
"Details of due payments is printed below.\n"
"\n"
"Best Regards,\n"
msgstr ""
#. module: account_followup
#: field:account.followup.print.all,partner_lang:0
msgid "Send Email in Partner Language"
msgstr ""
#. module: account_followup
#: constraint:account.move.line:0
msgid ""
"You can not create move line on receivable/payable account without partner"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "Partner Selection"
msgstr ""
#. module: account_followup
#: field:account_followup.followup.line,description:0
msgid "Printed Message"
msgstr ""
#. module: account_followup
#: view:account.followup.print:0
#: view:account.followup.print.all:0
#: model:ir.actions.act_window,name:account_followup.action_account_followup_print
#: model:ir.actions.act_window,name:account_followup.action_account_followup_print_all
#: model:ir.ui.menu,name:account_followup.account_followup_print_menu
msgid "Send followups"
msgstr ""
#. module: account_followup
#: view:account_followup.stat.by.partner:0
msgid "Partner to Remind"
msgstr ""
#. module: account_followup
#: field:account_followup.followup.line,followup_id:0
#: field:account_followup.stat,followup_id:0
msgid "Follow Ups"
msgstr ""
#. module: account_followup
#: model:account_followup.followup.line,description:account_followup.demo_followup_line1
msgid ""
"\n"
"Dear %(partner_name)s,\n"
"\n"
"Exception made if there was a mistake of ours, it seems that the following "
"amount staid unpaid. Please, take appropriate measures in order to carry out "
"this payment in the next 8 days.\n"
"\n"
"Would your payment have been carried out after this mail was sent, please "
"consider the present one as void. Do not hesitate to contact our accounting "
"department at (+32).10.68.94.39.\n"
"\n"
"Best Regards,\n"
msgstr ""
#. module: account_followup
#: model:account_followup.followup.line,description:account_followup.demo_followup_line3
msgid ""
"\n"
"Dear %(partner_name)s,\n"
"\n"
"Despite several reminders, your account is still not settled.\n"
"\n"
"Unless full payment is made in next 8 days , then legal action for the "
"recovery of the debt, will be taken without further notice.\n"
"\n"
"I trust that this action will prove unnecessary and details of due payments "
"is printed below.\n"
"\n"
"In case of any queries concerning this matter, do not hesitate to contact "
"our accounting department at (+32).10.68.94.39.\n"
"\n"
"Best Regards,\n"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "Send Mails"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Currency"
msgstr ""
#. module: account_followup
#: model:ir.model,name:account_followup.model_account_followup_stat_by_partner
msgid "Followup Statistics by Partner"
msgstr ""
#. module: account_followup
#: model:ir.module.module,shortdesc:account_followup.module_meta_information
msgid "Accounting follow-ups management"
msgstr ""
#. module: account_followup
#: field:account_followup.stat,blocked:0
msgid "Blocked"
msgstr ""
#. module: account_followup
#: help:account.followup.print,date:0
msgid ""
"This field allow you to select a forecast date to plan your follow-ups"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Due"
msgstr ""
#. module: account_followup
#: code:addons/account_followup/wizard/account_followup_print.py:56
#, python-format
msgid "Select Partners"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "Email Settings"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "Print Follow Ups"
msgstr ""
#. module: account_followup
#: field:account.move.line,followup_date:0
msgid "Latest Follow-up"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Sub-Total:"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Balance:"
msgstr ""
#. module: account_followup
#: model:ir.model,name:account_followup.model_account_followup_stat
msgid "Followup Statistics"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Paid"
msgstr ""
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "%(user_signature)s: User Name"
msgstr ""
#. module: account_followup
#: model:ir.model,name:account_followup.model_account_move_line
msgid "Journal Items"
msgstr ""
#. module: account_followup
#: constraint:account.move.line:0
msgid "Company must be same for its related account and period."
msgstr ""
#. module: account_followup
#: field:account.followup.print.all,email_conf:0
msgid "Send email confirmation"
msgstr ""
#. module: account_followup
#: code:addons/account_followup/wizard/account_followup_print.py:287
#, python-format
msgid ""
"All E-mails have been successfully sent to Partners:.\n"
"\n"
"%s"
msgstr ""
#. module: account_followup
#: constraint:res.company:0
msgid "Error! You can not create recursive companies."
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "%(company_name)s: User's Company name"
msgstr ""
#. module: account_followup
#: model:ir.model,name:account_followup.model_res_company
msgid "Companies"
msgstr ""
#. module: account_followup
#: view:account_followup.followup:0
msgid "Followup Lines"
msgstr ""
#. module: account_followup
#: field:account_followup.stat,credit:0
msgid "Credit"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Maturity Date"
msgstr ""
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "%(partner_name)s: Partner Name"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
msgid "Follow-Up lines"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "%(company_currency)s: User's Company Currency"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
#: field:account_followup.stat,balance:0
#: field:account_followup.stat.by.partner,balance:0
msgid "Balance"
msgstr ""
#. module: account_followup
#: field:account_followup.followup.line,start:0
msgid "Type of Term"
msgstr ""
#. module: account_followup
#: model:ir.model,name:account_followup.model_account_followup_print
#: model:ir.model,name:account_followup.model_account_followup_print_all
msgid "Print Followup & Send Mail to Customers"
msgstr ""
#. module: account_followup
#: field:account_followup.stat,date_move_last:0
#: field:account_followup.stat.by.partner,date_move_last:0
msgid "Last move"
msgstr ""
#. module: account_followup
#: model:ir.actions.report.xml,name:account_followup.account_followup_followup_report
msgid "Followup Report"
msgstr ""
#. module: account_followup
#: field:account_followup.stat,period_id:0
msgid "Period"
msgstr ""
#. module: account_followup
#: view:account.followup.print:0
#: view:account.followup.print.all:0
msgid "Cancel"
msgstr ""
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "Follow-Up Lines"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
msgid "Litigation"
msgstr ""
#. module: account_followup
#: field:account_followup.stat.by.partner,max_followup_id:0
msgid "Max Follow Up Level"
msgstr ""
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.act_account_partner_account_move_payable_all
msgid "Payable Items"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "%(followup_amount)s: Total Amount Due"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
#: view:account_followup.followup.line:0
msgid "%(date)s: Current Date"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
msgid "Followup Level"
msgstr ""
#. module: account_followup
#: view:account_followup.followup:0
#: field:account_followup.followup,description:0
#: report:account_followup.followup.print:0
msgid "Description"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
msgid "This Fiscal year"
msgstr ""
#. module: account_followup
#: view:account.move.line:0
msgid "Partner entries"
msgstr ""
#. module: account_followup
#: help:account.followup.print.all,partner_lang:0
msgid ""
"Do not change message text, if you want to send email in partner language, "
"or configure from company"
msgstr ""
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.act_account_partner_account_move_all
msgid "Receivable Items"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
#: model:ir.actions.act_window,name:account_followup.action_followup_stat
#: model:ir.ui.menu,name:account_followup.menu_action_followup_stat_follow
msgid "Follow-ups Sent"
msgstr ""
#. module: account_followup
#: field:account_followup.followup,name:0
#: field:account_followup.followup.line,name:0
msgid "Name"
msgstr ""
#. module: account_followup
#: field:account_followup.stat,date_move:0
#: field:account_followup.stat.by.partner,date_move:0
msgid "First move"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Li."
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Maturity"
msgstr ""
#. module: account_followup
#: code:addons/account_followup/wizard/account_followup_print.py:289
#, python-format
msgid ""
"E-Mail not sent to following Partners, Email not available !\n"
"\n"
"%s"
msgstr ""
#. module: account_followup
#: view:account.followup.print:0
msgid "Continue"
msgstr ""
#. module: account_followup
#: field:account_followup.followup.line,delay:0
msgid "Days of delay"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Document : Customer account statement"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
#: field:account.followup.print.all,summary:0
msgid "Summary"
msgstr ""
#. module: account_followup
#: view:account.move.line:0
msgid "Total credit"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "%(line)s: Ledger Posting lines"
msgstr ""
#. module: account_followup
#: field:account_followup.followup.line,sequence:0
msgid "Sequence"
msgstr ""
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "%(company_name)s: User's Company Name"
msgstr ""
#. module: account_followup
#: report:account_followup.followup.print:0
msgid "Customer Ref :"
msgstr ""
#. module: account_followup
#: view:account.followup.print.all:0
msgid "%(partner_name)s: Partner name"
msgstr ""
#. module: account_followup
#: view:account_followup.stat:0
msgid "Latest Followup Date"
msgstr ""
#. module: account_followup
#: model:ir.model,name:account_followup.model_account_followup_followup_line
msgid "Follow-Up Criteria"
msgstr ""
#. module: account_followup
#: constraint:account.move.line:0
msgid "You can not create move line on view account."
msgstr ""

View File

@ -0,0 +1,366 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Sub Total"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Note:"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Cancelled Invoice"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
#: field:notify.message,name:0
msgid "Title"
msgstr ""
#. module: account_invoice_layout
#: model:ir.actions.act_window,name:account_invoice_layout.action_account_invoice_special_msg
#: model:ir.actions.report.xml,name:account_invoice_layout.account_invoices_layout_message
msgid "Invoices with Layout and Message"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Disc. (%)"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Note"
msgstr ""
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_notify_message
msgid "Notify By Messages"
msgstr ""
#. module: account_invoice_layout
#: help:notify.message,msg:0
msgid ""
"This notification will appear at the bottom of the Invoices when printed."
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Unit Price"
msgstr ""
#. module: account_invoice_layout
#: model:ir.module.module,description:account_invoice_layout.module_meta_information
msgid ""
"\n"
" This module provides some features to improve the layout of the "
"invoices.\n"
"\n"
" It gives you the possibility to\n"
" * order all the lines of an invoice\n"
" * add titles, comment lines, sub total lines\n"
" * draw horizontal lines and put page breaks\n"
"\n"
" Moreover, there is one option which allows you to print all the selected "
"invoices with a given special message at the bottom of it. This feature can "
"be very useful for printing your invoices with end-of-year wishes, special "
"punctual conditions...\n"
"\n"
" "
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "VAT :"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Tel. :"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "PRO-FORMA"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice,abstract_line_ids:0
msgid "Invoice Lines"
msgstr ""
#. module: account_invoice_layout
#: view:account.invoice.line:0
msgid "Seq."
msgstr ""
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_finan_config_notify_message
msgid "Notification Message"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Product"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Description"
msgstr ""
#. module: account_invoice_layout
#: help:account.invoice.line,sequence:0
msgid "Gives the sequence order when displaying a list of invoice lines."
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Price"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Invoice Date"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
msgid "Taxes:"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.line,functional_field:0
msgid "Source Account"
msgstr ""
#. module: account_invoice_layout
#: model:ir.actions.act_window,name:account_invoice_layout.notify_mesage_tree_form
msgid "Write Messages"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Base"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Page Break"
msgstr ""
#. module: account_invoice_layout
#: view:notify.message:0
#: field:notify.message,msg:0
msgid "Special Message"
msgstr ""
#. module: account_invoice_layout
#: help:account.invoice.special.msg,message:0
msgid "Message to Print at the bottom of report"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Quantity"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Refund"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Fax :"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
msgid "Total:"
msgstr ""
#. module: account_invoice_layout
#: view:account.invoice.special.msg:0
msgid "Select Message"
msgstr ""
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Messages"
msgstr ""
#. module: account_invoice_layout
#: model:ir.actions.report.xml,name:account_invoice_layout.account_invoices_1
msgid "Invoices with Layout"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Description / Taxes"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Amount"
msgstr ""
#. module: account_invoice_layout
#: model:notify.message,msg:account_invoice_layout.demo_message1
msgid "ERP & CRM Solutions..."
msgstr ""
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Net Total :"
msgstr ""
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Total :"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Draft Invoice"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.line,sequence:0
msgid "Sequence Number"
msgstr ""
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_account_invoice_special_msg
msgid "Account Invoice Special Message"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Origin"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.line,state:0
msgid "Type"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Separator Line"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Your Reference"
msgstr ""
#. module: account_invoice_layout
#: model:ir.module.module,shortdesc:account_invoice_layout.module_meta_information
msgid "Invoices Layout Improvement"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Supplier Invoice"
msgstr ""
#. module: account_invoice_layout
#: view:account.invoice.special.msg:0
msgid "Print"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Tax"
msgstr ""
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_account_invoice_line
msgid "Invoice Line"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
msgid "Net Total:"
msgstr ""
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Write a notification or a wishful message."
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: model:ir.model,name:account_invoice_layout.model_account_invoice
#: report:notify_account.invoice:0
msgid "Invoice"
msgstr ""
#. module: account_invoice_layout
#: view:account.invoice.special.msg:0
msgid "Cancel"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Supplier Refund"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.special.msg,message:0
msgid "Message"
msgstr ""
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Taxes :"
msgstr ""
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_notify_mesage_tree_form
msgid "All Notification Messages"
msgstr ""

View File

@ -0,0 +1,714 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_payment
#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
#. module: account_payment
#: field:payment.line,currency:0
msgid "Partner Currency"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Set to draft"
msgstr ""
#. module: account_payment
#: help:payment.order,mode:0
msgid "Select the Payment Mode to be applied."
msgstr ""
#. module: account_payment
#: view:payment.mode:0
#: view:payment.order:0
msgid "Group By..."
msgstr ""
#. module: account_payment
#: model:ir.module.module,description:account_payment.module_meta_information
msgid ""
"\n"
"This module provides :\n"
"* a more efficient way to manage invoice payment.\n"
"* a basic mechanism to easily plug various automated payment.\n"
" "
msgstr ""
#. module: account_payment
#: field:payment.order,line_ids:0
msgid "Payment lines"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: field:payment.line,info_owner:0
#: view:payment.order:0
msgid "Owner Account"
msgstr ""
#. module: account_payment
#: help:payment.order,state:0
msgid ""
"When an order is placed the state is 'Draft'.\n"
" Once the bank is confirmed the state is set to 'Confirmed'.\n"
" Then the order is paid the state is 'Done'."
msgstr ""
#. module: account_payment
#: help:account.invoice,amount_to_pay:0
msgid ""
"The amount which should be paid at the current date\n"
"minus the amount which is already in payment order"
msgstr ""
#. module: account_payment
#: field:payment.mode,company_id:0
msgid "Company"
msgstr ""
#. module: account_payment
#: field:payment.order,date_prefered:0
msgid "Preferred date"
msgstr ""
#. module: account_payment
#: selection:payment.line,state:0
msgid "Free"
msgstr ""
#. module: account_payment
#: field:payment.order.create,entries:0
msgid "Entries"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Used Account"
msgstr ""
#. module: account_payment
#: field:payment.line,ml_maturity_date:0
#: field:payment.order.create,duedate:0
msgid "Due Date"
msgstr ""
#. module: account_payment
#: constraint:account.move.line:0
msgid "You can not create move line on closed account."
msgstr ""
#. module: account_payment
#: view:account.move.line:0
msgid "Account Entry Line"
msgstr ""
#. module: account_payment
#: view:payment.order.create:0
msgid "_Add to payment order"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_account_payment_populate_statement
#: model:ir.actions.act_window,name:account_payment.action_account_populate_statement_confirm
msgid "Payment Populate statement"
msgstr ""
#. module: account_payment
#: report:payment.order:0
#: view:payment.order:0
msgid "Amount"
msgstr ""
#. module: account_payment
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Total in Company Currency"
msgstr ""
#. module: account_payment
#: selection:payment.order,state:0
msgid "Cancelled"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree_new
msgid "New Payment Order"
msgstr ""
#. module: account_payment
#: report:payment.order:0
#: field:payment.order,reference:0
msgid "Reference"
msgstr ""
#. module: account_payment
#: sql_constraint:payment.line:0
msgid "The payment line name must be unique!"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree
#: model:ir.ui.menu,name:account_payment.menu_action_payment_order_form
msgid "Payment Orders"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Directly"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_line_form
#: model:ir.model,name:account_payment.model_payment_line
#: view:payment.line:0
#: view:payment.order:0
msgid "Payment Line"
msgstr ""
#. module: account_payment
#: view:payment.line:0
msgid "Amount Total"
msgstr ""
#. module: account_payment
#: view:payment.order:0
#: selection:payment.order,state:0
msgid "Confirmed"
msgstr ""
#. module: account_payment
#: help:payment.line,ml_date_created:0
msgid "Invoice Effective Date"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Execution Type"
msgstr ""
#. module: account_payment
#: selection:payment.line,state:0
msgid "Structured"
msgstr ""
#. module: account_payment
#: view:payment.order:0
#: field:payment.order,state:0
msgid "State"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Transaction Information"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_mode_form
#: model:ir.model,name:account_payment.model_payment_mode
#: model:ir.ui.menu,name:account_payment.menu_action_payment_mode_form
#: view:payment.mode:0
#: view:payment.order:0
msgid "Payment Mode"
msgstr ""
#. module: account_payment
#: field:payment.line,ml_date_created:0
msgid "Effective Date"
msgstr ""
#. module: account_payment
#: field:payment.line,ml_inv_ref:0
msgid "Invoice Ref."
msgstr ""
#. module: account_payment
#: help:payment.order,date_prefered:0
msgid ""
"Choose an option for the Payment Order:'Fixed' stands for a date specified "
"by you.'Directly' stands for the direct execution.'Due date' stands for the "
"scheduled date of execution."
msgstr ""
#. module: account_payment
#: code:addons/account_payment/account_move_line.py:110
#, python-format
msgid "Error !"
msgstr ""
#. module: account_payment
#: view:account.move.line:0
msgid "Total debit"
msgstr ""
#. module: account_payment
#: field:payment.order,date_done:0
msgid "Execution date"
msgstr ""
#. module: account_payment
#: help:payment.mode,journal:0
msgid "Bank or Cash Journal for the Payment Mode"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Fixed date"
msgstr ""
#. module: account_payment
#: field:payment.line,info_partner:0
#: view:payment.order:0
msgid "Destination Account"
msgstr ""
#. module: account_payment
#: view:payment.line:0
msgid "Desitination Account"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Search Payment Orders"
msgstr ""
#. module: account_payment
#: constraint:account.move.line:0
msgid ""
"You can not create move line on receivable/payable account without partner"
msgstr ""
#. module: account_payment
#: field:payment.line,create_date:0
msgid "Created"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Select Invoices to Pay"
msgstr ""
#. module: account_payment
#: view:payment.line:0
msgid "Currency Amount Total"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Make Payments"
msgstr ""
#. module: account_payment
#: field:payment.line,state:0
msgid "Communication Type"
msgstr ""
#. module: account_payment
#: model:ir.module.module,shortdesc:account_payment.module_meta_information
msgid "Payment Management"
msgstr ""
#. module: account_payment
#: field:payment.line,bank_statement_line_id:0
msgid "Bank statement line"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Due date"
msgstr ""
#. module: account_payment
#: field:account.invoice,amount_to_pay:0
msgid "Amount to be paid"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Currency"
msgstr ""
#. module: account_payment
#: view:account.payment.make.payment:0
msgid "Yes"
msgstr ""
#. module: account_payment
#: help:payment.line,info_owner:0
msgid "Address of the Main Partner"
msgstr ""
#. module: account_payment
#: help:payment.line,date:0
msgid ""
"If no payment date is specified, the bank will treat this payment line "
"directly"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_payment_populate_statement
msgid "Account Payment Populate Statement"
msgstr ""
#. module: account_payment
#: help:payment.mode,name:0
msgid "Mode of Payment"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Value Date"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Payment Type"
msgstr ""
#. module: account_payment
#: help:payment.line,amount_currency:0
msgid "Payment amount in the partner currency"
msgstr ""
#. module: account_payment
#: view:payment.order:0
#: selection:payment.order,state:0
msgid "Draft"
msgstr ""
#. module: account_payment
#: help:payment.line,communication2:0
msgid "The successor message of Communication."
msgstr ""
#. module: account_payment
#: code:addons/account_payment/account_move_line.py:110
#, python-format
msgid "No partner defined on entry line"
msgstr ""
#. module: account_payment
#: help:payment.line,info_partner:0
msgid "Address of the Ordering Customer."
msgstr ""
#. module: account_payment
#: view:account.payment.populate.statement:0
msgid "Populate Statement:"
msgstr ""
#. module: account_payment
#: view:account.move.line:0
msgid "Total credit"
msgstr ""
#. module: account_payment
#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
#. module: account_payment
#: field:payment.order,user_id:0
msgid "User"
msgstr ""
#. module: account_payment
#: field:account.payment.populate.statement,lines:0
#: model:ir.actions.act_window,name:account_payment.act_account_invoice_2_payment_line
msgid "Payment Lines"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_move_line
msgid "Journal Items"
msgstr ""
#. module: account_payment
#: constraint:account.move.line:0
msgid "Company must be same for its related account and period."
msgstr ""
#. module: account_payment
#: help:payment.line,move_line_id:0
msgid ""
"This Entry Line will be referred for the information of the ordering "
"customer."
msgstr ""
#. module: account_payment
#: view:payment.order.create:0
msgid "Search"
msgstr ""
#. module: account_payment
#: model:ir.actions.report.xml,name:account_payment.payment_order1
#: model:ir.model,name:account_payment.model_payment_order
msgid "Payment Order"
msgstr ""
#. module: account_payment
#: field:payment.line,date:0
msgid "Payment Date"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Total:"
msgstr ""
#. module: account_payment
#: field:payment.order,date_created:0
msgid "Creation date"
msgstr ""
#. module: account_payment
#: view:account.payment.populate.statement:0
msgid "ADD"
msgstr ""
#. module: account_payment
#: view:account.bank.statement:0
msgid "Import payment lines"
msgstr ""
#. module: account_payment
#: field:account.move.line,amount_to_pay:0
msgid "Amount to pay"
msgstr ""
#. module: account_payment
#: field:payment.line,amount:0
msgid "Amount in Company Currency"
msgstr ""
#. module: account_payment
#: help:payment.line,partner_id:0
msgid "The Ordering Customer"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_payment_make_payment
msgid "Account make payment"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Invoice Ref"
msgstr ""
#. module: account_payment
#: field:payment.line,name:0
msgid "Your Reference"
msgstr ""
#. module: account_payment
#: field:payment.order,mode:0
msgid "Payment mode"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Payment order"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "General Information"
msgstr ""
#. module: account_payment
#: view:payment.order:0
#: selection:payment.order,state:0
msgid "Done"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_invoice
msgid "Invoice"
msgstr ""
#. module: account_payment
#: field:payment.line,communication:0
msgid "Communication"
msgstr ""
#. module: account_payment
#: view:account.payment.make.payment:0
#: view:account.payment.populate.statement:0
#: view:payment.order:0
#: view:payment.order.create:0
msgid "Cancel"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Information"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,help:account_payment.action_payment_order_tree
msgid ""
"A payment order is a payment request from your company to pay a supplier "
"invoice or a customer credit note. Here you can register all payment orders "
"that should be done, keep track of all payment orders and mention the "
"invoice reference and the partner the payment should be done for."
msgstr ""
#. module: account_payment
#: help:payment.line,amount:0
msgid "Payment amount in the company currency"
msgstr ""
#. module: account_payment
#: view:payment.order.create:0
msgid "Search Payment lines"
msgstr ""
#. module: account_payment
#: field:payment.line,amount_currency:0
msgid "Amount in Partner Currency"
msgstr ""
#. module: account_payment
#: field:payment.line,communication2:0
msgid "Communication 2"
msgstr ""
#. module: account_payment
#: field:payment.line,bank_id:0
msgid "Destination Bank account"
msgstr ""
#. module: account_payment
#: view:account.payment.make.payment:0
msgid "Are you sure you want to make payment?"
msgstr ""
#. module: account_payment
#: view:payment.mode:0
#: field:payment.mode,journal:0
msgid "Journal"
msgstr ""
#. module: account_payment
#: field:payment.mode,bank_id:0
msgid "Bank account"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Confirm Payments"
msgstr ""
#. module: account_payment
#: field:payment.line,company_currency:0
#: report:payment.order:0
msgid "Company Currency"
msgstr ""
#. module: account_payment
#: model:ir.ui.menu,name:account_payment.menu_main_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Payment"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Payment Order / Payment"
msgstr ""
#. module: account_payment
#: field:payment.line,move_line_id:0
msgid "Entry line"
msgstr ""
#. module: account_payment
#: help:payment.line,communication:0
msgid ""
"Used as the message between ordering customer and current company. Depicts "
"'What do you want to say to the recipient about this order ?'"
msgstr ""
#. module: account_payment
#: field:payment.mode,name:0
msgid "Name"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Bank Account"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Entry Information"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_payment_order_create
msgid "payment.order.create"
msgstr ""
#. module: account_payment
#: field:payment.line,order_id:0
msgid "Order"
msgstr ""
#. module: account_payment
#: field:payment.order,total:0
msgid "Total"
msgstr ""
#. module: account_payment
#: view:account.payment.make.payment:0
#: model:ir.actions.act_window,name:account_payment.action_account_payment_make_payment
msgid "Make Payment"
msgstr ""
#. module: account_payment
#: field:payment.line,partner_id:0
#: report:payment.order:0
msgid "Partner"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_create_payment_order
msgid "Populate Payment"
msgstr ""
#. module: account_payment
#: help:payment.mode,bank_id:0
msgid "Bank Account for the Payment Mode"
msgstr ""
#. module: account_payment
#: constraint:account.move.line:0
msgid "You can not create move line on view account."
msgstr ""

View File

@ -0,0 +1,221 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 16:58+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: account_sequence
#: view:account.sequence.installer:0
#: model:ir.actions.act_window,name:account_sequence.action_account_seq_installer
msgid "Account Sequence Application Configuration"
msgstr ""
#. module: account_sequence
#: constraint:account.move:0
msgid ""
"You cannot create entries on different periods/journals in the same move"
msgstr ""
#. module: account_sequence
#: help:account.move,internal_sequence_number:0
#: help:account.move.line,internal_sequence_number:0
msgid "Internal Sequence Number"
msgstr ""
#. module: account_sequence
#: help:account.sequence.installer,number_next:0
msgid "Next number of this sequence"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,number_next:0
msgid "Next Number"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,number_increment:0
msgid "Increment Number"
msgstr ""
#. module: account_sequence
#: model:ir.module.module,description:account_sequence.module_meta_information
msgid ""
"\n"
" This module maintains internal sequence number for accounting entries.\n"
" "
msgstr ""
#. module: account_sequence
#: model:ir.module.module,shortdesc:account_sequence.module_meta_information
msgid "Entries Sequence Numbering"
msgstr ""
#. module: account_sequence
#: help:account.sequence.installer,number_increment:0
msgid "The next number of the sequence will be incremented by this number"
msgstr ""
#. module: account_sequence
#: view:account.sequence.installer:0
msgid "Configure Your Account Sequence Application"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,progress:0
msgid "Configuration Progress"
msgstr ""
#. module: account_sequence
#: help:account.sequence.installer,suffix:0
msgid "Suffix value of the record for the sequence"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,company_id:0
msgid "Company"
msgstr ""
#. module: account_sequence
#: help:account.journal,internal_sequence_id:0
msgid ""
"This sequence will be used to maintain the internal number for the journal "
"entries related to this journal."
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,padding:0
msgid "Number padding"
msgstr ""
#. module: account_sequence
#: model:ir.model,name:account_sequence.model_account_move_line
msgid "Journal Items"
msgstr ""
#. module: account_sequence
#: field:account.move,internal_sequence_number:0
#: field:account.move.line,internal_sequence_number:0
msgid "Internal Number"
msgstr ""
#. module: account_sequence
#: constraint:account.move.line:0
msgid "Company must be same for its related account and period."
msgstr ""
#. module: account_sequence
#: help:account.sequence.installer,padding:0
msgid ""
"OpenERP will automatically adds some '0' on the left of the 'Next Number' to "
"get the required padding size."
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,name:0
msgid "Name"
msgstr ""
#. module: account_sequence
#: constraint:account.move.line:0
msgid "You can not create move line on closed account."
msgstr ""
#. module: account_sequence
#: constraint:account.move:0
msgid ""
"You cannot create more than one move per period on centralized journal"
msgstr ""
#. module: account_sequence
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr ""
#. module: account_sequence
#: field:account.journal,internal_sequence_id:0
msgid "Internal Sequence"
msgstr ""
#. module: account_sequence
#: model:ir.model,name:account_sequence.model_account_sequence_installer
msgid "account.sequence.installer"
msgstr ""
#. module: account_sequence
#: view:account.sequence.installer:0
msgid "Configure"
msgstr ""
#. module: account_sequence
#: help:account.sequence.installer,prefix:0
msgid "Prefix value of the record for the sequence"
msgstr ""
#. module: account_sequence
#: model:ir.model,name:account_sequence.model_account_move
msgid "Account Entry"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,suffix:0
msgid "Suffix"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,config_logo:0
msgid "Image"
msgstr ""
#. module: account_sequence
#: view:account.sequence.installer:0
msgid "title"
msgstr ""
#. module: account_sequence
#: sql_constraint:account.journal:0
msgid "The name of the journal must be unique per company !"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,prefix:0
msgid "Prefix"
msgstr ""
#. module: account_sequence
#: sql_constraint:account.journal:0
msgid "The code of the journal must be unique per company !"
msgstr ""
#. module: account_sequence
#: constraint:account.move.line:0
msgid ""
"You can not create move line on receivable/payable account without partner"
msgstr ""
#. module: account_sequence
#: model:ir.model,name:account_sequence.model_account_journal
msgid "Journal"
msgstr ""
#. module: account_sequence
#: view:account.sequence.installer:0
msgid "You can enhance the Account Sequence Application by installing ."
msgstr ""
#. module: account_sequence
#: constraint:account.move.line:0
msgid "You can not create move line on view account."
msgstr ""

View File

@ -992,6 +992,7 @@ class account_voucher(osv.osv):
context = {}
move_line_obj = self.pool.get('account.move.line')
currency_obj = self.pool.get('res.currency')
tax_obj = self.pool.get('account.tax')
tot_line = line_total
rec_lst_ids = []

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@ class account_statement_from_invoice_lines(osv.osv_memory):
statement.currency.id, amount, context=ctx)
context.update({'move_line_ids': [line.id]})
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=line_date, context=context)
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, amount=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=line_date, context=context)
voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt'),
'name': line.name,
'partner_id': line.partner_id.id,

255
addons/analytic/i18n/fa.po Normal file
View File

@ -0,0 +1,255 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 17:01+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr ""
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
msgstr ""
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
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 ""
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Draft"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
msgstr ""
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
msgstr ""
#. 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 ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
msgstr ""
#. 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 ""
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
msgstr ""
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
msgstr ""
#. 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 ""
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr ""
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
msgstr ""
#. module: analytic
#: field:account.analytic.account,currency_id:0
msgid "Account currency"
msgstr ""
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
msgstr ""
#. module: analytic
#: help:account.analytic.line,amount:0
msgid ""
"Calculated by multiplying the quantity and the price given in the Product's "
"cost price. Always expressed in the company main currency."
msgstr ""
#. 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 ""
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
msgstr ""
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr ""
#. module: analytic
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
msgstr ""
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
msgstr ""
#. module: analytic
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr ""
#. module: analytic
#: help:account.analytic.account,type:0
msgid ""
"If you select the View Type, it means you won't allow to create journal "
"entries using that account."
msgstr ""
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
msgstr ""
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Account Code"
msgstr ""
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
msgstr ""
#. 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 ""
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
msgstr ""
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Partner"
msgstr ""
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
msgstr ""
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
msgstr ""

View File

@ -0,0 +1,95 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-03 16:56+0000\n"
"PO-Revision-Date: 2011-12-18 17:01+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: analytic_journal_billing_rate
#: model:ir.module.module,description:analytic_journal_billing_rate.module_meta_information
msgid ""
"\n"
"\n"
" This module allows you to define what is the default invoicing rate for "
"a specific journal on a given account. This is mostly used when a user "
"encodes his timesheet: the values are retrieved and the fields are auto-"
"filled... but the possibility to change these values is still available.\n"
"\n"
" Obviously if no data has been recorded for the current account, the "
"default value is given as usual by the account data so that this module is "
"perfectly compatible with older configurations.\n"
"\n"
" "
msgstr ""
#. module: analytic_journal_billing_rate
#: field:analytic_journal_rate_grid,journal_id:0
msgid "Analytic Journal"
msgstr ""
#. module: analytic_journal_billing_rate
#: model:ir.model,name:analytic_journal_billing_rate.model_account_invoice
msgid "Invoice"
msgstr ""
#. module: analytic_journal_billing_rate
#: view:analytic_journal_rate_grid:0
msgid "Billing Rate per Journal for this Analytic Account"
msgstr ""
#. module: analytic_journal_billing_rate
#: field:analytic_journal_rate_grid,account_id:0
#: model:ir.model,name:analytic_journal_billing_rate.model_account_analytic_account
msgid "Analytic Account"
msgstr ""
#. module: analytic_journal_billing_rate
#: model:ir.model,name:analytic_journal_billing_rate.model_analytic_journal_rate_grid
msgid "Relation table between journals and billing rates"
msgstr ""
#. module: analytic_journal_billing_rate
#: field:account.analytic.account,journal_rate_ids:0
msgid "Invoicing Rate per Journal"
msgstr ""
#. module: analytic_journal_billing_rate
#: model:ir.module.module,shortdesc:analytic_journal_billing_rate.module_meta_information
msgid ""
"Analytic Journal Billing Rate, Define the default invoicing rate for a "
"specific journal"
msgstr ""
#. module: analytic_journal_billing_rate
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr ""
#. module: analytic_journal_billing_rate
#: field:analytic_journal_rate_grid,rate_id:0
msgid "Invoicing Rate"
msgstr ""
#. module: analytic_journal_billing_rate
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr ""
#. module: analytic_journal_billing_rate
#: model:ir.model,name:analytic_journal_billing_rate.model_hr_analytic_timesheet
msgid "Timesheet Line"
msgstr ""

View File

@ -0,0 +1,103 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-03 16:56+0000\n"
"PO-Revision-Date: 2011-12-18 17:03+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: analytic_user_function
#: field:analytic_user_funct_grid,product_id:0
msgid "Product"
msgstr ""
#. module: analytic_user_function
#: code:addons/analytic_user_function/analytic_user_function.py:96
#: code:addons/analytic_user_function/analytic_user_function.py:131
#, python-format
msgid "Error !"
msgstr ""
#. module: analytic_user_function
#: model:ir.model,name:analytic_user_function.model_hr_analytic_timesheet
msgid "Timesheet Line"
msgstr ""
#. module: analytic_user_function
#: field:analytic_user_funct_grid,account_id:0
#: model:ir.model,name:analytic_user_function.model_account_analytic_account
msgid "Analytic Account"
msgstr ""
#. module: analytic_user_function
#: view:account.analytic.account:0
#: field:account.analytic.account,user_product_ids:0
msgid "Users/Products Rel."
msgstr ""
#. module: analytic_user_function
#: field:analytic_user_funct_grid,user_id:0
msgid "User"
msgstr ""
#. module: analytic_user_function
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr ""
#. module: analytic_user_function
#: code:addons/analytic_user_function/analytic_user_function.py:97
#: code:addons/analytic_user_function/analytic_user_function.py:132
#, python-format
msgid "There is no expense account define for this product: \"%s\" (id:%d)"
msgstr ""
#. module: analytic_user_function
#: model:ir.model,name:analytic_user_function.model_analytic_user_funct_grid
msgid "Relation table between users and products on a analytic account"
msgstr ""
#. module: analytic_user_function
#: model:ir.module.module,description:analytic_user_function.module_meta_information
msgid ""
"\n"
"\n"
" This module allows you to define what is the default function of a "
"specific user on a given account. This is mostly used when a user encodes "
"his timesheet: the values are retrieved and the fields are auto-filled... "
"but the possibility to change these values is still available.\n"
"\n"
" Obviously if no data has been recorded for the current account, the "
"default value is given as usual by the employee data so that this module is "
"perfectly compatible with older configurations.\n"
"\n"
" "
msgstr ""
#. module: analytic_user_function
#: model:ir.module.module,shortdesc:analytic_user_function.module_meta_information
msgid "Analytic User Function"
msgstr ""
#. module: analytic_user_function
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr ""
#. module: analytic_user_function
#: view:analytic_user_funct_grid:0
msgid "User's Product for this Analytic Account"
msgstr ""

View File

@ -0,0 +1,226 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 17:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard
msgid "ir.model.fields.anonymize.wizard"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,field_name:0
msgid "Field Name"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,field_id:0
msgid "Field"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization.history,state:0
#: field:ir.model.fields.anonymize.wizard,state:0
msgid "State"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_import:0
msgid "Import"
msgstr ""
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization
msgid "ir.model.fields.anonymization"
msgstr ""
#. module: anonymization
#: model:ir.module.module,shortdesc:anonymization.module_meta_information
msgid "Database anonymization module"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization.history,direction:0
msgid "Direction"
msgstr ""
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_tree
#: view:ir.model.fields.anonymization:0
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_fields
msgid "Anonymized Fields"
msgstr ""
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization
msgid "Database anonymization"
msgstr ""
#. module: anonymization
#: code:addons/anonymization/anonymization.py:55
#: sql_constraint:ir.model.fields.anonymization:0
#, python-format
msgid "You cannot have two records having the same model and the same field"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Anonymized"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,state:0
msgid "unknown"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,model_id:0
msgid "Object"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization.history,filepath:0
msgid "File path"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization.history,date:0
msgid "Date"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_export:0
msgid "Export"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Reverse the Database Anonymization"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Database Anonymization"
msgstr ""
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard
msgid "Anonymize database"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,field_ids:0
msgid "Fields"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Clear"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "clear -> anonymized"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
#: field:ir.model.fields.anonymize.wizard,summary:0
msgid "Summary"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymization:0
msgid "Anonymized Field"
msgstr ""
#. module: anonymization
#: model:ir.module.module,description:anonymization.module_meta_information
msgid ""
"\n"
"This module allows you to anonymize a database.\n"
" "
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Unstable"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Exception occured"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Not Existing"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,model_name:0
msgid "Object Name"
msgstr ""
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_history_tree
#: view:ir.model.fields.anonymization.history:0
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_history
msgid "Anonymization History"
msgstr ""
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history
msgid "ir.model.fields.anonymization.history"
msgstr ""
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymize_wizard
#: view:ir.model.fields.anonymize.wizard:0
msgid "Anonymize Database"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,name:0
msgid "File Name"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "anonymized -> clear"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Started"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Done"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,msg:0
#: field:ir.model.fields.anonymize.wizard,msg:0
msgid "Message"
msgstr ""

View File

@ -0,0 +1,135 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 19:41+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: association
#: field:profile.association.config.install_modules_wizard,wiki:0
msgid "Wiki"
msgstr ""
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Event Management"
msgstr ""
#. module: association
#: field:profile.association.config.install_modules_wizard,project_gtd:0
msgid "Getting Things Done"
msgstr ""
#. module: association
#: model:ir.module.module,description:association.module_meta_information
msgid "This module is to create Profile for Associates"
msgstr ""
#. module: association
#: field:profile.association.config.install_modules_wizard,progress:0
msgid "Configuration Progress"
msgstr ""
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid ""
"Here are specific applications related to the Association Profile you "
"selected."
msgstr ""
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "title"
msgstr ""
#. module: association
#: help:profile.association.config.install_modules_wizard,event_project:0
msgid "Helps you to manage and organize your events."
msgstr ""
#. module: association
#: field:profile.association.config.install_modules_wizard,config_logo:0
msgid "Image"
msgstr ""
#. module: association
#: help:profile.association.config.install_modules_wizard,hr_expense:0
msgid ""
"Tracks and manages employee expenses, and can automatically re-invoice "
"clients if the expenses are project-related."
msgstr ""
#. module: association
#: help:profile.association.config.install_modules_wizard,project_gtd:0
msgid ""
"GTD is a methodology to efficiently organise yourself and your tasks. This "
"module fully integrates GTD principle with OpenERP's project management."
msgstr ""
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Resources Management"
msgstr ""
#. module: association
#: model:ir.module.module,shortdesc:association.module_meta_information
msgid "Association profile"
msgstr ""
#. module: association
#: field:profile.association.config.install_modules_wizard,hr_expense:0
msgid "Expenses Tracking"
msgstr ""
#. module: association
#: model:ir.actions.act_window,name:association.action_config_install_module
#: view:profile.association.config.install_modules_wizard:0
msgid "Association Application Configuration"
msgstr ""
#. module: association
#: help:profile.association.config.install_modules_wizard,wiki:0
msgid ""
"Lets you create wiki pages and page groups in order to keep track of "
"business knowledge and share it with and between your employees."
msgstr ""
#. module: association
#: help:profile.association.config.install_modules_wizard,project:0
msgid ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
msgstr ""
#. module: association
#: model:ir.model,name:association.model_profile_association_config_install_modules_wizard
msgid "profile.association.config.install_modules_wizard"
msgstr ""
#. module: association
#: field:profile.association.config.install_modules_wizard,event_project:0
msgid "Events"
msgstr ""
#. module: association
#: view:profile.association.config.install_modules_wizard:0
#: field:profile.association.config.install_modules_wizard,project:0
msgid "Project Management"
msgstr ""
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Configure"
msgstr ""

2294
addons/auction/i18n/fa.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,377 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 19:47+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: audittrail
#: model:ir.module.module,shortdesc:audittrail.module_meta_information
msgid "Audit Trail"
msgstr ""
#. module: audittrail
#: code:addons/audittrail/audittrail.py:81
#, python-format
msgid "WARNING: audittrail is not part of the pool"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,log_id:0
msgid "Log"
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
#: selection:audittrail.rule,state:0
msgid "Subscribed"
msgstr ""
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_rule
msgid "Audittrail Rule"
msgstr ""
#. module: audittrail
#: view:audittrail.view.log:0
#: model:ir.actions.act_window,name:audittrail.action_audittrail_log_tree
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_log_tree
msgid "Audit Logs"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
#: view:audittrail.rule:0
msgid "Group By..."
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
#: field:audittrail.rule,state:0
msgid "State"
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
msgid "_Subscribe"
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
#: selection:audittrail.rule,state:0
msgid "Draft"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,old_value:0
msgid "Old Value"
msgstr ""
#. module: audittrail
#: model:ir.actions.act_window,name:audittrail.action_audittrail_view_log
msgid "View log"
msgstr ""
#. module: audittrail
#: help:audittrail.rule,log_read:0
msgid ""
"Select this if you want to keep track of read/open on any record of the "
"object of this rule"
msgstr ""
#. module: audittrail
#: field:audittrail.log,method:0
msgid "Method"
msgstr ""
#. module: audittrail
#: field:audittrail.view.log,from:0
msgid "Log From"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,log:0
msgid "Log ID"
msgstr ""
#. module: audittrail
#: field:audittrail.log,res_id:0
msgid "Resource Id"
msgstr ""
#. module: audittrail
#: help:audittrail.rule,user_id:0
msgid "if User is not added then it will applicable for all users"
msgstr ""
#. module: audittrail
#: help:audittrail.rule,log_workflow:0
msgid ""
"Select this if you want to keep track of workflow on any record of the "
"object of this rule"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,user_id:0
msgid "Users"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "Log Lines"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
#: field:audittrail.log,object_id:0
#: field:audittrail.rule,object_id:0
msgid "Object"
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
msgid "AuditTrail Rule"
msgstr ""
#. module: audittrail
#: field:audittrail.view.log,to:0
msgid "Log To"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "New Value Text: "
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
msgid "Search Audittrail Rule"
msgstr ""
#. module: audittrail
#: model:ir.actions.act_window,name:audittrail.action_audittrail_rule_tree
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree
msgid "Audit Rules"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value : "
msgstr ""
#. module: audittrail
#: field:audittrail.log,name:0
msgid "Resource Name"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
#: field:audittrail.log,timestamp:0
msgid "Date"
msgstr ""
#. module: audittrail
#: help:audittrail.rule,log_write:0
msgid ""
"Select this if you want to keep track of modification on any record of the "
"object of this rule"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,log_create:0
msgid "Log Creates"
msgstr ""
#. module: audittrail
#: help:audittrail.rule,object_id:0
msgid "Select object for which you want to generate log."
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value Text : "
msgstr ""
#. module: audittrail
#: field:audittrail.rule,log_workflow:0
msgid "Log Workflow"
msgstr ""
#. module: audittrail
#: model:ir.module.module,description:audittrail.module_meta_information
msgid ""
"\n"
" This module gives the administrator the rights\n"
" to track every user operation on all the objects\n"
" of the system.\n"
"\n"
" Administrator can subscribe rules for read,write and\n"
" delete on objects and can check logs.\n"
" "
msgstr ""
#. module: audittrail
#: field:audittrail.rule,log_read:0
msgid "Log Reads"
msgstr ""
#. module: audittrail
#: code:addons/audittrail/audittrail.py:82
#, python-format
msgid "Change audittrail depends -- Setting rule as DRAFT"
msgstr ""
#. module: audittrail
#: field:audittrail.log,line_ids:0
msgid "Log lines"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,field_id:0
msgid "Fields"
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
msgid "AuditTrail Rules"
msgstr ""
#. module: audittrail
#: help:audittrail.rule,log_unlink:0
msgid ""
"Select this if you want to keep track of deletion on any record of the "
"object of this rule"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
#: field:audittrail.log,user_id:0
msgid "User"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,action_id:0
msgid "Action ID"
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
msgid "Users (if User is not added then it will applicable for all users)"
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
msgid "UnSubscribe"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,log_unlink:0
msgid "Log Deletes"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,field_description:0
msgid "Field Description"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "Search Audittrail Log"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,log_write:0
msgid "Log Writes"
msgstr ""
#. module: audittrail
#: view:audittrail.view.log:0
msgid "Open Logs"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,new_value_text:0
msgid "New value Text"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,name:0
msgid "Rule Name"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,new_value:0
msgid "New Value"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "AuditTrail Logs"
msgstr ""
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_log
msgid "Audittrail Log"
msgstr ""
#. module: audittrail
#: help:audittrail.rule,log_action:0
msgid ""
"Select this if you want to keep track of actions on the object of this rule"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "New Value : "
msgstr ""
#. module: audittrail
#: sql_constraint:audittrail.rule:0
msgid ""
"There is a rule defined on this object\n"
" You can not define other on the same!"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,old_value_text:0
msgid "Old value Text"
msgstr ""
#. module: audittrail
#: view:audittrail.view.log:0
msgid "Cancel"
msgstr ""
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_view_log
msgid "View Log"
msgstr ""
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_log_line
msgid "Log Line"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,log_action:0
msgid "Log Action"
msgstr ""
#. module: audittrail
#: help:audittrail.rule,log_create:0
msgid ""
"Select this if you want to keep track of creation on any record of the "
"object of this rule"
msgstr ""

View File

@ -0,0 +1,502 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 19:48+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_user:0
msgid ""
"Check this if you want the rule to send an email to the responsible person."
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_remind_partner:0
msgid "Remind Partner"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_partner_categ_id:0
msgid "Partner Category"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_watchers:0
msgid "Mail to Watchers (CC)"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_state_to:0
msgid "Button Pressed"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,model_id:0
msgid "Object"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_email:0
msgid "Mail to these Emails"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_state:0
msgid "Set State to"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_email_from:0
msgid "Email From"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Body"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Days"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,last_run:0
msgid "Last Run"
msgstr ""
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:313
#, python-format
msgid "Error!"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_reply_to:0
msgid "Reply-To"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_email_cc:0
msgid ""
"These people will receive a copy of the future communication between partner "
"and users by email"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Minutes"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,name:0
msgid "Rule Name"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_remind_partner:0
msgid ""
"Check this if you want the rule to send a reminder by email to the partner."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Partner"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Deadline"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_partner_id:0
msgid "Partner"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_subject)s = Object subject"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Reminders"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Special Keywords to Be Used in The Body"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_state_from:0
msgid "State"
msgstr ""
#. module: base_action_rule
#: model:ir.actions.act_window,help:base_action_rule.base_action_rule_act
msgid ""
"Use automated actions to automatically trigger actions for various screens. "
"Example: a lead created by a specific user may be automatically set to a "
"specific sales team, or an opportunity which still has status pending after "
"14 days might trigger an automatic reminder email."
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_email:0
msgid "Email-id of the persons whom mail is to be sent"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
#: model:ir.module.module,shortdesc:base_action_rule.module_meta_information
msgid "Action Rule"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Fields to Change"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Creation Date"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Last Action Date"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Hours"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_id)s = Object ID"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Delay After Trigger Date"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_remind_attach:0
msgid "Remind with Attachment"
msgstr ""
#. module: base_action_rule
#: constraint:ir.cron:0
msgid "Invalid arguments"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_user_id:0
msgid "Set Responsible to"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "None"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_email_to:0
msgid ""
"Use a python expression to specify the right field on which one than we will "
"use for the 'To' field of the header"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_phone)s = Responsible phone"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid ""
"The rule uses the AND operator. The model must match all non-empty fields so "
"that the rule executes the action described in the 'Actions' tab."
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_date_range_type:0
msgid "Delay type"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,regex_name:0
msgid ""
"Regular expression for matching name of the resource\n"
"e.g.: 'urgent.*' will search for records having name starting with the "
"string 'urgent'\n"
"Note: This is case sensitive search."
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_method:0
msgid "Call Object Method"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_email_to:0
msgid "Email To"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_watchers:0
msgid ""
"Check this if you want the rule to mark CC(mail to any other person defined "
"in actions)."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner)s = Partner name"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Note"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_email_from:0
msgid ""
"Use a python expression to specify the right field on which one than we will "
"use for the 'From' field of the header"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_date_range:0
msgid "Delay after trigger date"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,trg_date_range:0
msgid ""
"Delay After Trigger Date,specifies you can put a negative number. If you "
"need a delay before the trigger date, like sending a reminder 15 minutes "
"before a meeting."
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,active:0
msgid "Active"
msgstr ""
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:314
#, python-format
msgid "No E-Mail ID Found for your Company address!"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_remind_user:0
msgid "Remind Responsible"
msgstr ""
#. module: base_action_rule
#: model:ir.module.module,description:base_action_rule.module_meta_information
msgid "This module allows to implement action rules for any object."
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,sequence:0
msgid "Gives the sequence order when displaying a list of rules."
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Months"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,filter_id:0
msgid "Filter"
msgstr ""
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Date"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,server_action_id:0
msgid ""
"Describes the action name.\n"
"eg:on which object which action to be taken on basis of which condition"
msgstr ""
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_ir_cron
msgid "ir.cron"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_description)s = Object description"
msgstr ""
#. module: base_action_rule
#: constraint:base.action.rule:0
msgid "Error: The mail is not well formated"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Actions"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Information"
msgstr ""
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_base_action_rule
msgid "Action Rules"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_mail_body:0
msgid "Content of mail"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_user_id:0
msgid "Responsible"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner_email)s = Partner Email"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_date)s = Creation date"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_email)s = Responsible Email"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_mail_body:0
msgid "Mail body"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_remind_user:0
msgid ""
"Check this if you want the rule to send a reminder by email to the user."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Server Action to be Triggered"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_user:0
msgid "Mail to Responsible"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_email_cc:0
msgid "Add Watchers (Cc)"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Fields"
msgstr ""
#. module: base_action_rule
#: model:ir.actions.act_window,name:base_action_rule.base_action_rule_act
#: model:ir.ui.menu,name:base_action_rule.menu_base_action_rule_form
msgid "Automated Actions"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,server_action_id:0
msgid "Server Action"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,regex_name:0
msgid "Regex on Resource Name"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,act_remind_attach:0
msgid ""
"Check this if you want that all documents attached to the object be attached "
"to the reminder email sent."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Timing"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,sequence:0
msgid "Sequence"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Actions"
msgstr ""
#. module: base_action_rule
#: help:base.action.rule,active:0
msgid ""
"If the active field is set to False, it will allow you to hide the rule "
"without removing it."
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user)s = Responsible name"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,create_date:0
msgid "Create Date"
msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on States"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_date_type:0
msgid "Trigger Date"
msgstr ""

View File

@ -20,7 +20,4 @@
##############################################################################
import base_contact
import base_contact_installer
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -19,15 +19,14 @@
#
##############################################################################
{
'name': 'Contacts Management',
'version': '1.0',
'category': 'Customer Relationship Management',
'complexity': "expert",
'description': """
This module allows you to manage your contacts entirely.
========================================================
This module allows you to manage your contacts
==============================================
It lets you define:
* contacts unrelated to a partner,
@ -47,7 +46,6 @@ Pay attention that this module converts the existing addresses into "addresses +
'update_xml': [
'security/ir.model.access.csv',
'base_contact_view.xml',
'base_contact_installer_view.xml',
'process/base_contact_process.xml'
],
'demo_xml': ['base_contact_demo.xml'],

View File

@ -20,6 +20,7 @@
##############################################################################
from osv import fields, osv
import addons
class res_partner_contact(osv.osv):
""" Partner Contact """
@ -27,81 +28,45 @@ class res_partner_contact(osv.osv):
_name = "res.partner.contact"
_description = "Contact"
def _main_job(self, cr, uid, ids, fields, arg, context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of partner contacts IDs
@fields: Get Fields
@param context: A standard dictionary for contextual values
@param arg: list of tuples of form [(name_of_the_field, operator, value), ...]. """
res = dict.fromkeys(ids, False)
res_partner_job_obj = self.pool.get('res.partner.job')
all_job_ids = res_partner_job_obj.search(cr, uid, [])
all_job_names = dict(zip(all_job_ids, res_partner_job_obj.name_get(cr, uid, all_job_ids, context=context)))
for contact in self.browse(cr, uid, ids, context=context):
if contact.job_ids:
res[contact.id] = all_job_names.get(contact.job_ids[0].id, False)
return res
def _name_get_full(self, cr, uid, ids, prop, unknow_none, context=None):
result = {}
for rec in self.browse(cr, uid, ids, context=context):
result[rec.id] = rec.last_name+' '+(rec.first_name or '')
return result
_columns = {
'name': fields.char('Last Name', size=64, required=True),
'name': fields.function(_name_get_full, string='Name', size=64, type="char", store=True),
'last_name': fields.char('Last Name', size=64, required=True),
'first_name': fields.char('First Name', size=64),
'mobile': fields.char('Mobile', size=64),
'title': fields.many2one('res.partner.title','Title'),
'title': fields.many2one('res.partner.title','Title', domain=[('domain','=','contact')]),
'website': fields.char('Website', size=120),
'lang_id': fields.many2one('res.lang', 'Language'),
'job_ids': fields.one2many('res.partner.job', 'contact_id', 'Functions and Addresses'),
'job_ids': fields.one2many('res.partner.address', 'contact_id', 'Functions and Addresses'),
'country_id': fields.many2one('res.country','Nationality'),
'birthdate': fields.date('Birth Date'),
'active': fields.boolean('Active', help="If the active field is set to False,\
it will allow you to hide the partner contact without removing it."),
'partner_id': fields.related('job_ids', 'address_id', 'partner_id', type='many2one',\
'partner_id': fields.related('job_ids', 'partner_id', type='many2one',\
relation='res.partner', string='Main Employer'),
'function': fields.related('job_ids', 'function', type='char', \
string='Main Function'),
'job_id': fields.function(_main_job, type='many2one',\
relation='res.partner.job', string='Main Job'),
'email': fields.char('E-Mail', size=240),
'comment': fields.text('Notes', translate=True),
'photo': fields.binary('Image'),
'photo': fields.binary('Photo'),
}
def _get_photo(self, cr, uid, context=None):
photo_path = addons.get_module_resource('base_contact', 'images', 'photo.png')
return open(photo_path, 'rb').read().encode('base64')
_defaults = {
'photo' : _get_photo,
'active' : lambda *a: True,
}
_order = "name,first_name"
def name_get(self, cr, user, ids, context=None):
""" will return name and first_name.......
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param user: the current users ID for security checks,
@param ids: List of create menus IDs
@return: name and first_name
@param context: A standard dictionary for contextual values
"""
if not len(ids):
return []
res = []
for contact in self.browse(cr, user, ids, context=context):
_contact = ""
if contact.title:
_contact += "%s "%(contact.title.name)
_contact += contact.name or ""
if contact.name and contact.first_name:
_contact += " "
_contact += contact.first_name or ""
res.append((contact.id, _contact))
return res
def name_search(self, cr, uid, name='', args=None, operator='ilike', context=None, limit=None):
if not args:
args = []
@ -112,151 +77,175 @@ class res_partner_contact(osv.osv):
else:
ids = self.search(cr, uid, args, limit=limit, context=context)
return self.name_get(cr, uid, ids, context=context)
def name_get(self, cr, uid, ids, context=None):
result = {}
for obj in self.browse(cr, uid, ids, context=context):
result[obj.id] = obj.name or '/'
if obj.partner_id:
result[obj.id] = result[obj.id] + ', ' + obj.partner_id.name
return result.items()
def _auto_init(self, cr, context=None):
def table_exists(view_name):
cr.execute('SELECT count(relname) FROM pg_class WHERE relname = %s', (view_name,))
value = cr.fetchone()[0]
return bool(value == 1)
exists = table_exists(self._table)
super(res_partner_contact, self)._auto_init(cr, context)
if not exists:
cr.execute("""
INSERT INTO
res_partner_contact
(id,name,last_name,title,active)
SELECT
id,COALESCE(name, '/'),COALESCE(name, '/'),title,true
FROM
res_partner_address""")
cr.execute("alter table res_partner_address add contact_id int references res_partner_contact")
cr.execute("update res_partner_address set contact_id=id")
cr.execute("select setval('res_partner_contact_id_seq', (select max(id)+1 from res_partner_contact))")
res_partner_contact()
class res_partner_location(osv.osv):
_name = 'res.partner.location'
_rec_name = 'street'
_columns = {
'street': fields.char('Street', size=128),
'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", 'Fed. State', domain="[('country_id','=',country_id)]"),
'country_id': fields.many2one('res.country', 'Country'),
'partner_id': fields.many2one('res.partner', 'Partner Name', ondelete='set null', select=True, help="Keep empty for a private address, not related to partner."),
'company_id': fields.many2one('res.company', 'Company',select=1),
'job_ids': fields.one2many('res.partner.address', 'location_id', 'Contacts'),
'partner_id': fields.related('job_ids', 'partner_id', type='many2one',\
relation='res.partner', string='Main Partner'),
}
_defaults = {
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'res.partner.address', context=c),
}
def _auto_init(self, cr, context=None):
def table_exists(view_name):
cr.execute('SELECT count(relname) FROM pg_class WHERE relname = %s', (view_name,))
value = cr.fetchone()[0]
return bool(value == 1)
exists = table_exists(self._table)
super(res_partner_location, self)._auto_init(cr, context)
if not exists:
cr.execute("""
INSERT INTO
res_partner_location
(id,street,street2,zip,city,
state_id,country_id,company_id)
SELECT
id,street,street2,zip,city,
state_id,country_id,company_id
FROM
res_partner_address""")
cr.execute("alter table res_partner_address add location_id int references res_partner_location")
cr.execute("update res_partner_address set location_id=id")
cr.execute("select setval('res_partner_location_id_seq', (select max(id)+1 from res_partner_address))")
def name_get(self, cr, uid, ids, context=None):
result = {}
for obj in self.browse(cr, uid, ids, context=context):
res = []
if obj.partner_id: res.append(obj.partner_id.name_get()[0][1])
if obj.city: res.append(obj.city)
if obj.country_id: res.append(obj.country_id.name_get()[0][1])
result[obj.id] = ', '.join(res)
return result.items()
res_partner_location()
class res_partner_address(osv.osv):
#overriding of the name_get defined in base in order to remove the old contact name
def name_get(self, cr, user, ids, context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param user: the current user,
@param ids: List of partner addresss IDs
@param context: A standard dictionary for contextual values
"""
if not len(ids):
return []
res = []
if context is None:
context = {}
for r in self.read(cr, user, ids, ['zip', 'city', 'partner_id', 'street']):
if context.get('contact_display', 'contact')=='partner' and r['partner_id']:
res.append((r['id'], r['partner_id'][1]))
else:
addr = str('')
addr += "%s %s %s" % (r.get('street', '') or '', r.get('zip', '') \
or '', r.get('city', '') or '')
res.append((r['id'], addr.strip() or '/'))
return res
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
ids = self.search(cr, user, [('name',operator,name)] + args, limit=limit, context=context)
jobs = self.pool.get('res.partner.job')
if name:
job_ids = jobs.search(cr, user, [('contact_id', operator, name)] + args, limit=limit, context=context)
for job in jobs.browse(cr, user, job_ids):
ids += [job.address_id.id]
return self.name_get(cr, user, ids, context)
_name = 'res.partner.address'
_inherit = 'res.partner.address'
_description ='Partner Address'
def _default_location_id(self, cr, uid, context=None):
context = context or {}
if not context.get('default_partner_id',False):
return False
ids = self.pool.get('res.partner.location').search(cr, uid, [('partner_id','=',context['default_partner_id'])], context=context)
return ids and ids[0] or False
def onchange_location_id(self,cr, uid, ids, location_id=False, context={}):
if not location_id:
return {}
location = self.pool.get('res.partner.location').browse(cr, uid, location_id, context=context)
return {'value':{
'street': location.street,
'street2': location.street2,
'zip': location.zip,
'city': location.city,
'country_id': location.country_id and location.country_id.id or False,
'state_id': location.state_id and location.state_id.id or False,
}}
_columns = {
'job_id': fields.related('job_ids','contact_id','job_id',type='many2one',\
relation='res.partner.job', string='Main Job'),
'job_ids': fields.one2many('res.partner.job', 'address_id', 'Contacts'),
}
res_partner_address()
'location_id' : fields.many2one('res.partner.location', 'Location'),
'contact_id' : fields.many2one('res.partner.contact', 'Contact'),
# fields from location
'street': fields.related('location_id', 'street', string='Street', type="char", store=True, size=128),
'street2': fields.related('location_id', 'street2', string='Street2', type="char", store=True, size=128),
'zip': fields.related('location_id', 'zip', string='Zip', type="char", store=True, change_default=True, size=24),
'city': fields.related('location_id', 'city', string='City', type="char", store=True, size=128),
'state_id': fields.related('location_id', 'state_id', relation="res.country.state", string='Fed. State', type="many2one", store=True, domain="[('country_id','=',country_id)]"),
'country_id': fields.related('location_id', 'country_id', type='many2one', string='Country', store=True, relation='res.country'),
'phone': fields.char('Phone', size=64),
'fax': fields.char('Fax', size=64),
'email': fields.char('E-Mail', size=240),
# fields from contact
'mobile' : fields.related('contact_id', 'mobile', type='char', size=64, string='Mobile'),
'name' : fields.related('contact_id', 'name', type='char', size=64, string="Contact Name", store=True),
'title' : fields.related('contact_id', 'title', type='many2one', relation='res.partner.title', string="Title", store=True),
}
def create(self, cr, uid, data, context={}):
if not data.get('location_id', False):
loc_id = self.pool.get('res.partner.location').create(cr, uid, {
'street': data.get('street',''),
'street2': data.get('street2',''),
'zip': data.get('zip',''),
'city': data.get('city',''),
'country_id': data.get('country_id',False),
'state_id': data.get('state_id',False)
}, context=context)
data['location_id'] = loc_id
result = super(res_partner_address, self).create(cr, uid, data, context=context)
return result
class res_partner_job(osv.osv):
def name_get(self, cr, uid, ids, context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param user: the current user,
@param ids: List of partner addresss IDs
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
if not ids:
return []
res = []
jobs = self.browse(cr, uid, ids, context=context)
contact_ids = [rec.contact_id.id for rec in jobs]
contact_names = dict(self.pool.get('res.partner.contact').name_get(cr, uid, contact_ids, context=context))
for r in jobs:
function_name = r.function
funct = function_name and (", " + function_name) or ""
res.append((r.id, contact_names.get(r.contact_id.id, '') + funct))
return res
_name = 'res.partner.job'
_description ='Contact Partner Function'
_order = 'sequence_contact'
_columns = {
'name': fields.related('address_id', 'partner_id', type='many2one',\
relation='res.partner', string='Partner', help="You may\
enter Address first,Partner will be linked automatically if any."),
'address_id': fields.many2one('res.partner.address', 'Address', \
help='Address which is linked to the Partner'), # TO Correct: domain=[('partner_id', '=', name)]
'contact_id': fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'),
'function': fields.char('Partner Function', size=64, help="Function of this contact with this partner"),
'sequence_contact': fields.integer('Contact Seq.',help='Order of\
importance of this address in the list of addresses of the linked contact'),
'sequence_partner': fields.integer('Partner Seq.',help='Order of importance\
of this job title in the list of job title of the linked partner'),
'email': fields.char('E-Mail', size=240, help="Job E-Mail"),
'phone': fields.char('Phone', size=64, help="Job Phone no."),
'fax': fields.char('Fax', size=64, help="Job FAX no."),
'extension': fields.char('Extension', size=64, help='Internal/External extension phone number'),
'other': fields.char('Other', size=64, help='Additional phone field'),
'date_start': fields.date('Date Start',help="Start date of job(Joining Date)"),
'date_stop': fields.date('Date Stop', help="Last date of job"),
'state': fields.selection([('past', 'Past'),('current', 'Current')], \
'State', required=True, help="Status of Address"),
}
result = {}
for rec in self.browse(cr,uid, ids, context=context):
res = []
if rec.partner_id:
res.append(rec.partner_id.name_get()[0][1])
if rec.contact_id and rec.contact_id.name:
res.append(rec.contact_id.name)
if rec.location_id:
if rec.location_id.city: res.append(rec.location_id.city)
if rec.location_id.country_id: res.append(rec.location_id.country_id.name_get()[0][1])
result[rec.id] = ', '.join(res)
return result.items()
_defaults = {
'sequence_contact' : lambda *a: 0,
'state': lambda *a: 'current',
'location_id': _default_location_id
}
def onchange_name(self, cr, uid, ids, address_id='', name='', context=None):
return {'value': {'address_id': address_id}, 'domain':{'partner_id':'name'}}
def onchange_partner(self, cr, uid, _, partner_id, context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user,
@param _: List of IDs,
@partner_id : ID of the Partner selected,
@param context: A standard dictionary for contextual values
"""
return {'value': {'address_id': False}}
def onchange_address(self, cr, uid, _, address_id, context=None):
"""
@@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user,
@param _: List of IDs,
@address_id : ID of the Address selected,
@param context: A standard dictionary for contextual values
"""
partner_id = False
if address_id:
address = self.pool.get('res.partner.address')\
.browse(cr, uid, address_id, context=context)
partner_id = address.partner_id.id
return {'value': {'name': partner_id}}
res_partner_job()
def default_get(self, cr, uid, fields=[], context=None):
context = context or {}
if 'default_type' in context:
del context['default_type']
return super(res_partner_address, self).default_get(cr, uid, fields, context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
res_partner_address()

View File

@ -3,183 +3,123 @@
<data>
<record id="base.user_demo" model="res.users">
<field eval="[(4, ref('base.group_sale_salesman'))]" name="groups_id"/>
<field eval="[(4,ref('base.group_sale_salesman'))]" name="groups_id"/>
</record>
<!-- Create the contacts -->
<record id="res_partner_contact_mortier0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Benoit&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Mortier&quot;&quot;&quot;" name="name"/>
<field name="first_name">Benoit</field>
<field name="last_name">Mortier</field>
<field name="title" ref="base.res_partner_title_sir"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_jacot0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Laurent&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Jacot&quot;&quot;&quot;" name="name"/>
<field name="first_name">Laurent</field>
<field name="last_name">Jacot</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_passot0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Thomas&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Passot&quot;&quot;&quot;" name="name"/>
<field name="first_name">Thomas</field>
<field name="last_name">Passot</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_lacarte0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Etienne&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Lacarte&quot;&quot;&quot;" name="name"/>
<field eval="1" name="active"/>
<field name="first_name">Etienne</field>
<field name="last_name">Lacarte</field>
</record>
<record id="res_partner_contact_tang0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Tang&quot;&quot;&quot;" name="name"/>
<field eval="1" name="active"/>
<field name="last_name">Tang</field>
</record>
<record id="res_partner_contact_wong0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Wong&quot;&quot;&quot;" name="name"/>
<field eval="1" name="active"/>
<field name="last_name">Wong</field>
</record>
<record id="res_partner_contact_lavente0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Jean-Guy&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Lavente&quot;&quot;&quot;" name="name"/>
<field name="first_name">Jean-Guy</field>
<field name="last_name">Lavente</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_lelitre0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Sylvie&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Lelitre&quot;&quot;&quot;" name="name"/>
<field name="first_name">Sylvie</field>
<field name="last_name">Lelitre</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_grosbonnet0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Arthur&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Grosbonnet&quot;&quot;&quot;" name="name"/>
<field name="first_name">Arthur</field>
<field name="last_name">Grosbonnet</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_lesbrouffe0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Karine&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Lesbrouffe&quot;&quot;&quot;" name="name"/>
<field name="first_name">Karine</field>
<field name="last_name">Lesbrouffe</field>
<field ref="base.res_partner_title_madam" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_zen0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Zen&quot;&quot;&quot;" name="name"/>
<field eval="1" name="active"/>
<field name="last_name">Zen</field>
</record>
<record id="res_partner_contact_pinckears0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;http://fptiny.blogspot.com/&quot;&quot;&quot;" name="website"/>
<field eval="&quot;&quot;&quot;Fabien&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Pinckaers&quot;&quot;&quot;" name="name"/>
<field name="website">http://fptiny.blogspot.com/</field>
<field name="first_name">Fabien</field>
<field name="last_name">Pinckaers</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_debois0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Marc&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Debois&quot;&quot;&quot;" name="name"/>
<field name="first_name">Marc</field>
<field name="last_name">Debois</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_luu0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Phuong&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Luu&quot;&quot;&quot;" name="name"/>
<field name="first_name">Phuong</field>
<field name="last_name">Luu</field>
<field ref="base.res_partner_title_madam" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_elkhayat0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Najlaa&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Khayat&quot;&quot;&quot;" name="name"/>
<field name="first_name">Najlaa</field>
<field name="last_name">Khayat</field>
<field ref="base.res_partner_title_madam" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_depaoli0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Quentin&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Paolino&quot;&quot;&quot;" name="name"/>
<field name="first_name">Quentin</field>
<field name="last_name">Paolino</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_semal0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Fabian&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;W.&quot;&quot;&quot;" name="name"/>
<field name="first_name">Fabian</field>
<field name="last_name">W.</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_vandewerve0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Yvan&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;van de Werve&quot;&quot;&quot;" name="name"/>
<field name="first_name">Yvan</field>
<field name="last_name">Van</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_lambotte0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Henry&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Lambotte&quot;&quot;&quot;" name="name"/>
<field name="first_name">Henry</field>
<field name="last_name">Lambotte</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_laurent0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Olivier&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Laurent&quot;&quot;&quot;" name="name"/>
<field name="first_name">Olivier</field>
<field name="last_name">Laurent</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_simonis0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Christophe&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Dupont&quot;&quot;&quot;" name="name"/>
<field name="first_name">Christophe</field>
<field name="last_name">Dupont</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_wirtel0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Stéphane&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Andre&quot;&quot;&quot;" name="name"/>
<field name="first_name">Stéphane</field>
<field name="last_name">Andre</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_contact_mignon0" model="res.partner.contact">
<field eval="&quot;&quot;&quot;Philippe&quot;&quot;&quot;" name="first_name"/>
<field eval="&quot;&quot;&quot;Antoine&quot;&quot;&quot;" name="name"/>
<field name="first_name">Philippe</field>
<field name="last_name">Antoine</field>
<field ref="base.res_partner_title_sir" name="title"/>
<field eval="1" name="active"/>
</record>
<!-- Create the addresses -->
<record id="base.main_address" model="res.partner.address">
<field eval="&quot;&quot;&quot;Grand-Rosière&quot;&quot;&quot;" name="city"/>
<field eval="&quot;&quot;&quot;+32.81.73.35.01&quot;&quot;&quot;" name="fax"/>
<field eval="&quot;&quot;&quot;1367&quot;&quot;&quot;" name="zip"/>
<!-- The partner associated with the main company should not have a country specified in the demo data,
as it may conflicts with the accounting installing chart wizard. This wizard will indeed try to
install the localization module accordingly to this variable automatically. Thus, in demo data,
everyone would have the belgian chart of account by default, what should be avoided. -->
<!-- <field name="country_id" ref="base.be"/> -->
<field eval="&quot;&quot;&quot;+32.81.81.37.00&quot;&quot;&quot;" name="phone"/>
<field eval="&quot;&quot;&quot;Chaussée de Namur, 40&quot;&quot;&quot;" name="street"/>
</record>
<record id="res_partner_address_0" model="res.partner.address">
<field eval="&quot;&quot;&quot;Louvain-La-Neuve&quot;&quot;&quot;" name="city"/>
<field eval="&quot;&quot;&quot;1348&quot;&quot;&quot;" name="zip"/>
<field eval="&quot;&quot;&quot;contact&quot;&quot;&quot;" name="type"/>
<!-- The partner associated with the main company should not have a country specified in the demo data,
as it may conflicts with the accounting installing chart wizard. This wizard will indeed try to
install the localization module accordingly to this variable automatically. Thus, in demo data,
everyone would have the belgian chart of account by default, what should be avoided. -->
<!-- <field name="country_id" ref="base.be"/> -->
<field eval="&quot;&quot;&quot;rue du pré, 115&quot;&quot;&quot;" name="street"/>
<field eval="1" name="active"/>
</record>
<record id="res_partner_address_1" model="res.partner.address">
<field eval="&quot;&quot;&quot;Charleroi&quot;&quot;&quot;" name="city"/>
<field eval="&quot;&quot;&quot;6000&quot;&quot;&quot;" name="zip"/>
<field eval="&quot;&quot;&quot;contact&quot;&quot;&quot;" name="type"/>
<!-- The partner associated with the main company should not have a country specified in the demo data,
as it may conflicts with the accounting installing chart wizard. This wizard will indeed try to
install the localization module accordingly to this variable automatically. Thus, in demo data,
everyone would have the belgian chart of account by default, what should be avoided. -->
<!-- <field name="country_id" ref="base.be"/> -->
<field eval="&quot;&quot;&quot;Boulevars Tirou, 32&quot;&quot;&quot;" name="street"/>
<field eval="1" name="active"/>
</record>
<!-- Create the jobs -->
<!--
<record id="res_partner_job_0" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_1"/>
<field name="function">Salesman</field>
@ -189,13 +129,13 @@
<record id="res_partner_job_1" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_2"/>
<field name="function">Salesman</field>
<field eval="&quot;&quot;&quot;contact@tecsas.fr&quot;&quot;&quot;" name="email"/>
<field name="email">contact@tecsas.fr</field>
<field name="contact_id" ref="res_partner_contact_jacot0"/>
</record>
<record id="res_partner_job_2" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_3"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;info@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">info@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_passot0"/>
</record>
<record id="res_partner_job_3" model="res.partner.job">
@ -244,74 +184,74 @@
<record id="res_partner_job_11" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">Salesman</field>
<field eval="&quot;&quot;&quot;re@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">re@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_mignon0"/>
</record>
<record id="res_partner_job_12" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;st@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">st@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_wirtel0"/>
</record>
<record id="res_partner_job_13" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;ch@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">ch@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_simonis0"/>
</record>
<record id="res_partner_job_14" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;ol@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">ol@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_laurent0"/>
</record>
<record id="res_partner_job_15" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;fl@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">fl@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_lambotte0"/>
</record>
<record id="res_partner_job_16" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">Salesman</field>
<field eval="&quot;&quot;&quot;av@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">av@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_vandewerve0"/>
</record>
<record id="res_partner_job_17" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;fb@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">fb@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_semal0"/>
</record>
<record id="res_partner_job_18" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;qd@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">qd@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_depaoli0"/>
</record>
<record id="res_partner_job_19" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;ne@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">ne@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_elkhayat0"/>
</record>
<record id="res_partner_job_20" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;ph@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">ph@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_luu0"/>
</record>
<record id="res_partner_job_21" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">CEO</field>
<field eval="&quot;&quot;&quot;fp@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">fp@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_pinckears0"/>
<field name="sequence_partner">-1</field>
</record>
<record id="res_partner_job_22" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function">Salesman</field>
<field eval="&quot;&quot;&quot;cd@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="email">cd@mycompany.com</field>
<field name="contact_id" ref="res_partner_contact_debois0"/>
</record>
<record id="res_partner_job_23" model="res.partner.job">
@ -321,18 +261,19 @@
<field name="function">PA</field>
</record>
<record id="res_partner_job_24" model="res.partner.job">
<field eval="1" name="sequence_contact"/>
<field name="sequence_contact">1</field>
<field name="address_id" ref="res_partner_address_1"/>
<field name="contact_id" ref="res_partner_contact_lacarte0"/>
<field name="function">PA</field>
<field name="sequence_contact">5</field>
</record>
<record id="res_partner_job_25" model="res.partner.job">
<field eval="2" name="sequence_contact"/>
<field name="sequence_contact">2</field>
<field name="address_id" ref="base.res_partner_address_1"/>
<field name="contact_id" ref="res_partner_contact_lacarte0"/>
<field name="function">CEO</field>
<field name="sequence_contact">1</field>
</record>
-->
</data>
</openerp>

View File

@ -1,67 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
class base_contact_installer(osv.osv_memory):
_name = 'base.contact.installer'
_inherit = 'res.config.installer'
_columns = {
'name': fields.char('Name', size=64),
'migrate': fields.boolean('Migrate', help="If you select this, all addresses will be migrated."),
}
def execute(self, cr, uid, ids, context=None):
"""
This function is used to create contact and address from existing partner address
"""
obj = self.pool.get("base.contact.installer").browse(cr, uid, uid, context=context)
if obj.migrate:
# Enable PL/pgSQL if not enabled yet in the database
cr.execute("SELECT 1 FROM pg_language WHERE lanname = 'plpgsql'")
if not cr.fetchone():
cr.execute("CREATE LANGUAGE plpgsql;")
cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact;
CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$
DECLARE
new_name varchar;
new_phonenum varchar;
BEGIN
IF(TG_OP='INSERT') THEN
INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current');
UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id;
END IF;
RETURN NEW;
END;
$contactjob$ LANGUAGE plpgsql;
CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""")
cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)")
cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact")
cr.execute("DROP FUNCTION IF EXISTS add_to_job()")
base_contact_installer()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,59 +0,0 @@
<openerp>
<data>
<record id="view_base_contact_installer" model="ir.ui.view">
<field name="name">base.contact.installer.view</field>
<field name="model">base.contact.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Address's Migration to Contacts</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Select the Option for Addresses Migration</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">You can migrate Partner's current addresses to the contact.</attribute>
</xpath>
<xpath expr="//separator[@string=&quot;vsep&quot;]" position="attributes">
<attribute name="rowspan">13</attribute>
<attribute name="string"/>
</xpath>
<xpath expr="//button[@string='Install Modules']" position="attributes">
<attribute name="string">Configure</attribute>
</xpath>
<group colspan="8">
<group colspan="2" col="2">
<label string="Due to changes in Address and Partner's relation, some of the details from address are needed to be migrated into contact information." colspan="4"/>
<label string="Otherwise these details will not be visible from address/contact." colspan="4"/>
<label string="Do you want to migrate your Address data in Contact Data?" colspan="4"/>
<group colspan="6">
<field name="migrate" string="Migrate" colspan="1"/>
</group>
</group>
</group>
</data>
</field>
</record>
<record id="action_base_contact_installer" model="ir.actions.act_window">
<field name="name">Address Migration</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">base.contact.installer</field>
<field name="view_id" ref="view_base_contact_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="base_contact_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_contact_installer"/>
<field name="category_id" ref="base.category_administration_config"/>
<field name="sequence">3</field>
<field name="type">automatic</field>
</record>
</data>
</openerp>

View File

@ -30,12 +30,12 @@
<field name="arch" type="xml">
<form string="Partner Contact">
<group colspan="4" col="6">
<field name="title" select="1" widget="selection" domain="[('domain', '=', 'contact')]" size="0"/>
<field name="name" select="1"/>
<field name="last_name" select="1"/>
<field name="first_name" select="1"/>
<field name="title" select="1" widget="selection" domain="[('domain', '=', 'contact')]" size="0"/>
</group>
<notebook colspan="4" >
<page string="General">
<page string="General">
<group colspan="4" col="4">
<group colspan="2" col="4">
<separator string="Communication" colspan="4"/>
@ -47,54 +47,36 @@
<separator string="Photo" colspan="4"/>
<field name="photo" widget='image' nolabel="1"/>
</group>
</group>
</group>
<field name="job_ids" colspan="4" nolabel="1" mode="tree,form">
<form string="Functions and Addresses">
<group colspan="4" col="4">
<field name="sequence_contact" />
<field name="function"/>
<field name="name" on_change="onchange_name(name,address_id)"/>
<field name="address_id"/>
<field name="date_start" />
<field name="date_stop" />
<field name="state" />
</group>
<field name="location_id"/>
<field name="function" />
<separator string="Communication" colspan="4"/>
<group colspan="4" col="4">
<field name="phone"/>
<field name="fax"/>
<field name="email" widget="email"/>
<field name="extension"/>
<field name="other"/>
</group>
</form>
<tree string="Functions and Addresses">
<field name="sequence_contact" string="Seq."/>
<field name="function"/>
<field name="name" on_change="onchange_partner(name)"/>
<field name="address_id" attrs="{'required': [('name', '!=', False)]}" on_change="onchange_address(address_id)"/>
<field name="phone"/>
<field name="fax"/>
<field name="extension"/>
<field name="other"/>
<field name="email" widget="email"/>
</form>
<tree string="Functions and Addresses">
<field name="location_id"/>
<field name="function"/>
<field name="phone"/>
<field name="email"/>
<field name="state" />
</tree>
</field>
</page>
<page string="Extra Information">
<page string="Extra Information">
<field name="active"/>
<field name="lang_id" widget="selection"/>
<field name="partner_id" invisible="1" select="1"/>
<field name="function" invisible="1" />
<field name="partner_id" invisible="1" select="1"/>
<field name="function" invisible="1" />
<field name="country_id"/>
<field name="birthdate"/>
</page>
<page string="Notes">
<field name="comment" nolabel="1"/>
</page>
</notebook>
</form>
</field>
@ -108,8 +90,8 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Partner Contact">
<field name="name"/>
<field name="first_name"/>
<field name="name" string="First/Lastname"
filter_domain="['|', ('firstname','ilike', self), ('lastname','ilike',self)]"/>
<field name="partner_id" string="Partner"/>
</search>
</field>
@ -132,7 +114,7 @@
<field name="name">Addresses</field>
</record>
<!--
<!--
Contacts for Suppliers
-->
<menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Purchases"
@ -141,7 +123,7 @@
parent="base.menu_purchase_root" sequence="3"/>
<menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
parent="base.menu_procurement_management_supplier" action="base.action_partner_supplier_form" sequence="1"/>
<menuitem name="Contacts" id="menu_purchases_partner_contact_form" action="action_partner_contact_form"
<menuitem name="Contacts" id="menu_purchases_partner_contact_form" action="action_partner_contact_form"
parent = "base.menu_procurement_management_supplier" sequence="2"/>
<!-- Views for Partners Form View -->
@ -152,119 +134,45 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="address" mode="form,tree" colspan="4" nolabel="1" select="1" position="replace">
<field name="address" mode="form,tree" colspan="4" nolabel="1" select="1">
<form string="Address">
<group colspan="2" col="2">
<separator string="Postal Address" colspan="2" col="2"/>
<field name="type" />
<field name="street"/>
<field name="street2"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id" completion="1"/>
<field name="state_id"/>
</group>
<group colspan="2" col="2">
<separator string="Communication" colspan="2" col="2"/>
<field name="phone"/>
<field name="fax"/>
<field name="email" widget="email"/>
</group>
<field name="job_ids" mode="tree,form" nolabel="1" colspan="4">
<tree string="Contacts" editable="top">
<field name="sequence_partner"/>
<field name="contact_id"/>
<field name="function"/>
<field name="phone"/>
<field name="fax"/>
<field name="extension"/>
<field name="other"/>
<field name="email"/>
</tree>
<form string="Contacts">
<group colspan="4" col="4">
<field name="sequence_partner"/>
<field name="contact_id"/>
<field name="function"/>
</group>
<separator string="Communication" colspan="4"/>
<group colspan="4" col="4">
<field name="phone"/>
<field name="fax"/>
<field name="extension"/>
<field name="other"/>
<field name="email" widget="email"/>
</group>
</form>
</field>
</form>
<tree string="Addresses">
<field name="type"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="phone"/>
<field name="job_ids"/>
</tree>
</field>
</field>
<separator string="Postal Address" position="after">
<field name="location_id" on_change="onchange_location_id(location_id)"/>
</separator>
<xpath expr="//field[@string='Contact Name']" position="replace">
<field name="contact_id"/>
</xpath>
<field name="title" position="replace"/>
</field>
</record>
<!-- Views for Addresses -->
<record model="ir.ui.view" id="view_partner_location_form">
<field name="name">res.partner.location.form</field>
<field name="model">res.partner.location</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Locations">
<field name="street" colspan="4"/>
<field name="street2" colspan="4"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id" />
<field name="state_id"/>
</form>
</field>
</record>
<!-- don't display the categories, since it is displayed in an other tab-->
<record model="ir.ui.view" id="view_partner_form_inherit2">
<field name="name">res.partner.form</field>
<field name="type">form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="category_id" position="replace">
</field>
</field>
</record>
<!-- don't display the categories label-->
<record model="ir.ui.view" id="view_partner_form_inherit2bis">
<field name="name">res.partner.form</field>
<field name="type">form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<separator colspan="4" string="Categories" position="replace"/>
</field>
</record>
<record model="ir.ui.view" id="view_partner_form_inherit3">
<field name="name">res.partner.form</field>
<field name="type">form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Categories">
<separator colspan="4" string="Categories"/>
<field colspan="4" name="category_id" nolabel="1"/>
</page>
</notebook>
</field>
</record>
<!-- Views for Addresses -->
<record model="ir.ui.view" id="view_partner_address_tree_inherited1">
<field name="name">Partner addresses inherited</field>
<field name="model">res.partner.address</field>
<field name="inherit_id" ref="base.view_partner_address_tree"/>
<record model="ir.ui.view" id="view_partner_location_tree">
<field name="name">res.partner.location.tree</field>
<field name="model">res.partner.location</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="name" position="replace">
<field name='job_ids' string='# of Contacts'/>
</field>
<tree string="Locations">
<field name="city"/>
<field name="country_id" />
<field name="state_id"/>
</tree>
</field>
</record>
@ -273,152 +181,16 @@
<field name='model'>res.partner.address</field>
<field name="inherit_id" ref="base.view_partner_address_form1"/>
<field name='type'>form</field>
<field name='arch' type='xml'>
<field name="type" position="replace">
</field>
</field>
</record>
<record model="ir.ui.view" id="view_partner_address_form_inherited1">
<field name='name'>res.partner.address.form.inherited1</field>
<field name='model'>res.partner.address</field>
<field name="inherit_id" ref="base.view_partner_address_form1"/>
<field name='type'>form</field>
<field name='arch' type='xml'>
<field name="name" position="replace">
</field>
</field>
</record>
<record id='view_partner_address_form_inherited2' model='ir.ui.view'>
<field name='name'>res.partner.address.form.inherited2</field>
<field name='model'>res.partner.address</field>
<field name="inherit_id" ref="base.view_partner_address_form1"/>
<field name='type'>form</field>
<field name='arch' type='xml'>
<field name="title" position="replace">
</field>
</field>
</record>
<record id='view_partner_address_form_inherited3' model='ir.ui.view'>
<field name='name'>res.partner.address.form.inherited3</field>
<field name='model'>res.partner.address</field>
<field name="inherit_id" ref="base.view_partner_address_form1"/>
<field name='type'>form</field>
<field name='arch' type='xml'>
<field name="function" position="replace">
</field>
</field>
</record>
<record id='view_partner_address_form_inherited4' model='ir.ui.view'>
<field name='name'>res.partner.address.form.inherited4</field>
<field name='model'>res.partner.address</field>
<field name="inherit_id" ref="base.view_partner_address_form1"/>
<field name='type'>form</field>
<field name='arch' type='xml'>
<field name='mobile' position="replace">
</field>
</field>
</record>
<record model="ir.ui.view" id="view_partner_address_form_inherited6">
<field name='name'>res.partner.address.form.inherited6</field>
<field name='model'>res.partner.address</field>
<field name="inherit_id" ref="base.view_partner_address_form1"/>
<field name='type'>form</field>
<field name='arch' type='xml'>
<field name="partner_id" position="replace">
<field name='partner_id' select='1'/>
<field name='type' select='2'/>
<field name='job_id' invisible="1"/>
</field>
</field>
</record>
<record id="view_res_partner_address_filter" model="ir.ui.view">
<field name="name">res.partner.address.select</field>
<field name="model">res.partner.address</field>
<field name="type">search</field>
<field name="inherit_id" ref="base.view_res_partner_address_filter"/>
<field name="arch" type="xml">
<search string="Search Contact">
<field name="job_ids"/>
</search>
</field>
</record>
<!-- Views for partner job Tree view -->
<record model="ir.ui.view" id="view_partner_job_tree">
<field name="name">res.partner.job.tree</field>
<field name="model">res.partner.job</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Contact Functions">
<field name="contact_id"/>
<field name="function"/>
<field name="name"/>
<field name="address_id"/>
<field name="email"/>
<field name="phone"/>
<field name="fax"/>
<field name="extension"/>
<field name="state" />
</tree>
</field>
<separator string="Postal Address" position="after">
<field name="location_id" on_change="onchange_location_id(location_id)"/>
</separator>
<field name="title" position="replace"/>
</field>
</record>
<!-- Views for partner job Form view -->
<record model="ir.ui.view" id="view_partner_job_form">
<field name="name">res.partner.job.form</field>
<field name="model">res.partner.job</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Contact Functions">
<field name="name" select="1" on_change="onchange_partner(name)"/>
<field name="address_id" select="1" attrs="{'required': [('name', '!=', False)]}" on_change="onchange_address(address_id)"/>
<field name="contact_id" select="1"/>
<field name="function" select="1"/>
<field name="email" widget="email"/>
<field name="phone"/>
<field name="fax"/>
<field name="extension"/>
<field name="sequence_contact" groups="base.group_user"/>
<field name="sequence_partner" groups="base.group_user"/>
<field name="date_start" groups="base.group_user"/>
<field name="date_stop" groups="base.group_user"/>
<field name="state" />
</form>
</field>
</record>
<!-- Menuitem for res.partner.job -->
<record model="ir.actions.act_window" id="action_res_partner_job">
<field name="name">Contact's Jobs</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner.job</field>
<field name="view_type">form</field>
</record>
<act_window domain="[('name', '=', active_id)]"
id="act_res_partner_jobs" name="Partner Contacts"
res_model="res.partner.job"
src_model="res.partner"
/>
<!-- Act window defining a shorcut on partner address to open all his jobs -->
<act_window
id="act_res_partner_jobs"
name="Open Jobs"
context="{'search_default_address_id': [active_id], 'default_address_id': active_id}"
res_model="res.partner.job"
src_model="res.partner.address"
/>
</data>
</openerp>

View File

@ -36,15 +36,6 @@
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_function0" model="process.node">
<field name="model_id" ref="base_contact.model_res_partner_job"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Jobs at a same partner address.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Function&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="process_process_basecontactprocess0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_addresses0" model="process.node">
<field name="menu_id" ref="base.menu_partner_address_form"/>
<field name="model_id" ref="base.model_res_partner_address"/>
@ -59,22 +50,6 @@
Process Transition
-->
<record id="process_transition_contacttofunction0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Contact to function&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Defines contacts and functions.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_function0"/>
<field model="process.node" name="source_node_id" ref="process_node_contacts0"/>
</record>
<record id="process_transition_functiontoaddress0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Function to address&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Define functions and address.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_addresses0"/>
<field model="process.node" name="source_node_id" ref="process_node_function0"/>
</record>
<record id="process_transition_partnertoaddress0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Partner to address&quot;&quot;&quot;" name="name"/>
@ -84,4 +59,4 @@
</record>
</data>
</openerp>
</openerp>

View File

@ -1,7 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_res_partner_contact,res.partner.contact,model_res_partner_contact,base.group_partner_manager,1,1,1,1
access_res_partner_job,res.partner.job,model_res_partner_job,base.group_partner_manager,1,1,1,1
access_res_partner_contact_all,res.partner.contact all,model_res_partner_contact,base.group_user,1,0,0,0
access_res_partner_job_all,res.partner.job all,model_res_partner_job,base.group_user,1,0,0,0
access_group_sale_salesman,res.partner.contact.sale.salesman,model_res_partner_contact,base.group_sale_salesman,1,1,1,0
access_res_partner_job_salesman,res.partner.job.salesman,model_res_partner_job,base.group_sale_salesman,1,1,1,0
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_res_partner_contact","res.partner.contact","model_res_partner_contact","base.group_partner_manager",1,1,1,1
"access_res_partner_contact_all","res.partner.contact all","model_res_partner_contact","base.group_user",1,0,0,0
"access_group_sale_salesman","res.partner.contact.sale.salesman","model_res_partner_contact","base.group_sale_salesman",1,1,1,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_res_partner_contact res.partner.contact model_res_partner_contact base.group_partner_manager 1 1 1 1
3 access_res_partner_job access_res_partner_contact_all res.partner.job res.partner.contact all model_res_partner_job model_res_partner_contact base.group_partner_manager base.group_user 1 1 0 1 0 1 0
4 access_res_partner_contact_all access_group_sale_salesman res.partner.contact all res.partner.contact.sale.salesman model_res_partner_contact base.group_user base.group_sale_salesman 1 0 1 0 1 0
access_res_partner_job_all res.partner.job all model_res_partner_job base.group_user 1 0 0 0
access_group_sale_salesman res.partner.contact.sale.salesman model_res_partner_contact base.group_sale_salesman 1 1 1 0
access_res_partner_job_salesman res.partner.job.salesman model_res_partner_job base.group_sale_salesman 1 1 1 0

View File

@ -3,31 +3,17 @@
*contacts unrelated to a partner,
*contacts working at several addresses (possibly for different partners),
*contacts with possibly different functions for each of its job's addresses
- |
In order to assign language to contacts first I will create Language FR
(Remove)
-
!record {model: res.lang, id: res_lang_french0}:
code: fr_BE
date_format: '%m/%d/%Y'
decimal_point: '.'
direction: ltr
grouping: '[]'
name: French
time_format: '%H:%M:%S'
- |
In order to check contacts first I will create contact unrelated to a partner
-
!record {model: res.partner.contact, id: res_partner_contact_williams0}:
country_id: base.be
first_name: Laura
last_name: Henrion
job_ids:
- email: lwilliams@mydomain.com
function: PA
phone: (+32).10.45.18.77
sequence_contact: 1
state: current
lang_id: res_lang_french0
mobile: (+32).10.45.18.77
name: Williams
- |
@ -41,54 +27,12 @@
street: 23, street ways
type: default
zip: '2324324'
job_ids:
- address_id: res_partner_address_1
function: CEO
contact_id: res_partner_contact_williams0
sequence_partner: 2
state: current
lang: fr_BE
name: Laura's Company
function: CEO
contact_id: res_partner_contact_williams0
name: Lauras Company
ref: LC
- |
-
Now I will check that the new job is assigned properly to contact or not
-
!assert {model: res.partner.contact, id: res_partner_contact_williams0}:
- len(job_ids) >= 2
- |
In order to check contacts working at several addresses for different partners
I will create contact with 2 different addresses
-
!record {model: res.partner.contact, id: res_partner_contact_pauwels0}:
country_id: base.be
first_name: Nicolas
job_ids:
- address_id: base.res_partner_address_1
function: CTO
state: current
- address_id: base.res_partner_address_3000
function: CEO
state: current
lang_id: res_lang_french0
mobile: (+32).23.44.32.12
name: Pauwels
- |
In order to check one contact working at one partner with different functions
I will create contact with 2 different jobs with different function but the same address
-
!record {model: res.partner.contact, id: res_partner_contact_mortier0}:
country_id: base.be
first_name: Christina
job_ids:
- address_id: base.res_partner_address_1
function: CEO
state: past
- address_id: base.res_partner_address_1
function: CTO
state: current
lang_id: base_contact.res_lang_french0
mobile: (+32).10.45.18.77
name: Mortier
- len(job_ids) == 2

View File

@ -0,0 +1,71 @@
# Persian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-12-18 20:12+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Persian <fa@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: 2011-12-19 04:49+0000\n"
"X-Generator: Launchpad (build 14525)\n"
#. module: base_crypt
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr ""
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "res.users"
msgstr ""
#. module: base_crypt
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Please specify the password !"
msgstr ""
#. module: base_crypt
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
msgid "Base - Password Encryption"
msgstr ""
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Error"
msgstr ""
#. module: base_crypt
#: model:ir.module.module,description:base_crypt.module_meta_information
msgid ""
"This module replaces the cleartext password in the database with a password "
"hash,\n"
"preventing anyone from reading the original password.\n"
"For your existing user base, the removal of the cleartext passwords occurs "
"the first time\n"
"a user logs into the database, after installing base_crypt.\n"
"After installing this module it won't be possible to recover a forgotten "
"password for your\n"
"users, the only solution is for an admin to set a new password.\n"
"\n"
"Note: installing this module does not mean you can ignore basic security "
"measures,\n"
"as the password is still transmitted unencrypted on the network (by the "
"client),\n"
"unless you are using a secure protocol such as XML-RPCS.\n"
" "
msgstr ""

View File

@ -39,7 +39,7 @@ Note that:
Association / Configuration / Types of Events
""",
'author': 'OpenERP SA',
'depends': ['crm', 'base_contact', 'account', 'marketing', 'mail'],
'depends': ['crm', 'account', 'marketing', 'mail'],
'init_xml': [],
'update_xml': [
'security/ir.model.access.csv',

View File

@ -303,7 +303,7 @@ class event_registration(osv.osv):
'event_id': fields.many2one('event.event', 'Event', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),
"partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced', readonly=True, states={'draft': [('readonly', False)]}),
"contact_id": fields.many2one('res.partner.contact', 'Partner Contact', readonly=False, states={'done': [('readonly', True)]}), #TODO: filter only the contacts that have a function into the selected partner_id
"contact_id": fields.many2one('res.partner.address', 'Partner Contact', readonly=False, states={'done': [('readonly', True)]}), #TODO: filter only the contacts that have a function into the selected partner_id
"unit_price": fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}),
'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute=dp.get_precision('Sale Price'), store=True),
"badge_ids": fields.one2many('event.registration.badge', 'registration_id', 'Badges', readonly=False, states={'done': [('readonly', True)]}),
@ -382,7 +382,7 @@ class event_registration(osv.osv):
inv_lines_pool = self.pool.get('account.invoice.line')
inv_pool = self.pool.get('account.invoice')
product_pool = self.pool.get('product.product')
contact_pool = self.pool.get('res.partner.contact')
contact_pool = self.pool.get('res.partner.address')
if context is None:
context = {}
# If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the
@ -578,13 +578,7 @@ class event_registration(osv.osv):
if not contact:
return data
addr_obj = self.pool.get('res.partner.address')
job_obj = self.pool.get('res.partner.job')
if partner:
partner_addresses = addr_obj.search(cr, uid, [('partner_id', '=', partner)])
job_ids = job_obj.search(cr, uid, [('contact_id', '=', contact), ('address_id', 'in', partner_addresses)])
if job_ids:
data['email_from'] = job_obj.browse(cr, uid, job_ids[0]).email
data['email_from'] = addr_obj.browse(cr, uid, contact).email
return {'value': data}
def onchange_event(self, cr, uid, ids, event_id, partner_invoice_id):
@ -636,7 +630,6 @@ class event_registration(osv.osv):
@param event_id: Event ID
@param partner_invoice_id: Partner Invoice ID
"""
job_obj = self.pool.get('res.partner.job')
res_obj = self.pool.get('res.partner')
data = {}
@ -648,14 +641,10 @@ class event_registration(osv.osv):
d = self.onchange_partner_invoice_id(cr, uid, ids, event_id, part)
# this updates the dictionary
data.update(d['value'])
addr = res_obj.address_get(cr, uid, [part])
addr = res_obj.address_get(cr, uid, [part]).get('default', False)
if addr:
if addr.has_key('default'):
job_ids = job_obj.search(cr, uid, [('address_id', '=', addr['default'])])
if job_ids:
data['contact_id'] = job_obj.browse(cr, uid, job_ids[0]).contact_id.id
d = self.onchange_contact_id(cr, uid, ids, data['contact_id'], part)
data.update(d['value'])
d = self.onchange_contact_id(cr, uid, ids, addr, part)
data.update(d['value'])
return {'value': data}
def onchange_partner_invoice_id(self, cr, uid, ids, event_id, partner_invoice_id):

View File

@ -48,21 +48,16 @@ class partner_event_registration(osv.osv_memory):
"""
value = {}
res_obj = self.pool.get('res.partner')
job_obj = self.pool.get('res.partner.job')
addr_obj = self.pool.get('res.partner.address')
reg_obj = self.pool.get('event.registration')
mod_obj = self.pool.get('ir.model.data')
record_ids = context and context.get('active_ids', []) or []
addr = res_obj.address_get(cr, uid, record_ids)
contact_id = False
email = False
if addr.has_key('default'):
job_ids = job_obj.search(cr, uid, [('address_id', '=', addr['default'])], context=context)
if job_ids:
contact = job_obj.browse(cr, uid, job_ids[0], context=context)
if contact:
contact_id = contact.contact_id.id
email = contact.email
contact_id = addr.get('default', False)
if contact_id:
email = addr_obj.browse(cr, uid, contact_id, context=context).email
result = mod_obj.get_object_reference(cr, uid, 'event', 'view_registration_search')
res = result and result[1] or False
@ -143,4 +138,4 @@ class partner_event_registration(osv.osv_memory):
partner_event_registration()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -184,10 +184,6 @@ class hr_applicant(crm.crm_case, osv.osv):
'user_email': fields.related('user_id', 'user_email', type='char', string='User Email', readonly=True),
}
def _get_stage(self, cr, uid, context=None):
ids = self.pool.get('hr.recruitment.stage').search(cr, uid, [], context=context)
return ids and ids[0] or False
_defaults = {
'active': lambda *a: 1,
'user_id': lambda self, cr, uid, context: uid,

View File

@ -19,27 +19,49 @@
assert applicant.name == "Application for the post of Jr.application Programmer.", "Subject does not match"
assert applicant.state == "draft"
assert len(resume_ids), "Resume does not attached."
-
I refuse applicant for the Recruitment.
-
!python {model: hr.applicant}: |
self.case_close(cr, uid, [ref("hr_case_programmer")])
-
I open applicant for the Recruitment.
-
!python {model: hr.applicant}: |
self.case_reset(cr, uid, [ref("hr_case_programmer")])
self.case_open(cr, uid, [ref("hr_case_programmer")])
-
I assign the Job position to the applicant
-
!python {model: hr.applicant}: |
self.write(cr, uid, [ref('hr_case_programmer')], {'job_id':ref('hr.job_jr_appli')})
-
I open applicant for the Recruitment
-
!python {model: hr.applicant}: |
self.case_open(cr, uid, [ref("hr_case_programmer")])
-
I start communication with applicant, first schedule phonecall.
-
!python {model: hr.recruitment.job2phonecall}: |
self.make_phonecall(cr, uid, [ref('hr_case_programmer')])
context.update({'active_model': 'hr.applicant', 'active_id': ref("hr_case_programmer"), 'active_ids': [ref("hr_case_programmer")], 'survey_id': ref("survey_job_0")})
id = self.create(cr, uid, {}, context=context)
self.make_phonecall(cr, uid, [id], context=context)
-
I schedule meeting with applicant for interview.
-
!python {model: hr.applicant}: |
self.action_makeMeeting(cr, uid, [ref('hr_case_programmer')])
-
I check Initial Qualification of applicant.
-
!python {model: hr.applicant}: |
self.stage_next(cr, uid, [ref('hr_case_programmer')])
-
I schedule First Interview of applicant.
-
!python {model: hr.applicant}: |
self.stage_next(cr, uid, [ref('hr_case_programmer')])
-
On a successful First Interview of applicant, I schedule Second Interview.
-
!python {model: hr.applicant}: |
self.stage_next(cr, uid, [ref('hr_case_programmer')])
-
Applicant fillup the answer of the interview quetion.
-
@ -56,7 +78,13 @@
!python {model: hr.applicant}: |
self.action_print_survey(cr, uid, [ref('hr_case_programmer')])
-
On a successful interview with the applicant, I hired employee.
On a successful Second Interview of applicant Contract is Proposed to applicant.
-
!python {model: hr.applicant}: |
self.stage_next(cr, uid, [ref('hr_case_programmer')])
self.stage_previous(cr, uid, [ref('hr_case_programmer')])
-
I Hired Applicant.
-
!python {model: hr.applicant}: |
self.case_close_with_emp(cr, uid, [ref('hr_case_programmer')])
@ -65,3 +93,28 @@
-
!assert {model: hr.applicant, id: hr_case_programmer}:
- state == 'done'
-
I do not give employment to the hired the applicant.
-
!python {model: hired.employee}: |
context.update({'active_model': 'hr.applicant', 'active_ids': [ref("hr_recruitment.hr_case_programmer")], 'active_id': ref("hr_recruitment.hr_case_programmer")})
emp_id = self.create(cr, uid, {}, context=context)
self.case_close(cr, uid, [emp_id], context=context)
-
Now I give employment to hired applicant .
-
!python {model: hr.applicant}: |
hired_emp_obj = self.pool.get('hired.employee')
self.case_reset(cr, uid, [ref("hr_case_programmer")])
self.case_open(cr, uid, [ref("hr_case_programmer")])
context.update({'active_model': 'hr.applicant', 'active_ids': [ref("hr_recruitment.hr_case_programmer")], 'active_id': ref("hr_recruitment.hr_case_programmer")})
emp_hr_id = hired_emp_obj.create(cr, uid, {}, context=context)
hired_emp_obj.case_close_with_emp(cr, uid, [emp_hr_id], context=context)
-
Now hired employee want to be a partner of company.
-
!record {model: hr.recruitment.partner.create, id: hr_recruitment_partner_id1 }:
-
!python {model: hr.recruitment.partner.create}: |
context.update({'active_model': 'hr.applicant', 'active_ids': [ref("hr_recruitment.hr_case_programmer")], 'active_id': ref("hr_recruitment.hr_case_programmer")})
self.make_order(cr, uid, [ref("hr_recruitment_partner_id1")], context=context)

View File

@ -65,7 +65,8 @@ class account_analytic_account(osv.osv):
_columns = {
'pricelist_id': fields.many2one('product.pricelist', 'Customer Pricelist',
help="The product to invoice is defined on the employee form, the price will be deduced by this pricelist on the product."),
'amount_max': fields.float('Max. Invoice Price'),
'amount_max': fields.float('Max. Invoice Price',
help="Keep empty if this contract is not limited to a total fixed price."),
'amount_invoiced': fields.function(_invoiced_calc, string='Invoiced Amount',
help="Total invoiced"),
'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Invoice on Timesheet & Costs',

View File

@ -18,7 +18,7 @@
<field name="price" groups="base.group_extended"/>
</group>
<group col="2" colspan="4" groups="base.group_extended">
<separator string="Force to use a specific product" colspan="4" />
<separator string="Force to use a specific product" colspan="4"/>
<field name="product"/>
</group>
</page>

View File

@ -294,7 +294,7 @@ class hr_timesheet_sheet(osv.osv):
if r=='month':
return time.strftime('%Y-%m-01')
elif r=='week':
return (datetime.today() + relativedelta(weekday=0, weeks=-1)).strftime('%Y-%m-%d')
return (datetime.today() + relativedelta(weekday=0, days=-6)).strftime('%Y-%m-%d')
elif r=='year':
return time.strftime('%Y-01-01')
return time.strftime('%Y-%m-%d')

View File

@ -186,7 +186,7 @@
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="context">{'search_default_my_timesheet':1,'group_by_no_leaf':1}</field>
<field name="context">{'search_default_my_timesheet':1}</field>
<field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
<field name="help">Check your timesheets for a specific period. You can also encode time spent on a project (i.e. an analytic account) thus generating costs in the analytic account concerned.</field>
</record>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Account Types -->
<record model="account.account.type" id="account_type_receivable" >
@ -59,7 +59,7 @@
<field name="report_type">liability</field>
<field name="close_method">balance</field>
</record>
<!-- Account Templates -->
<record id="chart0" model="account.account.template">
<field name="code">0</field>
@ -67,7 +67,7 @@
<field name="type">view</field>
<field name="user_type" ref="account_type_view"/>
</record>
<record id="chart1000" model="account.account.template">
<field name="code">1000</field>
<field name="reconcile" eval="False"/>
@ -421,10 +421,10 @@
<record id="mx_a_recv" model="account.account.template">
<field name="code">4450</field>
<field name="reconcile" eval="False"/>
<field name="reconcile" eval="True"/>
<field name="parent_id" ref="chart0"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_income"/>
<field name="type">receivable</field>
<field name="user_type" ref="account_type_receivable"/>
<field name="name">Ganancia en Paridad Cambiaria</field>
</record>
@ -575,12 +575,12 @@
<record id="chart5530" model="account.account.template">
<field name="code">5530</field>
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="chart0"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_expense"/>
<field name="name">Derecho de Frente</field>
</record>
<record id="chart5600" model="account.account.template">
@ -702,10 +702,10 @@
<record id="mx_a_pay" model="account.account.template">
<field name="code">5810</field>
<field name="reconcile" eval="False"/>
<field name="reconcile" eval="True"/>
<field name="parent_id" ref="chart0"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_expense"/>
<field name="type">payable</field>
<field name="user_type" ref="account_type_payable"/>
<field name="name">Pérdidas Paridad Cambiaria</field>
</record>
@ -721,6 +721,6 @@
<field name="property_account_expense_categ" ref="mx_a_expense"/>
<field name="property_account_income_categ" ref="mx_a_income"/>
</record>
</data>
</openerp>

View File

@ -58,7 +58,11 @@ Note: If you need demo data, you can install the marketing_campaign_crm_demo mod
"security/ir.model.access.csv"
],
'demo_xml': [
'marketing_campaign_demo.xml',
],
'test': [
'test/marketing_campaign.yml',
],
'installable': True,
'active': False,
'certificate' : '00421723279617928365',

View File

@ -164,11 +164,12 @@ Normal - the campaign runs normally and automatically sends all emails and repor
self.write(cr, uid, ids, {'state': 'cancelled'})
return True
# dead code
def signal(self, cr, uid, model, res_id, signal, run_existing=True, context=None):
record = self.pool.get(model).browse(cr, uid, res_id, context)
return self._signal(cr, uid, record, signal, run_existing, context)
#dead code
def _signal(self, cr, uid, record, signal, run_existing=True, context=None):
if not signal:
raise ValueError('signal cannot be False')
@ -461,6 +462,7 @@ class marketing_campaign_activity(osv.osv):
return super(marketing_campaign_activity, self).search(cr, uid, args,
offset, limit, order, context, count)
#dead code
def _process_wi_report(self, cr, uid, activity, workitem, context=None):
service = netsvc.LocalService('report.%s'%activity.report_id.report_name)
(report_data, format) = service.create(cr, uid, [], {}, {})
@ -481,6 +483,7 @@ class marketing_campaign_activity(osv.osv):
activity.email_template_id.id,
workitem.res_id, context=context)
#dead code
def _process_wi_action(self, cr, uid, activity, workitem, context=None):
if context is None:
context = {}
@ -670,7 +673,7 @@ class marketing_campaign_workitem(osv.osv):
def _process_one(self, cr, uid, workitem, context=None):
if workitem.state != 'todo':
return
return False
activity = workitem.activity_id
proxy = self.pool.get(workitem.object_id.model)
@ -707,7 +710,7 @@ class marketing_campaign_workitem(osv.osv):
if result:
# process _chain
workitem = workitem.browse(context)[0] # reload
workitem = workitem.browse(context=context)[0] # reload
date = datetime.strptime(workitem.date, DT_FMT)
for transition in activity.to_ids:
@ -784,11 +787,7 @@ class marketing_campaign_workitem(osv.osv):
res = {}
wi_obj = self.browse(cr, uid, ids[0], context=context)
if wi_obj.activity_id.type == 'email':
data_obj = self.pool.get('ir.model.data')
data_id = data_obj._get_id(cr, uid, 'email_template', 'email_template_preview_form')
view_id = 0
if data_id:
view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'email_template', 'email_template_preview_form')
res = {
'name': _('Email Preview'),
'view_type': 'form',
@ -796,7 +795,7 @@ class marketing_campaign_workitem(osv.osv):
'res_model': 'email_template.preview',
'view_id': False,
'context': context,
'views': [(view_id, 'form')],
'views': [(view_id and view_id[1] or 0, 'form')],
'type': 'ir.actions.act_window',
'target': 'new',
'nodestroy':True,

View File

@ -0,0 +1,93 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!-- Email tempalte -->
<record id="email_template_1" model="email.template">
<field name="name">Template for New Partner</field>
<field name="email_from">info@tinyerp.com</field>
<field name="subject">Welcome in OpenERP Partner Channel!</field>
<field name="email_to">${object.email or ''}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="body_text">Hello, We are very happy to send Welcome message.</field>
</record>
<record id="email_template_2" model="email.template">
<field name="name">Template for Silver Partner</field>
<field name="email_from">info@tinyerp.com</field>
<field name="subject">Congratulation! You become now our Silver Partner.</field>
<field name="email_to">${object.email or ''}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="body_text">Hello, We are happy to announce that you now become our Silver Partner.</field>
</record>
<record id="email_template_3" model="email.template">
<field name="name">Template for Gold Partner</field>
<field name="email_from">info@tinyerp.com</field>
<field name="subject">Congratulation! You become our Gold Partner.</field>
<field name="email_to">${object.email or ''}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="body_text">Hello, We are happy to announce that you become our Gold Partner.</field>
</record>
<!-- Campaign -->
<record id="marketing_campaign_openerppartnerchannel" model="marketing.campaign">
<field name="name">OpenERP Partner Channel</field>
<field name="object_id" ref="base.model_res_partner"/>
<field name="mode">active</field>
</record>
<!-- Activity -->
<record id="marketing_campaign_activity_0" model="marketing.campaign.activity">
<field name="name">New Partner</field>
<field name="campaign_id" ref="marketing_campaign_openerppartnerchannel"/>
<field name="email_template_id" ref="email_template_1"/>
<field name="condition">object.credit_limit &lt; 10000</field>
<field name="keep_if_condition_not_met">True</field>
<field eval="1" name="start"/>
</record>
<record id="marketing_campaign_activity_1" model="marketing.campaign.activity">
<field name="name">Silver Partner</field>
<field name="campaign_id" ref="marketing_campaign_openerppartnerchannel"/>
<field name="condition">object.credit_limit &gt;= 10000 and object.credit_limit &lt; 50000</field>
<field name="keep_if_condition_not_met">True</field>
<field name="email_template_id" ref="email_template_2"/>
</record>
<record id="marketing_campaign_activity_2" model="marketing.campaign.activity">
<field name="name">Gold Partner</field>
<field name="condition">object.credit_limit &gt;= 100000</field>
<field name="campaign_id" ref="marketing_campaign_openerppartnerchannel"/>
<field name="keep_if_condition_not_met">True</field>
<field name="email_template_id" ref="email_template_3"/>
</record>
<!-- Tranisition -->
<record id="marketing_campaign_transition_0" model="marketing.campaign.transition">
<field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_0"/>
<field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_1"/>
</record>
<record id="marketing_campaign_transition_1" model="marketing.campaign.transition">
<field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_1"/>
<field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_2"/>
</record>
<!-- Segment -->
<record id="filter0" model="ir.filters">
<field name="name">Partners</field>
<field name="domain">[('name','like','Agrolait')]</field>
<field name="model_id">res.partner</field>
</record>
<record id="marketing_campaign_segment0" model="marketing.campaign.segment">
<field eval="time.strftime('%Y-%m-%d %H:%M:%S')" name="date_run"/>
<field name="name">OpenERP Partner</field>
<field name="sync_mode">create_date</field>
<field name="ir_filter_id" ref="filter0"></field>
<field name="campaign_id" ref="marketing_campaign_openerppartnerchannel"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,151 @@
-
In order to test process of compaign, I start compaign.
-
!workflow {model: marketing.campaign, action: state_running_set, ref: marketing_campaign_openerppartnerchannel}
-
I check the campaign on Running mode after started.
-
!assert {model: marketing.campaign, id: marketing_campaign_openerppartnerchannel}:
- state == 'running'
-
I start this segment after assinged campaign.
-
!workflow {model: marketing.campaign.segment, action: state_running_set, ref: marketing_campaign_segment0}
-
I check the segment on Running mode after started.
-
!assert {model: marketing.campaign.segment, id: marketing_campaign_segment0}:
- state == 'running'
-
I synchronized segment manually to see all step of activity and process covered on this campaign.
-
!python {model: marketing.campaign.segment}: |
segment_id = self.browse(cr ,uid ,ref("marketing_campaign_segment0") ,context)
assert segment_id.date_next_sync, 'Next Synchronization date is not calculated.'
self.synchroniz(cr, uid, [ref("marketing_campaign_segment0")])
-
I cancel Marketing Workitems.
-
!python {model: marketing.campaign.workitem}: |
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel'))])
self.button_cancel(cr, uid, ids)
record = self.browse(cr, uid, ids[0])
assert record.state == 'cancelled' or record.state == 'done' , 'Marketing Workitem shoud be in cancel state.'
-
I set Marketing Workitems in draft state.
-
!python {model: marketing.campaign.workitem}: |
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel'))])
self.button_draft(cr, uid, ids)
record = self.browse(cr, uid, ids[0])
assert record.state == 'todo' or record.state == 'done' , 'Marketing Workitem shoud be in draft state.'
-
I check followup detail of first activity.
-
!python {model: marketing.campaign.workitem}: |
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_0'))])
assert ids, 'Followup item is not created for first activity.'
work_item_id = self.browse(cr ,uid ,ids[0] ,context)
assert work_item_id.res_name, 'Resource Name is not defined.'
-
I process followup of first activity.
-
!python {model: marketing.campaign.workitem}: |
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_0'))])
self.process(cr, uid, ids)
record = self.browse(cr, uid, ids)[0]
assert record.state == "done", "Followup item should be closed after process."
-
I check followup detail of second activity after process of first activity.
-
!python {model: marketing.campaign.workitem}: |
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_1'))])
assert ids, 'Followup item is not created for second activity.'
-
Now I increase credit limit of customer
-
!python {model: res.partner}: |
self.write(cr, uid, [ref("base.res_partner_agrolait")], {'credit_limit':41000}, context=context)
-
I process followup of second activity after set draft.
-
!python {model: marketing.campaign.workitem}: |
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_1'))])
self.button_draft(cr, uid, ids, context=context)
self.process(cr, uid, ids, context=context)
record = self.browse(cr, uid, ids[0], context=context)
assert record.state == "done", "Followup item should be closed after process."
-
I check followup detail of third activity after process of second activity.
-
!python {model: marketing.campaign.workitem}: |
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_2'))])
assert ids, 'Followup item is not created for third activity.'
-
Now I increase credit limit of customer
-
!python {model: res.partner}: |
self.write(cr, uid, [ref("base.res_partner_agrolait")], {'credit_limit':151000}, context=context)
-
I process followup of third activity after set draft.
-
!python {model: marketing.campaign.workitem}: |
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_2'))])
self.button_draft(cr, uid, ids, context=context)
self.process(cr, uid, ids, context=context)
record = self.browse(cr, uid, ids[0], context=context)
assert record.state == "done", "Followup item should be closed after process."
-
I print workitem report.
-
!python {model: marketing.campaign.workitem}: |
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_2'))])
self.preview(cr, uid, ids)
-
I cancel segmentation because of some activity.
-
!workflow {model: marketing.campaign.segment, action: state_cancel_set, ref: marketing_campaign_segment0}
-
I check the segmentation is canceled.
-
!assert {model: marketing.campaign.segment, id: marketing_campaign_segment0}:
- state == 'cancelled'
-
I reopen the segmentation.
-
!workflow {model: marketing.campaign.segment, action: state_draft_set, ref: marketing_campaign_segment0}
-
!workflow {model: marketing.campaign.segment, action: state_running_set, ref: marketing_campaign_segment0}
-
I check the segment on Running mode after started.
-
!assert {model: marketing.campaign.segment, id: marketing_campaign_segment0}:
- state == 'running'
-
I close segmentation After completion of all activity.
-
!workflow {model: marketing.campaign.segment, action: state_done_set, ref: marketing_campaign_segment0}
-
I check the segmentation is done.
-
!assert {model: marketing.campaign.segment, id: marketing_campaign_segment0}:
- state == 'done'
-
I close this campaing.
-
!workflow {model: marketing.campaign.segment, action: state_done_set, ref: marketing_campaign_openerppartnerchannel}
-
I check the campaing is done.
-
!assert {model: marketing.campaign.segment, id: marketing_campaign_openerppartnerchannel}:
- state == 'done'

View File

@ -58,7 +58,7 @@
<field name="name">For OpenERP Discovery Day on May 2010</field>
</record>
<record id="email_template_3" model="email.template">
<record id="email_template_3" model="email.template">
<field name="subject">Thanks for subscribing to the OpenERP Discovery Day</field>
<field name="email_to">info@tinyerp.com</field>
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
@ -72,7 +72,7 @@
<field name="name">For OpenERP Discovery Day</field>
</record>
<record id="email_template_4" model="email.template">
<record id="email_template_4" model="email.template">
<field name="subject">Thanks for buying the OpenERP book</field>
<field name="email_to">info@tinyerp.com</field>
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
@ -91,7 +91,6 @@
<field name="email_to">info@tinyerp.com</field>
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="model_id" ref="crm.model_crm_lead"/>
<field eval="0" name="user_signature"/>
<field name="body_text">Hello, We have very good offer that might suit you.
For our gold partners,We are arranging free technical training on june,2010.
@ -157,6 +156,7 @@
<record id="marketing_campaign_openerpondemandfreetrial0" model="marketing.campaign">
<field name="name">OpenERP OnDemand Free Trial 2010</field>
<field name="object_id" ref="crm.model_crm_lead"/>
<field name="mode">active</field>
<field name="partner_field_id" ref="crm.field_crm_lead_partner_id"/>
</record>

View File

@ -92,13 +92,9 @@ Dashboard provided by this module:
'mrp_demo.xml',
],
'test': [
'test/mrp_procurement.yml',
'test/mrp_packs.yml',
'test/mrp_phantom_bom.yml',
'test/mrp_production_order.yml',
'test/mrp_production_cancel.yml',
'test/mrp_report.yml',
'test/order_demo.yml',
'test/order_process.yml',
'test/cancel_order.yml',
],
'installable': True,
'application': True,

View File

@ -62,8 +62,6 @@ class mrp_workcenter(osv.osv):
}
def on_change_product_cost(self, cr, uid, ids, product_id, context=None):
if context is None:
context = {}
value = {}
if product_id:
@ -253,8 +251,7 @@ class mrp_bom(osv.osv):
all_prod.append(bom.product_id.id)
lines = bom.bom_lines
if lines:
newboms = [a for a in lines if a not in boms]
res = res and check_bom(newboms)
res = res and check_bom([bom_id for bom_id in lines if bom_id not in boms])
return res
return check_bom(boms)
@ -269,14 +266,9 @@ class mrp_bom(osv.osv):
@param product_id: Changed product_id
@return: Dictionary of changed values
"""
if context is None:
context = {}
context['lang'] = self.pool.get('res.users').browse(cr,uid,uid).context_lang
if product_id:
prod = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
v = {'name': prod.name, 'product_uom': prod.uom_id.id}
return {'value': v}
return {'value': {'name': prod.name, 'product_uom': prod.uom_id.id}}
return {}
def _bom_find(self, cr, uid, product_id, product_uom, properties=[]):
@ -320,6 +312,7 @@ class mrp_bom(osv.osv):
phantom = False
if bom.type == 'phantom' and not bom.bom_lines:
newbom = self._bom_find(cr, uid, bom.product_id.id, bom.product_uom.id, properties)
if newbom:
res = self._bom_explode(cr, uid, self.browse(cr, uid, [newbom])[0], factor*bom.product_qty, properties, addthis=True, level=level+10)
result = result + res[0]
@ -361,8 +354,6 @@ class mrp_bom(osv.osv):
def copy_data(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
if context is None:
context = {}
bom_data = self.read(cr, uid, id, [], context=context)
default.update({'name': bom_data['name'] + ' ' + _('Copy'), 'bom_id':False})
return super(mrp_bom, self).copy_data(cr, uid, id, default, context=context)
@ -497,8 +488,7 @@ class mrp_production(osv.osv):
_order = 'priority desc, date_planned asc';
def _check_qty(self, cr, uid, ids, context=None):
orders = self.browse(cr, uid, ids, context=context)
for order in orders:
for order in self.browse(cr, uid, ids, context=context):
if order.product_qty <= 0:
return False
return True
@ -508,14 +498,10 @@ class mrp_production(osv.osv):
]
def unlink(self, cr, uid, ids, context=None):
productions = self.read(cr, uid, ids, ['state'])
unlink_ids = []
for s in productions:
if s['state'] in ['draft','cancel']:
unlink_ids.append(s['id'])
else:
raise osv.except_osv(_('Invalid action !'), _('Cannot delete a manufacturing order in the state \'%s\'!') % s['state'])
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
for production in self.browse(cr, uid, ids, context=context):
if production.state not in ('draft', 'cancel'):
raise osv.except_osv(_('Invalid action !'), _('Cannot delete a manufacturing order in state \'%s\'') % production.state)
return super(mrp_production, self).unlink(cr, uid, ids, context=context)
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
@ -577,8 +563,7 @@ class mrp_production(osv.osv):
return {'value': {
'routing_id': False
}}
bom_pool = self.pool.get('mrp.bom')
bom_point = bom_pool.browse(cr, uid, bom_id, context=context)
bom_point = self.pool.get('mrp.bom').browse(cr, uid, bom_id, context=context)
routing_id = bom_point.routing_id.id or False
result = {
'routing_id': routing_id
@ -592,7 +577,7 @@ class mrp_production(osv.osv):
self.write(cr, uid, ids, {'state': 'picking_except'})
return True
def action_compute(self, cr, uid, ids, properties=[]):
def action_compute(self, cr, uid, ids, properties=[], context=None):
""" Computes bills of material of a product.
@param properties: List containing dictionaries of properties.
@return: No. of products.
@ -747,7 +732,7 @@ class mrp_production(osv.osv):
# if qtys we have to consume is more than qtys available to consume
prod_name = scheduled.product_id.name_get()[0][1]
raise osv.except_osv(_('Warning!'), _('You are going to consume total %s quantities of "%s".\nBut you can consume upto total %s quantities.' % (qty, prod_name, qty_avail)))
if qty < 0.0:
if qty <= 0.0:
# we already have more qtys consumed than we need
continue
@ -855,119 +840,169 @@ class mrp_production(osv.osv):
def _get_auto_picking(self, cr, uid, production):
return True
def action_confirm(self, cr, uid, ids):
""" Confirms production order.
@return: Newly generated picking Id.
"""
picking_id = False
proc_ids = []
seq_obj = self.pool.get('ir.sequence')
pick_obj = self.pool.get('stock.picking')
move_obj = self.pool.get('stock.move')
proc_obj = self.pool.get('procurement.order')
def _make_production_line_procurement(self, cr, uid, production_line, shipment_move_id, context=None):
wf_service = netsvc.LocalService("workflow")
for production in self.browse(cr, uid, ids):
if not production.product_lines:
self.action_compute(cr, uid, [production.id])
production = self.browse(cr, uid, [production.id])[0]
routing_loc = None
pick_type = 'internal'
address_id = False
if production.bom_id.routing_id and production.bom_id.routing_id.location_id:
routing_loc = production.bom_id.routing_id.location_id
if routing_loc.usage <> 'internal':
pick_type = 'out'
address_id = routing_loc.address_id and routing_loc.address_id.id or False
routing_loc = routing_loc.id
pick_name = seq_obj.get(cr, uid, 'stock.picking.' + pick_type)
picking_id = pick_obj.create(cr, uid, {
'name': pick_name,
'origin': (production.origin or '').split(':')[0] + ':' + production.name,
'type': pick_type,
'move_type': 'one',
'state': 'auto',
'address_id': address_id,
'auto_picking': self._get_auto_picking(cr, uid, production),
'company_id': production.company_id.id,
})
source = production.product_id.product_tmpl_id.property_stock_production.id
data = {
'name':'PROD:' + production.name,
'date': production.date_planned,
'product_id': production.product_id.id,
'product_qty': production.product_qty,
'product_uom': production.product_uom.id,
'product_uos_qty': production.product_uos and production.product_uos_qty or False,
'product_uos': production.product_uos and production.product_uos.id or False,
'location_id': source,
'location_dest_id': production.location_dest_id.id,
'move_dest_id': production.move_prod_id.id,
'state': 'waiting',
'company_id': production.company_id.id,
}
res_final_id = move_obj.create(cr, uid, data)
self.write(cr, uid, [production.id], {'move_created_ids': [(6, 0, [res_final_id])]})
moves = []
for line in production.product_lines:
move_id = False
newdate = production.date_planned
if line.product_id.type in ('product', 'consu'):
res_dest_id = move_obj.create(cr, uid, {
'name':'PROD:' + production.name,
'date': production.date_planned,
'product_id': line.product_id.id,
'product_qty': line.product_qty,
'product_uom': line.product_uom.id,
'product_uos_qty': line.product_uos and line.product_uos_qty or False,
'product_uos': line.product_uos and line.product_uos.id or False,
'location_id': routing_loc or production.location_src_id.id,
'location_dest_id': source,
'move_dest_id': res_final_id,
'state': 'waiting',
'company_id': production.company_id.id,
})
moves.append(res_dest_id)
move_id = move_obj.create(cr, uid, {
'name':'PROD:' + production.name,
'picking_id':picking_id,
'product_id': line.product_id.id,
'product_qty': line.product_qty,
'product_uom': line.product_uom.id,
'product_uos_qty': line.product_uos and line.product_uos_qty or False,
'product_uos': line.product_uos and line.product_uos.id or False,
'date': newdate,
'move_dest_id': res_dest_id,
'location_id': production.location_src_id.id,
'location_dest_id': routing_loc or production.location_src_id.id,
'state': 'waiting',
'company_id': production.company_id.id,
})
proc_id = proc_obj.create(cr, uid, {
'name': (production.origin or '').split(':')[0] + ':' + production.name,
'origin': (production.origin or '').split(':')[0] + ':' + production.name,
'date_planned': newdate,
'product_id': line.product_id.id,
'product_qty': line.product_qty,
'product_uom': line.product_uom.id,
'product_uos_qty': line.product_uos and line.product_qty or False,
'product_uos': line.product_uos and line.product_uos.id or False,
'location_id': production.location_src_id.id,
'procure_method': line.product_id.procure_method,
'move_id': move_id,
procurement_order = self.pool.get('procurement.order')
production = production_line.production_id
location_id = production.location_src_id.id
date_planned = production.date_planned
procurement_name = (production.origin or '').split(':')[0] + ':' + production.name
procurement_id = procurement_order.create(cr, uid, {
'name': procurement_name,
'origin': procurement_name,
'date_planned': date_planned,
'product_id': production_line.product_id.id,
'product_qty': production_line.product_qty,
'product_uom': production_line.product_uom.id,
'product_uos_qty': production_line.product_uos and production_line.product_qty or False,
'product_uos': production_line.product_uos and production_line.product_uos.id or False,
'location_id': location_id,
'procure_method': production_line.product_id.procure_method,
'move_id': shipment_move_id,
'company_id': production.company_id.id,
})
wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr)
proc_ids.append(proc_id)
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
self.write(cr, uid, [production.id], {'picking_id': picking_id, 'move_lines': [(6,0,moves)], 'state':'confirmed'})
wf_service.trg_validate(uid, procurement_order._name, procurement_id, 'button_confirm', cr)
return procurement_id
def _make_production_internal_shipment_line(self, cr, uid, production_line, shipment_id, parent_move_id, destination_location_id=False, context=None):
stock_move = self.pool.get('stock.move')
production = production_line.production_id
date_planned = production.date_planned
# Internal shipment is created for Stockable and Consumer Products
if production_line.product_id.type not in ('product', 'consu'):
return False
move_name = _('PROD: %s') % production.name
source_location_id = production.location_src_id.id
if not destination_location_id:
destination_location_id = source_location_id
return stock_move.create(cr, uid, {
'name': move_name,
'picking_id': shipment_id,
'product_id': production_line.product_id.id,
'product_qty': production_line.product_qty,
'product_uom': production_line.product_uom.id,
'product_uos_qty': production_line.product_uos and production_line.product_uos_qty or False,
'product_uos': production_line.product_uos and production_line.product_uos.id or False,
'date': date_planned,
'move_dest_id': parent_move_id,
'location_id': source_location_id,
'location_dest_id': destination_location_id,
'state': 'waiting',
'company_id': production.company_id.id,
})
def _make_production_internal_shipment(self, cr, uid, production, context=None):
ir_sequence = self.pool.get('ir.sequence')
stock_picking = self.pool.get('stock.picking')
routing_loc = None
pick_type = 'internal'
address_id = False
# Take routing address as a Shipment Address.
# If usage of routing location is a internal, make outgoing shipment otherwise internal shipment
if production.bom_id.routing_id and production.bom_id.routing_id.location_id:
routing_loc = production.bom_id.routing_id.location_id
if routing_loc.usage <> 'internal':
pick_type = 'out'
address_id = routing_loc.address_id and routing_loc.address_id.id or False
# Take next Sequence number of shipment base on type
pick_name = ir_sequence.get(cr, uid, 'stock.picking.' + pick_type)
picking_id = stock_picking.create(cr, uid, {
'name': pick_name,
'origin': (production.origin or '').split(':')[0] + ':' + production.name,
'type': pick_type,
'move_type': 'one',
'state': 'auto',
'address_id': address_id,
'auto_picking': self._get_auto_picking(cr, uid, production),
'company_id': production.company_id.id,
})
production.write({'picking_id': picking_id}, context=context)
return picking_id
def _make_production_produce_line(self, cr, uid, production, context=None):
stock_move = self.pool.get('stock.move')
source_location_id = production.product_id.product_tmpl_id.property_stock_production.id
destination_location_id = production.location_dest_id.id
move_name = _('PROD: %s') + production.name
data = {
'name': move_name,
'date': production.date_planned,
'product_id': production.product_id.id,
'product_qty': production.product_qty,
'product_uom': production.product_uom.id,
'product_uos_qty': production.product_uos and production.product_uos_qty or False,
'product_uos': production.product_uos and production.product_uos.id or False,
'location_id': source_location_id,
'location_dest_id': destination_location_id,
'move_dest_id': production.move_prod_id.id,
'state': 'waiting',
'company_id': production.company_id.id,
}
move_id = stock_move.create(cr, uid, data, context=context)
production.write({'move_created_ids': [(6, 0, [move_id])]}, context=context)
return move_id
def _make_production_consume_line(self, cr, uid, production_line, parent_move_id, source_location_id=False, context=None):
stock_move = self.pool.get('stock.move')
production = production_line.production_id
# Internal shipment is created for Stockable and Consumer Products
if production_line.product_id.type not in ('product', 'consu'):
return False
move_name = _('PROD: %s') % production.name
destination_location_id = production.product_id.product_tmpl_id.property_stock_production.id
if not source_location_id:
source_location_id = production.location_src_id.id
move_id = stock_move.create(cr, uid, {
'name': move_name,
'date': production.date_planned,
'product_id': production_line.product_id.id,
'product_qty': production_line.product_qty,
'product_uom': production_line.product_uom.id,
'product_uos_qty': production_line.product_uos and production_line.product_uos_qty or False,
'product_uos': production_line.product_uos and production_line.product_uos.id or False,
'location_id': source_location_id,
'location_dest_id': destination_location_id,
'move_dest_id': parent_move_id,
'state': 'waiting',
'company_id': production.company_id.id,
})
production.write({'move_lines': [(4, move_id)]}, context=context)
return move_id
def action_confirm(self, cr, uid, ids, context=None):
""" Confirms production order.
@return: Newly generated Shipment Id.
"""
shipment_id = False
wf_service = netsvc.LocalService("workflow")
uncompute_ids = filter(lambda x:x, [not x.product_lines and x.id or False for x in self.browse(cr, uid, ids, context=context)])
self.action_compute(cr, uid, uncompute_ids, context=context)
for production in self.browse(cr, uid, ids, context=context):
shipment_id = self._make_production_internal_shipment(cr, uid, production, context=context)
produce_move_id = self._make_production_produce_line(cr, uid, production, context=context)
# Take routing location as a Source Location.
source_location_id = production.location_src_id.id
if production.bom_id.routing_id and production.bom_id.routing_id.location_id:
source_location_id = production.bom_id.routing_id.location_id.id
for line in production.product_lines:
consume_move_id = self._make_production_consume_line(cr, uid, line, produce_move_id, source_location_id=source_location_id, context=context)
shipment_move_id = self._make_production_internal_shipment_line(cr, uid, line, shipment_id, consume_move_id,\
destination_location_id=source_location_id, context=context)
self._make_production_line_procurement(cr, uid, line, shipment_move_id, context=context)
wf_service.trg_validate(uid, 'stock.picking', shipment_id, 'button_confirm', cr)
production.write({'state':'confirmed'}, context=context)
message = _("Manufacturing order '%s' is scheduled for the %s.") % (
production.name,
datetime.strptime(production.date_planned,'%Y-%m-%d %H:%M:%S').strftime('%m/%d/%Y'),
)
self.log(cr, uid, production.id, message)
return picking_id
return shipment_id
def force_production(self, cr, uid, ids, *args):
""" Assigns products.

View File

@ -5,6 +5,32 @@
<record id="base.user_demo" model="res.users">
<field eval="[(4, ref('group_mrp_user'))]" name="groups_id"/>
</record>
<record id="account_assembly_hours" model="account.analytic.account">
<field name="type">normal</field>
<field name="code">ASML - HOUR</field>
<field name="name">Costing Account For Hours of Assembly.</field>
</record>
<record id="account_assembly_cycle" model="account.analytic.account">
<field name="type">normal</field>
<field name="code">ASML - Cycle</field>
<field name="name">Costing Account For Cycle of Assembly.</field>
</record>
<record id="product.product_category_assembly" model="product.category">
<field name="parent_id" ref="product.product_category_services"/>
<field name="name">Assembly Service</field>
</record>
<record id="product.product_assembly" model="product.product">
<field name="standard_price">0.1</field>
<field name="uom_id" ref="product.uom_hour"/>
<field name="uom_po_id" ref="product.uom_hour"/>
<field name="type">service</field>
<field name="name">Assembly Service Cost</field>
<field name="categ_id" ref="product.product_category_assembly"/>
</record>
<!--
@ -14,10 +40,25 @@
<record id="mrp_workcenter_0" model="mrp.workcenter">
<field name="name">Assembly workshop</field>
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="capacity_per_cycle">5</field>
<field name="time_cycle">1</field>
<field name="time_start">0.1</field>
<field name="time_stop">0.1</field>
<field name="time_efficiency">0.87</field>
<field name="product_id" ref="product.product_assembly"/>
<field name="costs_hour">0.1</field>
<field name="costs_hour_account_id" ref="account_assembly_hours"/>
<field name="costs_cycle">0.05</field>
<field name="costs_cycle_account_id" ref="account_assembly_cycle"/>
<field name="costs_journal_id" ref="account.expenses_journal"/>
<field name="costs_general_account_id" ref="account.a_expense"/>
<field name="costs_general_account_id" ref="account.a_expense"/>
<field name="calendar_id" ref="resource.timesheet_group1"/>
</record>
<record id="mrp_workcenter_1" model="mrp.workcenter">
<field name="name">Repairs workshop</field>
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="time_cycle">1</field>
</record>
<!--
Resource: res.company
@ -133,15 +174,12 @@
-->
<record id="mrp_routing_0" model="mrp.routing">
<field name="workcenter_lines">[1]</field>
<field name="name">Assembly Line 1</field>
</record>
<record id="mrp_routing_1" model="mrp.routing">
<field name="workcenter_lines">[2]</field>
<field name="name">Custom Assembly Line</field>
</record>
<record id="mrp_routing_2" model="mrp.routing">
<field name="workcenter_lines">[3]</field>
<field name="name">Component Manufacturing</field>
</record>
@ -154,18 +192,38 @@
<field name="workcenter_id" ref="mrp_workcenter_0"/>
<field name="name">Short time assembly</field>
<field name="hour_nbr">2</field>
<field name="sequence">5</field>
</record>
<record id="mrp_routing_workcenter_1" model="mrp.routing.workcenter">
<field name="routing_id" ref="mrp_routing_1"/>
<field name="workcenter_id" ref="mrp_workcenter_0"/>
<field name="name">long time assembly</field>
<field name="hour_nbr">5</field>
<field name="cycle_nbr">2</field>
<field name="sequence">15</field>
</record>
<record id="mrp_routing_workcenter_3" model="mrp.routing.workcenter">
<field name="routing_id" ref="mrp_routing_1"/>
<field name="workcenter_id" ref="mrp_workcenter_0"/>
<field name="name">Testing</field>
<field name="hour_nbr">1</field>
<field name="sequence">10</field>
</record>
<record id="mrp_routing_workcenter_4" model="mrp.routing.workcenter">
<field name="routing_id" ref="mrp_routing_1"/>
<field name="workcenter_id" ref="mrp_workcenter_1"/>
<field name="name">Packing</field>
<field name="hour_nbr">0.5</field>
<field name="sequence">5</field>
</record>
<record id="mrp_routing_workcenter_2" model="mrp.routing.workcenter">
<field name="routing_id" ref="mrp_routing_2"/>
<field name="workcenter_id" ref="mrp_workcenter_0"/>
<field name="cycle_nbr">0.5</field>
<field name="hour_nbr">3</field>
<field name="sequence">5</field>
<field name="name">assembly main + processor + fan</field>
</record>
@ -214,7 +272,7 @@
<field model="product.product" name="product_id" ref="product.product_product_20"/>
</record>
<record id="mrp_bom_5" model="mrp.bom">
<field name="name">RAM on demand</field>
<field name="name">RAM512 on demand</field>
<field name="sequence">18</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
@ -254,12 +312,12 @@
<field model="product.product" name="product_id" ref="product.product_product_23"/>
</record>
<record id="mrp_bom_11" model="mrp.bom">
<field name="name">RAM on demand</field>
<field name="name">RAM256 on demand</field>
<field name="sequence">36</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="type">phantom</field>
<field model="product.product" name="product_id" ref="product.product_product_23"/>
<field model="product.product" name="product_id" ref="product.product_product_21"/>
</record>
<record id="mrp_bom_13" model="mrp.bom">
@ -267,42 +325,28 @@
<field name="sequence">38</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="routing_id" ref="mrp_routing_1"/>
<field model="product.product" name="product_id" ref="product.product_product_cpu3"/>
</record>
<record id="mrp_bom_kit" model="mrp.bom">
<record id="mrp_bom_kit3" model="mrp.bom">
<field name="code">KIT</field>
<field name="name">Kit Mouse</field>
<field name="name">Kit Keyboard + Mouse</field>
<field name="sequence">40</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="type">normal</field>
<field name="type">phantom</field>
<field name="bom_id" ref="mrp_bom_10"/>
<field model="product.product" name="product_id" ref="product.product_product_25"/>
</record>
<record id="mrp_bom_clavier" model="mrp.bom">
<field name="name">Keyboard</field>
<field name="sequence">42</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="bom_id" ref="mrp_bom_kit"/>
<field model="product.product" name="product_id" ref="product.product_product_24"/>
</record>
<record id="mrp_bom_mouse" model="mrp.bom">
<field name="name">Mouse</field>
<field name="sequence">44</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="bom_id" ref="mrp_bom_kit"/>
<field model="product.product" name="product_id" ref="product.product_product_25"/>
<field model="product.product" name="product_id" ref="product.product_product_26"/>
</record>
<record id="mrp_bom_16" model="mrp.bom">
<field name="name">Moon PC</field>
<field name="sequence">45</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="bom_id" ref="mrp_bom_10"/>
<field model="product.product" name="product_id" ref="product.product_product_pc1"/>
<field model="product.product" name="product_id" ref="product.product_product_pc2"/>
</record>
<record id="mrp_bom_18" model="mrp.bom">
<field name="name">Mainboard ASUStek A7N8X</field>
@ -502,6 +546,35 @@
<field name="bom_id" ref="mrp_bom_0"/>
<field model="product.product" name="product_id" ref="product.product_product_ram"/>
</record>
<record id="mrp_bom_kit1" model="mrp.bom">
<field name="code">KIT</field>
<field name="sequence">15</field>
<field name="name">Kit Keyboard + Mouse</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="type">normal</field>
<field model="product.product" name="product_id" ref="product.product_product_26"/>
</record>
<record id="mrp_bom_mouse2" model="mrp.bom">
<field name="name">Mouse</field>
<field name="sequence">121</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="bom_id" ref="mrp_bom_kit1"/>
<field model="product.product" name="product_id" ref="product.product_product_25"/>
</record>
<record id="mrp_bom_clavier2" model="mrp.bom">
<field name="name">Keyboard</field>
<field name="sequence">123</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="bom_id" ref="mrp_bom_kit1"/>
<field model="product.product" name="product_id" ref="product.product_product_24"/>
</record>
<record id="mrp_bom_41" model="mrp.bom">
<field name="name">Regular processor config</field>
<field name="sequence">111</field>
@ -536,176 +609,496 @@
<field name="name">Kit Keyboard + Mouse</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="type">normal</field>
<field name="type">phantom</field>
<field name="bom_id" ref="mrp_bom_9"/>
<field model="product.product" name="product_id" ref="product.product_product_26"/>
</record>
<record id="mrp_bom_mouse2" model="mrp.bom">
<field name="name">Mouse</field>
<field name="sequence">121</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="bom_id" ref="mrp_bom_kit2"/>
<field model="product.product" name="product_id" ref="product.product_product_25"/>
</record>
<record id="mrp_bom_clavier2" model="mrp.bom">
<field name="name">Keyboard</field>
<field name="sequence">123</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="bom_id" ref="mrp_bom_kit2"/>
<field model="product.product" name="product_id" ref="product.product_product_24"/>
</record>
<!--
Resource: mrp.bom new EVV
-->
<record id="mrp_bom_defaultbomforshelfofcm0" model="mrp.bom">
<field name="name">Default BOM for Shelf of 100cm</field>
<field name="code">SHE100</field>
<field name="sequence">129</field>
<field name="sequence">10</field>
<field name="product_id" ref="product.product_product_shelfofcm0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="product_qty">1.0</field>
<field name="routing_id" ref="mrp.mrp_routing_1"/>
</record>
<!-- BoMs for 1 Shelf 100cm
Product Ref. Qty UoM Type of BoM
SIDEPAN 2 PCE normal
PROFIL 4 PCE phantom
RPAN100 1 PCE phantom
RCK100 3 PCE phantom
-->
<record id="mrp_bom_sidepanel0" model="mrp.bom">
<field name="name">Side Panel</field>
<field name="sequence">101</field>
<field name="product_id" ref="product.product_product_sidepanel0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">2.0</field>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
</record>
<record id="mrp_bom_assemblysection0" model="mrp.bom">
<field name="name">Assembly Section</field>
<field name="sequence">123</field>
<field name="sequence">102</field>
<field name="product_id" ref="product.product_product_assemblysection0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">4.0</field>
<field model="mrp.bom" name="bom_id" search="[('name', '=', u'Default BOM for Shelf of 100cm')]"/>
</record>
<record id="mrp_bom_sidepanel0" model="mrp.bom">
<field name="name">Side Panel</field>
<field name="sequence">125</field>
<field name="product_id" ref="product.product_product_sidepanel0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">2.0</field>
<field model="mrp.bom" name="bom_id" search="[('name', '=', u'Default BOM for Shelf of 100cm')]"/>
</record>
<record id="mrp_bom_metalcleats0" model="mrp.bom">
<field name="name">Metal Cleats</field>
<field name="sequence">127</field>
<field name="product_id" ref="product.product_product_metalcleats0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">12.0</field>
<field model="mrp.bom" name="bom_id" search="[('name', '=', u'Default BOM for Shelf of 100cm')]"/>
<field name="product_qty">4.0</field>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
<field name="type">phantom</field>
</record>
<record id="mrp_bom_rearpanelarm0" model="mrp.bom">
<field name="sequence">131</field>
<field name="sequence">103</field>
<field name="product_id" ref="product.product_product_rearpanelarm0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
<field name="product_qty">1.0</field>
<field name="product_qty">1.0</field>
<field name="name">Rear panel SHE100</field>
<field name="type">phantom</field>
</record>
<record id="mrp_bom_shelf0" model="mrp.bom">
<field name="sequence">133</field>
<field name="sequence">104</field>
<field name="product_id" ref="product.product_product_shelf0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
<field name="product_qty">3.0</field>
<field name="name">Shelf 100</field>
<field name="product_qty">3.0</field>
<field name="name">RCK100</field>
<field name="type">phantom</field>
</record>
<!--
BOMs for 1 RCK100 PCE
Product Ref Qty UoM Type of BoM
SPAN100 1 PCE phantom
METC000 4 PCE normal
-->
<record id="mrp_bom_shelf1" model="mrp.bom">
<field name="sequence">133</field>
<field name="product_id" ref="product.product_product_shelf0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="name">RCK100</field>
</record>
<record id="mrp_bom_shelf0_span100" model="mrp.bom">
<field name="sequence">1331</field>
<field name="product_id" ref="product.product_product_span100"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="bom_id" ref="mrp_bom_shelf1"/>
<field name="product_qty">1.0</field>
<field name="type">phantom</field> <!-- It should be phantom -->
<field name="name">SPAN100</field>
</record>
<record id="mrp_bom_shelf0_metalcleats0" model="mrp.bom">
<field name="sequence">1332</field>
<field name="product_id" ref="product.product_product_metalcleats0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="bom_id" ref="mrp_bom_shelf1"/>
<field name="product_qty">4.0</field>
<field name="name">METC000</field>
</record>
<!--
Bill of Materials for 1 SPAN100 PCE
Product Code Quantity Unit of Measure
WOOD010 0.083 m
-->
<record id="mrp_bom_span100" model="mrp.bom">
<field name="sequence">135</field>
<field name="product_id" ref="product.product_product_span100"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="name">SPAN100</field>
</record>
<record id="mrp_bom_span100_wood010" model="mrp.bom">
<field name="sequence">1351</field>
<field name="product_id" ref="product.product_product_woodmm10"/>
<field name="product_uom" ref="product.product_uom_meter"/>
<field name="bom_id" ref="mrp_bom_span100"/>
<field name="product_qty">0.083</field>
<field name="name">WOOD010</field>
</record>
<!-- BoMs for 1 Assembly Section PCE
Product Ref. Qty UoM
LIN40 0.25 Meter
-->
<record id="mrp_bom_assemblysection1" model="mrp.bom">
<field name="name">Assembly Section</field>
<field name="sequence">123</field>
<field name="product_id" ref="product.product_product_assemblysection0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="routing_id" ref="mrp.mrp_routing_0"/>
</record>
<record id="mrp_bom_woodlintelm0" model="mrp.bom">
<field name="sequence">135</field>
<field name="sequence">1231</field>
<field name="product_id" ref="product.product_product_woodlintelm0"/>
<field name="product_uom" ref="product.product_uom_meter"/>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
<field name="product_qty">1.0</field>
<field model="mrp.bom" name="bom_id" search="[('name', '=', u'Assembly Section')]"/>
<field name="name">Wood Lintel 4m</field>
<field name="product_qty">0.25</field>
<field name="bom_id" ref="mrp_bom_assemblysection1"/>
<field name="name">Wood Lintel 0.25m</field>
</record>
<!--
Bill of Materials for 1 RPAN100 PCE
Product Code Quantity Unit of Measure
WOOD002 0.25 m
-->
<record id="mrp_bom_rearpanelarm1" model="mrp.bom">
<field name="sequence">131</field>
<field name="product_id" ref="product.product_product_rearpanelarm0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="name">Rear panel SHE100</field>
<field name="routing_id" ref="mrp.mrp_routing_0"/>
</record>
<record id="mrp_bom_rearpanelarm1_wood002" model="mrp.bom">
<field name="sequence">1311</field>
<field name="product_id" ref="product.product_product_woodmm0"/>
<field name="product_uom" ref="product.product_uom_meter"/>
<field name="bom_id" ref="mrp_bom_rearpanelarm1"/>
<field name="product_qty">0.25</field>
<field name="name">WOOD002 0.25m</field>
</record>
<record id="mrp_bom_defaultbomforshelfofcm1" model="mrp.bom">
<field name="name">Default BOM for Shelf of 200cm</field>
<field name="code">SHE200</field>
<field name="sequence">137</field>
<field name="product_id" ref="product.product_product_shelfofcm0"/>
<field name="sequence">137</field>
<field name="product_id" ref="product.product_product_shelfofcm1"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
</record>
<record id="mrp_bom_defaultbomforkitshelfofcm0" model="mrp.bom">
<field name="name">Default BOM for KIT Shelf of 100cm</field>
<field name="code">SHE100KIT</field>
<field name="sequence">139</field>
<field name="product_id" ref="product.product_product_kitshelfofcm0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="type">phantom</field>
</record>
<record id="mrp_bom_assemblysection2" model="mrp.bom">
<field name="name">Assembly Section</field>
<field name="sequence">143</field>
<field name="product_id" ref="product.product_product_assemblysection0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">4.0</field>
<field name="bom_id" ref="mrp_bom_defaultbomforkitshelfofcm0"/>
</record>
<record id="mrp_bom_sidepanel2" model="mrp.bom">
<field name="name">Side Panel</field>
<field name="sequence">145</field>
<field name="product_id" ref="product.product_product_sidepanel0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">2.0</field>
<field name="bom_id" ref="mrp_bom_defaultbomforkitshelfofcm0"/>
<field name="product_qty">1.0</field>
</record>
<!--Defining BoMs of Shelf 200cm
Product Ref. Qty UoM Type of BoM
RPAN200 1 PCE normal
PROFIL 4 PCE normal
SIDEPAN 2 PCE normal
METC000 12 PCE normal
RCK200 3 PCE normal
-->
<record id="mrp_bom_rearpanelarm2" model="mrp.bom">
<field name="sequence">147</field>
<field name="product_id" ref="product.product_product_rearpanelarm0"/>
<field name="sequence">147</field>
<field name="product_id" ref="product.product_product_rearpanelarm1"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
<field name="product_qty">1.0</field>
<field name="product_qty">1.0</field>
<field name="name">Rear panel SHE200</field>
</record>
<record id="mrp_bom_assemblysection3" model="mrp.bom">
<field name="name">Assembly Section</field>
<field name="sequence">149</field>
<field name="sequence">149</field>
<field name="product_id" ref="product.product_product_assemblysection0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">4.0</field>
<field name="product_qty">4.0</field>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
</record>
<record id="mrp_bom_sidepanel3" model="mrp.bom">
<field name="name">Side Panel</field>
<field name="sequence">151</field>
<field name="sequence">151</field>
<field name="product_id" ref="product.product_product_sidepanel0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">2.0</field>
<field name="product_qty">2.0</field>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
</record>
<record id="mrp_bom_shelf2" model="mrp.bom">
<field name="sequence">153</field>
<field name="sequence">153</field>
<field name="product_id" ref="product.product_product_shelf1"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
<field name="product_qty">3.0</field>
<field name="product_qty">3.0</field>
<field name="name">Shelf 200</field>
</record>
<record id="mrp_bom_metalcleats3" model="mrp.bom">
<field name="name">Metal Cleats</field>
<field name="sequence">155</field>
<field name="sequence">155</field>
<field name="product_id" ref="product.product_product_metalcleats0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">12.0</field>
<field name="product_qty">12.0</field>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
</record>
<record id="mrp_bom_defaultbomforkitshelfofcm0" model="mrp.bom">
<field name="name">Default BOM for KIT Shelf of 100cm</field>
<field name="code">SHE100KIT</field>
<field name="sequence">139</field>
<field name="product_id" ref="product.product_product_kitshelfofcm0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="type">phantom</field>
</record>
<!--Defining BoMs of KIT Shelf 100cm
Product Ref. Qty UoM Type of BoM
PROFIL 4 PCE normal
SIDEPAN 2 PCE normal
-->
<record id="mrp_bom_assemblysection2" model="mrp.bom">
<field name="name">Assembly Section</field>
<field name="sequence">143</field>
<field name="product_id" ref="product.product_product_assemblysection0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">4.0</field>
<field name="bom_id" ref="mrp_bom_defaultbomforkitshelfofcm0"/>
</record>
<record id="mrp_bom_sidepanel2" model="mrp.bom">
<field name="name">Side Panel</field>
<field name="sequence">145</field>
<field name="product_id" ref="product.product_product_sidepanel0"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">2.0</field>
<field name="bom_id" ref="mrp_bom_defaultbomforkitshelfofcm0"/>
</record>
<record id="product.product_uom_dozen" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">Dozen</field>
<field name="factor" eval="0.083"/>
<field name="uom_type">bigger</field>
</record>
<record id="mrp_production_shelf100cm" model="mrp.production">
<field name="product_id" ref="product.product_product_shelfofcm0"/>
<field name="product_uom" ref="product.product_uom_dozen"/>
<field name="product_qty">3</field>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
</record>
<record id="product_uom_categ_fluid" model="product.uom.categ">
<field name="name">Fluid</field>
</record>
<record id="product_uom_litre" model="product.uom">
<field name="name">Litre</field>
<field name="category_id" ref="product_uom_categ_fluid"/>
<field name="factor">1.0</field>
</record>
<record id="product_orangejuice" model="product.product">
<field name="categ_id" ref="product.cat1"/>
<field name="name">Orange Juice</field>
<field name="procure_method">make_to_order</field>
<field name="supply_method">produce</field>
<field name="type">product</field>
<field name="uom_id" ref="product_uom_litre"/>
<field name="uom_po_id" ref="product_uom_litre"/>
</record>
<record id="product_orange" model="product.product">
<field name="categ_id" ref="product.cat1"/>
<field name="name">Orange</field>
<field name="procure_method">make_to_stock</field>
<field name="supply_method">buy</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_kgm"/>
<field name="uom_po_id" ref="product.product_uom_kgm"/>
</record>
<record id="orange_supplier_asus" model="product.supplierinfo">
<field name="product_id" ref="product_orange"/>
<field name="name" ref="base.res_partner_asus"/>
<field name="min_qty">1.0</field>
<field name="product_uom" ref="product.product_uom_kgm"/>
</record>
<record id="product_sugar" model="product.product">
<field name="categ_id" ref="product.cat1"/>
<field name="name">Sugar</field>
<field name="procure_method">make_to_stock</field>
<field name="supply_method">buy</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_kgm"/>
<field name="uom_po_id" ref="product.product_uom_kgm"/>
</record>
<record id="sugar_supplier_desertic" model="product.supplierinfo">
<field name="product_id" ref="product_sugar"/>
<field name="name" ref="base.res_partner_desertic_hispafuentes"/>
<field name="product_uom" ref="product.product_uom_kgm"/>
<field name="min_qty">2.0</field>
</record>
<record id="product_water" model="product.product">
<field name="categ_id" ref="product.cat1"/>
<field name="name">Water</field>
<field name="procure_method">make_to_order</field>
<field name="supply_method">buy</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_litre"/>
<field name="uom_po_id" ref="product_uom_litre"/>
</record>
<record id="water_supplier_agrolait" model="product.supplierinfo">
<field name="product_id" ref="product_water"/>
<field name="name" ref="base.res_partner_agrolait"/>
<field name="product_uom" ref="product_uom_litre"/>
<field name="min_qty">2.0</field>
</record>
<record id="mrp_bom_orangejuice" model="mrp.bom">
<field name="sequence">200</field>
<field name="product_id" ref="product_orangejuice"/>
<field name="product_uom" ref="product_uom_litre"/>
<field name="product_qty">1.0</field>
<field name="name">Orange Juice</field>
<field name="type">phantom</field>
</record>
<record id="raw_orangejuice_orange" model="mrp.bom">
<field name="sequence">201</field>
<field name="product_id" ref="product_orange"/>
<field name="product_uom" ref="product.product_uom_kgm"/>
<field name="product_qty">0.5</field>
<field name="name">Orange</field>
<field name="type">normal</field>
<field name="bom_id" ref="mrp_bom_orangejuice"/>
</record>
<record id="raw_orangejuice_sugar" model="mrp.bom">
<field name="sequence">202</field>
<field name="product_id" ref="product_sugar"/>
<field name="product_uom" ref="product.product_uom_kgm"/>
<field name="product_qty">0.02</field>
<field name="name">Sugar</field>
<field name="type">normal</field>
<field name="bom_id" ref="mrp_bom_orangejuice"/>
</record>
<record id="raw_orangejuice_water" model="mrp.bom">
<field name="sequence">203</field>
<field name="product_id" ref="product_water"/>
<field name="product_uom" ref="product_uom_litre"/>
<field name="product_qty">0.80</field>
<field name="name">Water</field>
<field name="type">normal</field>
<field name="bom_id" ref="mrp_bom_orangejuice"/>
</record>
<record id="stock_rule_orange" model="stock.warehouse.orderpoint">
<field name="product_id" ref="product_orange"/>
<field name="product_uom" ref="product.product_uom_kgm"/>
<field name="product_max_qty">10.0</field>
<field name="product_min_qty">5.0</field>
<field name="qty_multiple">1</field>
<field name="warehouse_id" ref="stock.warehouse0"/>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="stock_rule_sugar" model="stock.warehouse.orderpoint">
<field name="product_id" ref="product_sugar"/>
<field name="product_uom" ref="product.product_uom_kgm"/>
<field name="product_max_qty">4.0</field>
<field name="product_min_qty">2.0</field>
<field name="qty_multiple">1</field>
<field name="logic">max</field>
<field name="warehouse_id" ref="stock.warehouse0"/>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="mrp_production_orangejuice" model="mrp.production">
<field name="product_id" ref="product_orangejuice"/>
<field name="product_uom" ref="product_uom_litre"/>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="bom_id" ref="mrp_bom_orangejuice"/>
<field name="product_qty">100.00</field>
</record>
<record id="product_shirt" model="product.product">
<field name="categ_id" ref="product.cat1"/>
<field name="name">Shirt</field>
<field name="procure_method">make_to_stock</field>
<field name="supply_method">produce</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
</record>
<record id="product_cloth" model="product.product">
<field name="categ_id" ref="product.cat1"/>
<field name="name">Cloth</field>
<field name="procure_method">make_to_order</field>
<field name="supply_method">buy</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
</record>
<record id="cloth_supplier_maxtor" model="product.supplierinfo">
<field name="product_id" ref="product_cloth"/>
<field name="name" ref="base.res_partner_maxtor"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="min_qty">300.0</field>
</record>
<record id="product_buttons" model="product.product">
<field name="categ_id" ref="product.cat1"/>
<field name="name">Shirt Buttons</field>
<field name="procure_method">make_to_stock</field>
<field name="supply_method">buy</field>
<field name="type">product</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
</record>
<record id="buttons_supplier_asus" model="product.supplierinfo">
<field name="product_id" ref="product_buttons"/>
<field name="name" ref="base.res_partner_asus"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="min_qty">100.0</field>
</record>
<record id="mrp_bom_shirt" model="mrp.bom">
<field name="sequence">300</field>
<field name="product_id" ref="product_shirt"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="name">Shirt</field>
</record>
<record id="raw_shirt_cloth" model="mrp.bom">
<field name="sequence">301</field>
<field name="product_id" ref="product_cloth"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">1.0</field>
<field name="name">Cloth</field>
<field name="type">normal</field>
<field name="bom_id" ref="mrp_bom_shirt"/>
</record>
<record id="raw_shirt_buttons" model="mrp.bom">
<field name="sequence">302</field>
<field name="product_id" ref="product_buttons"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">8.0</field>
<field name="name">Shirt Buttons</field>
<field name="type">normal</field>
<field name="bom_id" ref="mrp_bom_shirt"/>
</record>
<record id="stock_shirt_buttons" model="stock.warehouse.orderpoint">
<field name="product_id" ref="product_buttons"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_max_qty">50.0</field>
<field name="product_min_qty">10.0</field>
<field name="qty_multiple">1</field>
<field name="logic">max</field>
<field name="warehouse_id" ref="stock.warehouse0"/>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="mrp_production_shirt" model="mrp.production">
<field name="product_id" ref="product_shirt"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="bom_id" ref="mrp_bom_shirt"/>
</record>
<record id="mrp_production_order1" model="mrp.production">
<field name="product_id" ref="product.product_product_pc1"/>
<field name="product_uom" ref="product.product_uom_unit"/>
@ -714,11 +1107,9 @@
<field name="bom_id" ref="mrp.mrp_bom_9"/>
<field name="routing_id" ref="mrp.mrp_routing_0"/>
</record>
<workflow action="button_confirm" model="mrp.production" ref="mrp_production_order1"/>
<!-- Run Scheduler -->
<function model="procurement.order" name="run_scheduler"/>
</data>
</openerp>

View File

@ -317,7 +317,7 @@
<field name="arch" type="xml">
<form string="Bill of Material">
<group colspan="4" col="6">
<field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
<field name="product_id" on_change="onchange_product_id(product_id, name, context)" select="1"/>
<field name="name" select="1"/>
<field name="code" select="1" string="Reference" groups="base.group_extended"/>
<newline/>

View File

@ -136,7 +136,7 @@
<field name="signal">subflow.cancel</field>
</record>
<record id="trans_produce_make_done" model="workflow.transition">
<record id="procurement.trans_produce_make_done" model="workflow.transition">
<field name="act_from" ref="act_produce"/>
<field name="act_to" ref="procurement.act_make_done"/>
<field name="signal">subflow.done</field>

View File

@ -25,37 +25,9 @@ from tools.translate import _
class product_product(osv.osv):
_inherit = "product.product"
def get_product_accounts(self, cr, uid, product_id, context=None):
""" To get the stock input account, stock output account and stock journal related to product.
@param product_id: product id
@return: dictionary which contains information regarding stock input account, stock output account and stock journal
"""
product_obj = self.pool.get('product.product').browse(cr, uid, product_id, False)
res = super(product_product,self).get_product_accounts(cr, uid, product_id, context=context)
stock_input_acc = product_obj.property_stock_account_input and product_obj.property_stock_account_input.id or False
if not stock_input_acc:
stock_input_acc = product_obj.categ_id.property_stock_account_input_categ and product_obj.categ_id.property_stock_account_input_categ.id or False
stock_output_acc = product_obj.property_stock_account_output and product_obj.property_stock_account_output.id or False
if not stock_output_acc:
stock_output_acc = product_obj.categ_id.property_stock_account_output_categ and product_obj.categ_id.property_stock_account_output_categ.id or False
journal_id = product_obj.categ_id.property_stock_journal and product_obj.categ_id.property_stock_journal.id or False
res.update({'stock_account_input': stock_input_acc})
res.update({'stock_account_output': stock_output_acc})
res.update({'stock_journal': journal_id})
return res
_columns = {
"bom_ids": fields.one2many('mrp.bom', 'product_id','Bill of Materials'),
}
# Removed do_change_standard_price for the fix of lp:747056
def copy(self, cr, uid, id, default=None, context=None):
if not default:
default = {}

View File

@ -0,0 +1,25 @@
-
I first confirm order for shirt.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_shirt}
-
In order to cancel the production order, I first cancel its picking.
-
!function {model: stock.picking, name: action_cancel}:
- model: mrp.production
eval: "[obj(ref('mrp_production_shirt')).picking_id.id]"
-
Now I cancel the production order.
-
!workflow {model: mrp.production, action: button_cancel, ref: mrp_production_shirt}
-
Now I check that the production order is cancelled.
-
!assert {model: mrp.production, id: mrp_production_shirt}:
- state == 'cancel'
-
I remove cancelled production order.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shirt"), context=context)
self.unlink(cr, uid, [order.id])

View File

@ -1,103 +0,0 @@
-
In order to test the Packs in OpenERP, we will try to sell a "Pack of 24
beers" which is composed of 24 "Beers" and a "Beers Pack".
-
I start by creating the Beers product.
-
!record {model: product.product, id: product_product_beers0}:
categ_id: product.cat1
name: Beers
procure_method: make_to_stock
seller_ids:
- delay: 1
name: base.res_partner_agrolait
min_qty: 2.0
supply_method: buy
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I create the "Beers Pack" product.
-
!record {model: product.product, id: product_product_beerspack0}:
categ_id: product.cat1
name: Beers Pack
procure_method: make_to_stock
seller_ids:
- delay: 1
name: base.res_partner_asus
min_qty: 2.0
supply_method: buy
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I create the "Pack of 24 beers" product
-
!record {model: product.product, id: product_product_packofbeers0}:
categ_id: product.cat1
name: Pack of 24 Beers
procure_method: make_to_order
supply_method: produce
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I define the Phantom Bill of Material for the "Pack of 24 beers"
-
!record {model: mrp.bom, id: mrp_bom_packofbeers0}:
bom_lines:
- company_id: base.main_company
name: Beers
product_id: product_product_beers0
product_qty: 24.0
product_uom: product.product_uom_unit
type: normal
- company_id: base.main_company
name: Beers Pack
product_id: product_product_beerspack0
product_qty: 1.0
product_uom: product.product_uom_unit
type: normal
name: Pack of 24 Beers
product_id: product_product_packofbeers0
product_qty: 1.0
product_uom: product.product_uom_unit
type: phantom
-
As all my data are created, I will create an outgoing order picking for a
"Pack of 24 Beers"
-
!record {model: stock.picking, id: picking_out}:
address_id: base.res_partner_address_tang
company_id: base.main_company
invoice_state: none
move_lines:
- company_id: base.main_company
location_dest_id: stock.stock_location_customers
location_id: stock.stock_location_stock
name: Pack of 24 Beers
product_id: product_product_packofbeers0
product_qty: 2.0
product_uom: product.product_uom_unit
move_type: direct
type: out
-
I validate the newly created picking.
-
!python {model: stock.picking}: |
self.draft_validate(cr, uid, [ref("picking_out")], {
"active_ids": [ref("stock.menu_action_picking_tree")],
"active_id": ref("stock.menu_action_picking_tree"), }
)
-
I check that my Picking of a "Pack of 24 beers" has been automatically
converted to a picking of 24 beers and a pack of beer, so that my
stock of beers remains exact.
-
!assert {model: stock.picking, id: picking_out, string: pack_of_beer_splitted}:
- len(move_lines) >= 2
- move_lines[0].product_id.id <> move_lines[1].product_id.id
- move_lines[0].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))
- move_lines[1].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))

View File

@ -1,273 +0,0 @@
-
In order to test the mrp phantom bom type in OpenERP, I will create products
and then I will create Phantom bom structure for those products.
-
I create BOM category fluid for Orange Juice
-
!record {model: product.uom.categ, id: product_uom_categ_fluid}:
name: Fluid
-
I create the products required to produce some orange juices with Oranges, Sugar and Water.
-
!record {model: product.uom, id: product_uom_litre0}:
category_id: product_uom_categ_fluid
factor: 1.0
name: Litre
rounding: 0.01
-
I create record for product Orange Juice.
-
!record {model: product.product, id: product_product_orangejuice0}:
categ_id: product.cat1
name: Orange Juice
procure_method: make_to_order
supply_method: produce
type: product
uom_id: product_uom_litre0
uom_po_id: product_uom_litre0
property_stock_inventory: stock.location_inventory
property_stock_procurement: stock.location_procurement
property_stock_production: stock.location_production
-
I create record for product Orange.
-
!record {model: product.product, id: product_product_orange0}:
categ_id: product.cat1
name: Orange
procure_method: make_to_stock
seller_ids:
- delay: 1
name: base.res_partner_asus
min_qty: 1.0
product_uom: product.product_uom_kgm
supply_method: buy
type: product
uom_id: product.product_uom_kgm
uom_po_id: product.product_uom_kgm
property_stock_inventory: stock.location_inventory
property_stock_procurement: stock.location_procurement
property_stock_production: stock.location_production
-
I create record for product Sugar.
-
!record {model: product.product, id: product_product_sugar0}:
categ_id: product.cat1
name: Sugar
procure_method: make_to_stock
seller_ids:
- delay: 1
name: base.res_partner_desertic_hispafuentes
min_qty: 2.0
product_uom: product.product_uom_kgm
supply_method: buy
type: product
uom_id: product.product_uom_kgm
uom_po_id: product.product_uom_kgm
property_stock_inventory: stock.location_inventory
property_stock_procurement: stock.location_procurement
property_stock_production: stock.location_production
-
I create record for product Water.
-
!record {model: product.product, id: product_product_water0}:
categ_id: product.cat1
name: Water
procure_method: make_to_order
seller_ids:
- delay: 1
name: base.res_partner_agrolait
product_uom: product_uom_litre0
min_qty: 2.0
supply_method: buy
type: consu
uom_id: product_uom_litre0
uom_po_id: product_uom_litre0
property_stock_inventory: stock.location_inventory
property_stock_procurement: stock.location_procurement
property_stock_production: stock.location_production
-
I define the BoM to produce an orange juice.
-
!record {model: mrp.bom, id: mrp_bom_orangejuice0}:
company_id: base.main_company
name: Orange Juice
product_efficiency: 1.0
product_id: product_product_orangejuice0
product_qty: 1.0
product_uom: product_uom_litre0
type: phantom
-
changes UOM and name if product change.
-
!python {model: mrp.bom}: |
production_id = self.browse(cr, uid, [ref('mrp_bom_orangejuice0')], context=context)[0]
self.onchange_product_id(cr, uid, [ref('mrp_bom_orangejuice0')], production_id.product_id.id, False)
-
I create bom lines for BoM for Orange Juice.
-
!record {model: mrp.bom, id: mrp_bom_orangejuice0}:
bom_lines:
- bom_id: mrp_bom_orangejuice0
company_id: base.main_company
name: Orange
product_efficiency: 1.0
product_id: product_product_orange0
product_qty: 0.5
product_uom: product.product_uom_kgm
type: normal
- bom_id: mrp_bom_orangejuice0
company_id: base.main_company
name: Sugar
product_efficiency: 1.0
product_id: product_product_sugar0
product_qty: 0.02
product_uom: product.product_uom_kgm
type: normal
- bom_id: mrp_bom_orangejuice0
company_id: base.main_company
name: Water
product_efficiency: 1.0
product_id: product_product_water0
product_qty: 0.80000000000000004
product_uom: product_uom_litre0
type: normal
-
I define Minimum stock rules for my stockable product "Orange".
-
!record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}:
company_id: base.main_company
location_id: stock.stock_location_stock
logic: max
name: OP/00002
product_id: product_product_orange0
product_max_qty: 10.0
product_min_qty: 5.0
product_uom: product.product_uom_kgm
qty_multiple: 1
warehouse_id: stock.warehouse0
-
I define Minimum stock rules for my stockable product "Sugar".
-
!record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op1}:
company_id: base.main_company
location_id: stock.stock_location_stock
logic: max
name: OP/00003
product_id: product_product_sugar0
product_max_qty: 4.0
product_min_qty: 2.0
product_uom: product.product_uom_kgm
qty_multiple: 1
warehouse_id: stock.warehouse0
-
I want to produce 100 litres of Orange juice. I am creating a manufacturing order for this.
I want to see how much quantities of sub products I need, to produce the Orange juice.
-
I compute the data. I get the bill of material of Orange juice and list of
scheduled products according to my bom.
-
!record {model: mrp.production, id: mrp_production_mo0}:
company_id: base.main_company
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_output
location_src_id: stock.stock_location_stock
product_id: product_product_orangejuice0
product_qty: 100.0
product_uom: product_uom_litre0
-
Creating an mrp.production record. Computing Bills of materials.
-
!record {model: mrp.production, id: mrp_production_mo0}:
bom_id: mrp.mrp_bom_orangejuice0
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_output
location_src_id: stock.stock_location_stock
product_id: mrp.product_product_orangejuice0
product_lines:
- name: Orange
product_id: mrp.product_product_orange0
product_qty: 50.0
product_uom: product.product_uom_kgm
production_id: mrp_production_mo0
- name: Sugar
product_id: mrp.product_product_sugar0
product_qty: 2.0
product_uom: product.product_uom_kgm
production_id: mrp_production_mo0
- name: Water
product_id: mrp.product_product_water0
product_qty: 80.0
product_uom: mrp.product_uom_litre0
production_id: mrp_production_mo0
product_qty: 100.0
product_uom: mrp.product_uom_litre0
-
I confirm the order.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0}
-
I am checking Procurement orders. There are 3 orders generated for Oranges, Sugar and Water.
-
!python {model: procurement.order}: |
proc_ids = self.search(cr, uid, [('product_id','in',[ref('product_product_orange0'),ref('product_product_sugar0'),ref('product_product_water0')])])
assert proc_ids, 'No Procurements!'
-
The scheduler runs.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[]"
-
I am checking Internal picking. I see one picking for Orange juice and its
stock moves for Oranges, Sugar and Water made correctly.
-
!python {model: stock.picking}: |
pick_ids = self.search(cr, uid, [('type','=','internal')])
assert pick_ids, 'No Internal Pickings!'
-
According to minimum stock rules. I have 2 purchase orders for
Sugar with 6 Kg from Axelor and Orange 60 Kg from ASUStek.
-
I confirm the purchase order of Sugar and Orange.
-
!python {model: purchase.order}: |
import netsvc
purch_ids = self.search(cr, uid, [('state','=','draft')])
assert purch_ids, 'No Purchase Orders were made!'
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
-
I see two incoming pickings for Orange and Sugar, and receive them.
-
!python {model: stock.picking}: |
pick_ids = self.search(cr, uid, [('type','=','in')])
assert pick_ids, 'No Incoming Shipments found!'
stock_partial_picking = self.pool.get('stock.partial.picking')
for pick_id in pick_ids:
partial_id = stock_partial_picking.create(cr, uid, {},
context={'active_model': 'stock.picking',
'active_ids': [pick_id]})
stock_partial_picking.do_partial(cr, uid, [partial_id])
-
Again the scheduler runs.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[]"
-
I check my internal picking of "Orange Juice" is done.
-
!python {model: stock.picking}: |
pick_ids = self.search(cr, uid, [('type','=','internal'),('state','=','done')])
assert pick_ids, 'Internal Picking is not done yet!'
-
I check my manufacturing order for "Orange Juice" is ready or not.
-
!python {model: mrp.production}: |
prod_ids = self.search(cr, uid, [('state','=','ready'),('id','=',ref('mrp_production_mo0'))])
assert prod_ids, 'Manufacturing order is not ready!'
-
I start the production order.
-
!workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo0}

View File

@ -1,278 +0,0 @@
-
In order to test the flow of procurement orders. I will put some orders with
different procurement methods. I have installed sale, mrp and purchase modules.
-
I am creating products.
-
I create record for product Shirt.
-
!record {model: product.product, id: product_product_shirt0}:
categ_id: product.cat1
cost_method: standard
list_price: 350.0
mes_type: fixed
name: Shirt
procure_method: make_to_stock
property_stock_inventory: stock.location_inventory
property_stock_procurement: stock.location_procurement
property_stock_production: stock.location_production
seller_delay: '1'
standard_price: 300.0
supply_method: produce
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
volume: 0.0
warranty: 0.0
weight: 0.0
weight_net: 0.0
-
I create record for product Cloth.
-
!record {model: product.product, id: product_product_cloth0}:
categ_id: product.cat1
cost_method: standard
mes_type: fixed
name: Cloth
procure_method: make_to_order
property_stock_inventory: stock.location_inventory
property_stock_procurement: stock.location_procurement
property_stock_production: stock.location_production
seller_delay: '1'
seller_ids:
- delay: 1
name: base.res_partner_maxtor
product_uom: product.product_uom_unit
min_qty: 300.0
standard_price: 1.0
supply_method: buy
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
volume: 0.0
warranty: 0.0
weight: 0.0
weight_net: 0.0
-
I create record for product Buttons.
-
!record {model: product.product, id: product_product_buttons0}:
categ_id: product.cat1
cost_method: standard
mes_type: fixed
name: Buttons
procure_method: make_to_stock
property_stock_inventory: stock.location_inventory
property_stock_procurement: stock.location_procurement
property_stock_production: stock.location_production
seller_delay: '1'
seller_ids:
- delay: 1
name: base.res_partner_asus
product_uom: product.product_uom_kgm
min_qty: 100.0
standard_price: 1.0
supply_method: buy
type: product
uom_id: product.product_uom_kgm
uom_po_id: product.product_uom_kgm
volume: 0.0
warranty: 0.0
weight: 0.0
weight_net: 0.0
-
I am creating bills of material for 'Shirt'.
-
I create bills of material for Shirt.
-
!record {model: mrp.bom, id: mrp_bom_shirt0}:
bom_lines:
- company_id: base.main_company
name: Cloth
product_efficiency: 1.0
product_id: product_product_cloth0
product_qty: 1.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
sequence: 0.0
type: normal
- company_id: base.main_company
name: Buttons
product_efficiency: 1.0
product_id: product_product_buttons0
product_qty: 8.0
product_uom: product.product_uom_kgm
product_uos_qty: 0.0
sequence: 0.0
type: normal
company_id: base.main_company
name: Shirt
product_efficiency: 1.0
product_id: product_product_shirt0
product_qty: 1.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
sequence: 0.0
type: normal
-
I create minimum stock rule for product Buttons
-
!record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}:
company_id: base.main_company
location_id: stock.stock_location_stock
logic: max
name: OP/00007
product_id: mrp.product_product_buttons0
product_max_qty: 50.0
product_min_qty: 10.0
product_uom: product.product_uom_kgm
qty_multiple: 1
warehouse_id: stock.warehouse0
-
I create a procurement order for product Shirt.
-
!record {model: procurement.order, id: procurement_order_shirt0}:
name: 'PROC: Shirt'
product_id: product_product_shirt0
product_qty: 5.00
location_id: stock.stock_location_stock
product_uom: product.product_uom_unit
-
I confirm the procurement order.
-
!workflow {model: procurement.order, action: button_confirm, ref: procurement_order_shirt0}
-
I run the procurement.
-
!workflow {model: procurement.order, action: button_check, ref: procurement_order_shirt0}
-
I see that there is a manufacturing order for Shirt.
-
!python {model: mrp.production}: |
from tools.translate import _
order_ids = self.search(cr, uid, [('product_id','=',ref('product_product_shirt0'))])
assert order_ids, 'No Manufacturing Order.'
-
I also check that there are two more procurement orders for sub products Cloth and Buttons.
-
!python {model: procurement.order}: |
from tools.translate import _
proc_ids = self.search(cr, uid, [('product_id','in',[ref('product_product_cloth0'),ref('product_product_buttons0')])])
assert proc_ids, 'No Procurements.'
-
The scheduler runs.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[]"
-
I check that there is one purchase order for Cloth.
-
!python {model: purchase.order}: |
purch_ids = self.search(cr, uid, [('partner_id.name','=','Maxtor')])
assert purch_ids, 'No Purchase Orders.'
-
I confirm purchase order for Cloth.
-
!python {model: purchase.order}: |
import netsvc
purch_ids = self.search(cr, uid, [('partner_id.name','=','Maxtor')])
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
-
I confirm purchase order for Buttons.
-
!python {model: purchase.order}: |
import netsvc
purch_ids = self.search(cr, uid, [('partner_id.name','=','ASUStek')])
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
-
I Check incoming shipments for cloth. And receive products.
-
!python {model: stock.picking}: |
pick_ids = self.search(cr, uid, [('address_id.name','=','Wong'),('state','=','assigned')])
assert pick_ids, 'No Incoming Shipments found!'
stock_partial_picking = self.pool.get('stock.partial.picking')
for pick_id in pick_ids:
partial_id = stock_partial_picking.create(cr, uid, {},
context={'active_model': 'stock.picking',
'active_ids': [pick_id]})
stock_partial_picking.do_partial(cr, uid, [partial_id])
-
I Check incoming shipments for buttons and receive products.
-
!python {model: stock.picking}: |
pick_ids = self.search(cr, uid, [('address_id.name','=','Tang'),('state','=','assigned')])
assert pick_ids, 'No Incoming Shipments found!'
stock_partial_picking = self.pool.get('stock.partial.picking')
for pick_id in pick_ids:
partial_id = stock_partial_picking.create(cr, uid, {},
context={'active_model': 'stock.picking',
'active_ids': [pick_id]})
stock_partial_picking.do_partial(cr, uid, [partial_id])
-
Run scheduler again.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[]"
-
Check state of manufacturing order for Shirt.
-
!python {model: mrp.production}: |
from tools.translate import _
order_ids = self.search(cr, uid, [('product_id','=',ref('product_product_shirt0')),('state','=','ready')])
assert order_ids, 'No Manufacturing Order in Ready state.'
-
I start production order for Shirt.
-
!python {model: mrp.production}: |
from tools.translate import _
import netsvc
prod_ids = self.search(cr, uid, [('state','=','ready')])
assert prod_ids, _('No Ready Manufacturing Orders found!')
wf_service = netsvc.LocalService("workflow")
for p_id in prod_ids:
wf_service.trg_validate(uid, 'mrp.production', p_id, 'button_produce', cr)
-
I create record for producing products with quantity 5.00.
-
!record {model: mrp.product.produce, id: mrp_product_produce0}:
product_qty: 2.00
mode: 'consume_produce'
-
I produce 2 products with 5.00 quantities each.
-
!python {model: mrp.product.produce}: |
prod_obj = self.pool.get('mrp.production')
prod_ids = prod_obj.search(cr, uid, [('product_id.name','=','Shirt')])
self.do_produce(cr, uid, [ref('mrp_product_produce0')], context={'active_ids': prod_ids})
-
I create record for remaining products with quantity 35.00.
-
!record {model: stock.move.consume, id: stock_move_consume0}:
product_id: product_product_buttons0
product_qty: 35.00
product_uom: product.product_uom_unit
location_id: stock.stock_location_stock
-
I produce remaining product Buttons with 35.00 quantity.
-
!python {model: stock.move.consume}: |
from tools.translate import _
stock_obj = self.pool.get('stock.move')
stock_ids = stock_obj.search(cr, uid, [('product_id.name','=','Buttons')])
self.do_move_consume(cr, uid, [ref('stock_move_consume0')], context={'active_ids': stock_ids})
-
And finally production order is done.
-
!python {model: mrp.product.produce}: |
prod_obj = self.pool.get('mrp.production')
prod_ids = prod_obj.search(cr, uid, [('product_id.name','=','Shirt')])
self.do_produce(cr, uid, [ref('mrp_product_produce0')], context={'active_ids': prod_ids})

View File

@ -1,29 +0,0 @@
-
In order to test the manufacturing order in Openerp,
I am creating one manufacturing order
-
!record {model: mrp.production, id: mrp_production_mo1}:
company_id: base.main_company
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_stock
location_src_id: stock.stock_location_stock
product_id: product.product_product_pc1
name: MO/01234
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
-
I confirm the order.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1}
-
In order to cancel the MO, I first cancel its picking.
-
!python {model: stock.picking}: |
mrp_obj = self.pool.get('mrp.production')
mo = mrp_obj.browse(cr, uid, ref("mrp_production_mo1"))
self.action_cancel(cr, uid, [mo.picking_id.id], context=None)
-
Then I Cancel the production order and related stock moves.
-
!workflow {model: mrp.production, action: button_cancel, ref: mrp_production_mo1}

View File

@ -1,119 +0,0 @@
-
In order to test the manufacturing order working with procurements I will use
some products with different supply method and procurement method, also check
the bills of material for the products.
-
I am creating one manufacturing order.
-
!record {model: mrp.production, id: mrp_production_mo1}:
company_id: base.main_company
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_stock
location_src_id: stock.stock_location_stock
product_id: product.product_product_pc1
name: MO/0123
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
-
I compute the data.
-
!python {model: mrp.production}: |
self.action_compute(cr, uid, [ref("mrp_production_mo1")])
-
I confirm the order.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1}
-
I create record for changing production quantity to 6.00
-
!record {model: change.production.qty, id: mrp_production_qty}:
product_qty: 6.0
-
Changes the Quantity of Product.
-
!python {model: change.production.qty}: |
context = {"lang": 'en_US', "active_model":"mrp.production", "active_ids": [ref("mrp_production_mo1")], "tz": False, "active_id":ref('mrp_production_mo1')}
self.default_get(cr, uid, ["product_qty"], context)
self.change_prod_qty(cr, uid, [ref("mrp_production_qty")], context=context)
-
I check now quantity of the production order is 6 or not.
-
!assert {model: mrp.production, id: mrp_production_mo1}:
- product_qty == 6
-
I am checking Procurement orders for components of PC1.
-
!python {model: procurement.order}: |
from tools.translate import _
production_obj = self.pool.get('mrp.production')
production = production_obj.browse(cr, uid, ref('mrp_production_mo1'))
product_ids = map(lambda x:x.product_id.id, production.move_lines)
proc_ids = self.search(cr, uid, [('product_id','in',product_ids)])
assert proc_ids, _('No Procurements!')
-
The scheduler runs.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[]"
-
I am checking Internal picking.
-
!python {model: stock.picking}: |
from tools.translate import _
pick_ids = self.search(cr, uid, [('type','=','internal')])
assert pick_ids, _('No Internal Pickings!')
-
I see that there is a manufacturing order for the sub product CPU_GEN with ready state and I start production of it.
-
!python {model: mrp.production}: |
from tools.translate import _
order_ids = self.search(cr, uid, [('state','=','ready'), ('product_id', '=', ref('product.product_product_cpu_gen'))])
assert order_ids, _('No manufacturing order in Ready state!')
import netsvc
wf_service = netsvc.LocalService("workflow")
for order in order_ids:
wf_service.trg_validate(uid, 'mrp.production', order, 'button_produce', cr)
-
I create record for producing products with quantity 1.00.
-
!record {model: mrp.product.produce, id: mrp_product_produce0}:
product_qty: 1.00
mode: 'consume_produce'
-
I produce the product.
-
!python {model: mrp.product.produce}: |
prod_obj = self.pool.get('mrp.production')
prod_ids = prod_obj.search(cr, uid, [('state','=','in_production'), ('product_id', '=', ref('product.product_product_cpu_gen'))])
self.do_produce(cr, uid, [ref('mrp_product_produce0')], context={'active_ids': prod_ids})
-
Now the manufacturing order for subproduct CPU_GEN is done and manufacturing
order for PC1 is in ready state.
-
!python {model: mrp.production}: |
from tools.translate import _
prod_ids = self.search(cr, uid, [('state','=','done'), ('product_id', '=', ref('product.product_product_cpu_gen'))])
assert prod_ids, _('Manufacturing order for CPU_GEN is yet not done!')
-
I start producing the product PC1.
-
!workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo1}
-
I create record for producing products with quantity 6.00.
-
!record {model: mrp.product.produce, id: mrp_product_produce1}:
product_qty: 6.00
mode: 'consume_produce'
-
Finally my production order is done.
-
!python {model: mrp.product.produce}: |
context = {"lang": 'en_US', "active_model":"mrp.production", "active_ids": [ref("mrp_production_mo1")], "tz": False, "active_id":ref('mrp_production_mo1')}
self.do_produce(cr, uid, [ref('mrp_product_produce1')], context=context)
-
I check now the production order for PC1 is done.
-
!assert {model: mrp.production, id: mrp_production_mo1}:
- state == 'done'

View File

@ -1,38 +0,0 @@
-
In order to test the PDF reports defined on a MRP, we will print a BOM Structure Report
-
!python {model: mrp.bom}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.bom.structure').create(cr, uid, [ref('mrp.mrp_bom_0'),ref('mrp.mrp_bom_1'),ref('mrp.mrp_bom_2'),ref('mrp.mrp_bom_23'),ref('mrp.mrp_bom_1901'),ref('mrp.mrp_bom_assemblysection0'),ref('mrp.mrp_bom_sidepanel0'),ref('mrp.mrp_bom_defaultbomforshelfofcm1'),ref('mrp.mrp_bom_sidepanel3')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp-bom_structure_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a MRP, we will print Production Order Report
-
!python {model: mrp.production}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.mrp.production.order').create(cr, uid, [ref('mrp.mrp_production_mo1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order_report.'+format), 'wb+').write(data)
-
Print Product Price Report through the wizard
-
!python {model: product.product}: |
ctx={}
ctx.update({'model': 'product.product','active_ids': [1,2,3,5]})
data_dict = {'number': 1}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_view_mrp_product_price_wizard',wiz_data=data_dict, context=ctx, our_module='mrp')
-
Print Work Center Load Report through the wizard
-
!python {model: mrp.workcenter}: |
ctx={}
ctx.update({'model': 'mrp.workcenter','active_ids': [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')]})
data_dict = {'time_unit': 'day', 'measure_unit': 'hours'}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_mrp_workcenter_load_wizard',wiz_data=data_dict, context=ctx, our_module='mrp')

View File

@ -0,0 +1,27 @@
-
In order to test process of production order, I create Bill of material of Shelf 100cm.
-
!record {model: mrp.bom, id: mrp_bom_defaultbomforshelfofcm0}:
product_id: product.product_product_shelfofcm0
-
!record {model: mrp.bom, id: mrp_bom_assemblysection1}:
routing_id: mrp.mrp_routing_0
-
!record {model: mrp.bom, id: mrp_bom_rearpanelarm1}:
routing_id: mrp.mrp_routing_0
-
I create Production Order of Shelf 100cm to produce 5.0 Dozen PCE.
-
!record {model: mrp.production, id: mrp_production_shelf100cm}:
location_src_id: stock.stock_location_stock
location_dest_id: stock.stock_location_output
product_id: product.product_product_shelfofcm0
bom_id: mrp_bom_defaultbomforshelfofcm0
routing_id: mrp.mrp_routing_1
product_uom: product.product_uom_dozen
product_qty: 5.0
-
!record {model: mrp.workcenter, id: mrp_workcenter_0}:
product_id: product.product_assembly

View File

@ -0,0 +1,309 @@
-
I compute the production order.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"), context=context)
order.action_compute(context=context)
-
I check production lines after compute.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"), context=context)
assert len(order.product_lines) == 5, "Production lines are not generated proper."
factor = 12.0*5.0
sidepanel = False
woodlintelm = False
woodmm0 = False
woodmm10 = False
metalcleats = False
for line in order.product_lines:
if line.product_id.id == ref('product.product_product_sidepanel0'): #SIDEPAN 2 PCE
assert not sidepanel, "Production line is already generated for SIDEPAN."
assert line.product_qty == (2.0*factor), "Qty is not correspond."
assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond"
sidepanel = True
elif line.product_id.id == ref('product.product_product_woodlintelm0'): #LIN40 4*0.25 Meter
assert not woodlintelm, "Production line is already generated for LIN40."
assert line.product_qty == (4*0.25*factor), "Qty is not correspond."
assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond"
woodlintelm = True
elif line.product_id.id == ref('product.product_product_woodmm0'): #WOOD002 0.25 m
assert not woodmm0, "Production line is already generated for WOOD002."
assert line.product_qty == (0.25*factor), "Qty is not correspond."
assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond"
woodmm0 = True
elif line.product_id.id == ref('product.product_product_metalcleats0'): #METC000 4*3 PCE
assert not metalcleats, "Production line is already generated for METC000."
assert line.product_qty == (4*3*factor), "Qty is not correspond."
assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond"
metalcleats = True
elif line.product_id.id == ref('product.product_product_woodmm10'): #WOOD010 0.083*3 m
assert not woodmm10, "Production line is already generated for WOOD010."
assert line.product_qty == (0.083*3*factor), "Qty is not correspond."
assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond"
woodmm10 = True
else:
raise AssertionError('unknown order line: %s' % line)
assert sidepanel, "Production line is not generated for SIDEPAN."
assert woodlintelm, "Production line is not generated for LIN40."
assert woodmm0, "Production line is not generated for WOOD002."
assert metalcleats, "Production line is not generated for METC000."
assert woodmm10, "Production line is not generated for WOOD010."
-
Now I check workcenter lines.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"), context=context)
assert len(order.workcenter_lines), "Workcenter lines are not generated proper."
for line in order.workcenter_lines:
wc = line.workcenter_id
hours = ((wc.time_start or 0.0)+(wc.time_stop or 0.0)+line.cycle*(wc.time_cycle or 0.0)) * (wc.time_efficiency or 1.0)
factor = 5*12
d, m = divmod(factor, wc.capacity_per_cycle)
cycle = (d + (m and 1.0 or 0.0))
if line.name == "Short time assembly - Assembly Section":
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
assert line.cycle == (4*cycle), "Cycle is not correspond: %s" % (line.name)
assert line.hour == (2*cycle*4 + hours), "Hours is not correspond: %s"% (line.name)
elif line.name == "Short time assembly - Rear Panel SHE100":
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
assert line.cycle == (1*cycle), "Cycle is not correspond: %s" % (line.name)
assert line.hour == (2*cycle + hours), "Hours is not correspond: %s"% (line.name)
elif line.name == "long time assembly - Shelf of 100cm":
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
assert line.cycle == (2*cycle), "Cycle is not correspond: %s" % (line.name)
assert line.hour == (5*cycle + hours), "Hours is not correspond: %s"% (line.name)
elif line.name == "Testing - Shelf of 100cm":
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
assert line.cycle == (1*cycle), "Cycle is not correspond: %s" % (line.name)
assert line.hour == (1*cycle + hours), "Hours is not correspond: %s"% (line.name)
elif line.name == "Packing - Shelf of 100cm":
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
assert line.cycle == (1*cycle), "Cycle is not correspond: %s" % (line.name)
assert line.hour == (0.5*cycle + hours), "Hours is not correspond: %s"% (line.name)
else:
raise AssertionError('unknown workcenter line: %s' % line)
-
I confirm the Production Order.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_shelf100cm}
-
I check details of Produce Move of Production Order to trace Final Product.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
assert order.state == 'confirmed', "Production order should be confirmed."
assert order.move_created_ids, "Trace Record is not created for Final Product."
move = order.move_created_ids[0]
source_location_id = order.product_id.product_tmpl_id.property_stock_production.id
assert move.date == order.date_planned, "Planned date is not correspond."
assert move.product_id.id == order.product_id.id, "Product is not correspond."
assert move.product_uom.id == order.product_uom.id, "UOM is not correspond."
assert move.product_qty == order.product_qty, "Qty is not correspond."
assert move.product_uos_qty == order.product_uos and order.product_uos_qty or order.product_qty, "UOS qty is not correspond."
if order.product_uos:
assert move.product_uos.id == order.product_uos.id, "UOS is not correspond."
assert move.location_id.id == source_location_id, "Source Location is not correspond."
assert move.location_dest_id.id == order.location_dest_id.id, "Destination Location is not correspond."
routing_loc = None
if order.bom_id.routing_id and order.bom_id.routing_id.location_id:
routing_loc = order.bom_id.routing_id.location_id.id
date_planned = order.date_planned
for move_line in order.move_lines:
for order_line in order.product_lines:
if move_line.product_id.type not in ('product', 'consu'):
continue
if move_line.product_id.id == order_line.product_id.id:
assert move_line.date == date_planned, "Planned date is not correspond in 'To consume line'."
assert move_line.product_qty == order_line.product_qty, "Qty is not correspond in 'To consume line'."
assert move_line.product_uom.id == order_line.product_uom.id, "UOM is not correspond in 'To consume line'."
assert move_line.product_uos_qty == order_line.product_uos and order_line.product_uos_qty or order_line.product_qty, "UOS qty is not correspond in 'To consume line'."
if order_line.product_uos:
assert move_line.product_uos.id == order_line.product_uos.id, "UOS is not correspond in 'To consume line'."
assert move_line.location_id.id == routing_loc or order.location_src_id.id, "Source location is not correspond in 'To consume line'."
assert move_line.location_dest_id.id == source_location_id, "Destination Location is not correspond in 'To consume line'."
-
I check details of an Internal Shipment after confirmed production order to bring components in Raw Materials Location.
-
!python {model: mrp.production}: |
procurement = self.pool.get('procurement.order')
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
assert order.picking_id, 'Internal Shipment should be created!'
routing_loc = None
pick_type = 'internal'
address_id = False
if order.bom_id.routing_id and order.bom_id.routing_id.location_id:
routing_loc = order.bom_id.routing_id.location_id
if routing_loc.usage <> 'internal':
pick_type = 'out'
address_id = routing_loc.address_id and routing_loc.address_id.id or False
routing_loc = routing_loc.id
assert order.picking_id.type == pick_type, "Shipment should be Internal."
assert order.picking_id.address_id.id == address_id, "Shipment Address is not correspond with Adderss of Routing Location."
date_planned = order.date_planned
for move_line in order.picking_id.move_lines:
for order_line in order.product_lines:
if move_line.product_id.type not in ('product', 'consu'):
continue
if move_line.product_id.id == order_line.product_id.id:
assert move_line.date == date_planned, "Planned date is not correspond."
assert move_line.product_qty == order_line.product_qty, "Qty is not correspond."
assert move_line.product_uom.id == order_line.product_uom.id, "UOM is not correspond."
assert move_line.product_uos_qty == order_line.product_uos and order_line.product_uos_qty or order_line.product_qty, "UOS qty is not correspond."
if order_line.product_uos:
assert move_line.product_uos.id == order_line.product_uos.id, "UOS is not correspond."
assert move_line.location_id.id == order.location_src_id.id, "Source location is not correspond."
assert move_line.location_dest_id.id == routing_loc or order.location_src_id.id, "Destination Location is not correspond."
procurement_ids = procurement.search(cr, uid, [('move_id','=',move_line.id)])
assert procurement_ids, "Procurement should be created for shipment line of raw materials."
shipment_procurement = procurement.browse(cr, uid, procurement_ids[0], context=context)
assert shipment_procurement.date_planned == date_planned, "Planned date is not correspond in procurement."
assert shipment_procurement.product_id.id == order_line.product_id.id, "Product is not correspond in procurement."
assert shipment_procurement.product_qty == order_line.product_qty, "Qty is not correspond in procurement."
assert shipment_procurement.product_uom.id == order_line.product_uom.id, "UOM is not correspond in procurement."
assert shipment_procurement.product_uos_qty == order_line.product_uos and order_line.product_uos_qty or order_line.product_qty, "UOS qty is not correspond in procurement."
if order_line.product_uos:
assert shipment_procurement.product_uos.id == order_line.product_uos.id, "UOS is not correspond in procurement."
assert shipment_procurement.location_id.id == order.location_src_id.id, "Location is not correspond in procurement."
assert shipment_procurement.procure_method == order_line.product_id.procure_method, "Procure method is not correspond in procurement."
-
I change production qty with 3 Dozen Shelf 100cm.
-
!python {model: change.production.qty}: |
context.update({'active_id': ref('mrp_production_shelf100cm')})
-
!record {model: change.production.qty, id: mrp_production_qty}:
product_qty: 3.0
-
!python {model: change.production.qty}: |
self.change_prod_qty(cr, uid, [ref("mrp_production_qty")], context=context)
-
I check qty after changed in production order.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
assert order.product_qty == 3, "Qty is not changed in order."
move = order.move_created_ids[0]
assert move.product_qty == order.product_qty, "Qty is not changed in move line."
-
I run scheduler.
-
!python {model: procurement.order}: |
self.run_scheduler(cr, uid)
-
The production order is Waiting Goods, I forcefully done internal shipment.
-
!python {model: mrp.production}: |
self.force_production(cr, uid, [ref("mrp_production_shelf100cm")])
-
I check that production order in ready state after forcefully done internal shipment.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
assert order.state == 'ready', 'Production order should be in Ready State.'
assert order.picking_id.state == 'done', 'Internal shipment should be done.'
-
Now I start production.
-
!workflow {model: mrp.production, action: button_produce, ref: mrp_production_shelf100cm}
-
I check that production order in production state after start production.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
assert order.state == 'in_production', 'Production order should be in production State.'
-
I consume raw materials and put one material in scrap location due to waste it.
-
!python {model: mrp.production}: |
scrap_location_ids = self.pool.get('stock.location').search(cr, uid, [('scrap_location','=',True)])
scrap_location_id = scrap_location_ids[0]
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
for move in order.move_lines:
move.action_consume(move.product_qty)
if move.product_id.id == ref("product.product_product_metalcleats0"):
move.action_scrap(5.0, scrap_location_id)
-
I produce product.
-
!python {model: mrp.product.produce}: |
context.update({'active_id': ref('mrp_production_shelf100cm')})
-
!record {model: mrp.product.produce, id: mrp_product_produce1}:
mode: 'consume_produce'
-
!python {model: mrp.product.produce}: |
self.do_produce(cr, uid, [ref('mrp_product_produce1')], context=context)
-
I check production order after produced.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
assert order.state == 'done', "Production order should be closed."
-
I check Total Costs at End of Production.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
account_analytic_line = self.pool.get('account.analytic.line')
def rounding(f, r):
import math
if not r:
return f
return math.ceil(f / r) * r
for wc_line in order.workcenter_lines:
wc = wc_line.workcenter_id
accounts = [wc.costs_hour_account_id, wc.costs_cycle_account_id]
cost_per_cyle = wc_line.cycle * wc.costs_cycle
cost_per_hours = wc_line.hour * wc.costs_hour
if accounts and wc.costs_journal_id and wc.costs_general_account_id and (cost_per_cyle or cost_per_hours):
line_ids = account_analytic_line.search(cr, uid, [('name','ilike',wc_line.name)])
assert line_ids, 'Costs lines are not generated.'
for line in account_analytic_line.browse(cr, uid, line_ids, context=context):
if wc.costs_hour_account_id and line.account_id.id == wc.costs_hour_account_id.id:
assert rounding(line.unit_amount, 3) == rounding(wc_line.hour, 3), "Cost Unit Amount is not correspond."
assert rounding(line.amount, 3) == rounding(cost_per_hours, 3), "Cost amount is not correspond."
elif wc.costs_cycle_account_id and line.account_id.id == wc.costs_cycle_account_id.id:
assert rounding(line.unit_amount, 3) == rounding(wc_line.cycle, 3), "Cost Unit Amount is not correspond."
assert rounding(line.amount, 3) == rounding(cost_per_cyle, 3), "Cost Amount is not correspond."
else:
raise AssertionError('unknown cost line: %s' % line)
assert line.general_account_id.id == wc.costs_general_account_id.id, "General Account is not correspond."
assert line.journal_id.id == wc.costs_journal_id.id, "Account Journal is not correspond."
assert line.product_id.id == wc.product_id.id, "Product is not correspond."
assert line.product_uom_id.id == wc.product_id.uom_id.id, "UOM is not correspond."
-
I print a "BOM Structure".
-
!python {model: mrp.production}: |
import netsvc, tools, os
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
(data, format) = netsvc.LocalService('report.bom.structure').create(cr, uid, [order.bom_id.id], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp-bom_structure_report.'+format), 'wb+').write(data)
-
I print "Production Order".
-
!python {model: mrp.production}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.mrp.production.order').create(cr, uid, [ref("mrp_production_shelf100cm")], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order_report.'+format), 'wb+').write(data)
-
I print "Work Center Load Report".
-
!python {model: mrp.workcenter}: |
ctx = context.copy()
ctx.update({'model': 'mrp.workcenter','active_ids': [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')]})
data_dict = {'time_unit': 'day', 'measure_unit': 'hours'}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_mrp_workcenter_load_wizard',wiz_data=data_dict, context=ctx, our_module='mrp')

View File

@ -60,22 +60,11 @@ class mrp_product_produce(osv.osv_memory):
}
def do_produce(self, cr, uid, ids, context=None):
""" To check the product type
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param ids: the ID or list of IDs if we want more than one
@param context: A standard dictionary
@return:
"""
if context is None:
context = {}
prod_obj = self.pool.get('mrp.production')
move_ids = context.get('active_ids', [])
for data in self.browse(cr, uid, ids, context=context):
for move_id in move_ids:
prod_obj.action_produce(cr, uid, move_id,
data.product_qty, data.mode, context=context)
production_id = context.get('active_id', False)
assert production_id, "Production Id should be specified in context as a Active ID"
data = self.browse(cr, uid, ids[0], context=context)
self.pool.get('mrp.production').action_produce(cr, uid, production_id,
data.product_qty, data.mode, context=context)
return {}
mrp_product_produce()

View File

@ -65,8 +65,11 @@ So that we can compare the theoretic delay and real delay.
'process/mrp_operation_process.xml',
'mrp_operations_workflow_instance.xml'
],
'demo_xml': ['mrp_operation_data.xml'],
'test': ['test/mrp_operations.yml', 'test/mrp_operations_report.yml','test/mrp_operation_test.yml'],
'demo_xml': ['mrp_operation_data.xml',
'mrp_operations_demo.yml'],
'test': [
'test/workcenter_operations.yml',
],
'installable': True,
'active': False,
'certificate': '0056233813133',

View File

@ -350,6 +350,7 @@ class mrp_production(osv.osv):
if l.production_id and (l.production_id.date_start < po.date_finished):
self.write(cr, uid, [l.production_id.id], {'date_start': po.date_finished})
break
return True
def write(self, cr, uid, ids, vals, context=None, update=True, mini=True):
@ -371,13 +372,13 @@ class mrp_production(osv.osv):
pass
return result
def action_compute(self, cr, uid, ids, properties=[]):
def action_compute(self, cr, uid, ids, properties=[], context=None):
""" Computes bills of material of a product and planned date of work order.
@param properties: List containing dictionaries of properties.
@return: No. of products.
"""
result = super(mrp_production, self).action_compute(cr, uid, ids, properties=properties)
self._compute_planned_workcenter(cr, uid, ids, context={})
result = super(mrp_production, self).action_compute(cr, uid, ids, properties=properties, context=context)
self._compute_planned_workcenter(cr, uid, ids, context=context)
return result
mrp_production()

View File

@ -0,0 +1,24 @@
-
!record {model: mrp.production, id: mrp_production_op}:
location_src_id: stock.stock_location_stock
product_id: product.product_product_cpu3
product_qty: 5.0
allow_reorder: True
-
!record {model: mrp.production, id: mrp_production_op1}:
location_src_id: stock.stock_location_stock
product_id: product.product_product_cpu3
product_qty: 2.0
-
!function {model: mrp.production, name: action_compute, id: mrp_production_op1}:
- model: mrp.production
eval: "[obj(ref('mrp_production_op1')).id]"
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_op1}
-
!record {model: mrp.production, id: mrp_production_mo1}:
location_src_id: stock.stock_location_stock
product_id: product.product_product_cpu_gen
product_qty: 5.0
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1}

View File

@ -1,56 +0,0 @@
-
In order to test mrp_operations module in OpenERP,
I create a production order.
-
!record {model: mrp.production, id: mrp_production_mo1}:
company_id: base.main_company
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_stock
location_src_id: stock.stock_location_stock
name: MO/01234567
product_id: product.product_product_pc1
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 5.0
-
Now I confirm the production order.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1}
-
I check that there is one Work order generated related to the production order.
-
!python {model: mrp.production.workcenter.line}: |
from tools.translate import _
order_id = self.search(cr, uid, [('production_id','=', ref('mrp_production_mo1')),('state','=','draft')])
assert order_id, _('No work order defined for this production order!')
-
The scheduler runs.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[('state','=','confirmed')]"
-
I am checking Internal picking.
-
!python {model: mrp.production}: |
from tools.translate import _
pick_ids = self.browse(cr, uid, ref("mrp_production_mo1"))
assert pick_ids.picking_id.id, _('No Internal Picking generated!')
-
In order to cancel the MO, first cancel its picking
-
!python {model: stock.picking}: |
mrp_obj = self.pool.get('mrp.production')
mo = mrp_obj.browse(cr, uid, ref("mrp_production_mo1"))
self.action_cancel(cr, uid, [mo.picking_id.id], context=None)
-
Then cancel The Manufacturing order.
-
!workflow {model: mrp.production, action: button_cancel, ref: mrp_production_mo1}
-
I check that there is one Work order generated related to the production order that is cancelled or not.
-
!python {model: mrp.production.workcenter.line}: |
from tools.translate import _
order_id = self.search(cr, uid, [('production_id','=', ref('mrp_production_mo1')),('state','=','cancel')])
assert order_id, _('Work order is not cancelled for this production order!')

View File

@ -1,158 +0,0 @@
-
In order to test mrp_operations module in OpenERP I will put a Production order
and check its effects on Work orders.
-
I create a production order.
-
!record {model: mrp.production, id: mrp_production_mo0}:
company_id: base.main_company
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_stock
location_src_id: stock.stock_location_stock
name: MO/0123456
product_id: product.product_product_pc1
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 5.0
allow_reorder: True
-
I am computing the data.
-
!python {model: mrp.production}: |
self.action_compute(cr, uid, [ref("mrp_production_mo0")], {"lang": "en_US", "tz":
False, "search_default_current": 1, "active_model": "ir.ui.menu", "active_ids":
[ref("mrp.menu_mrp_production_action")], "active_id": ref("mrp.menu_mrp_production_action"),
})
-
Now I confirm my production order.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0}
-
I check that there is one Work order generated related to my production order.
-
!python {model: mrp.production.workcenter.line}: |
from tools.translate import _
order_id = self.search(cr, uid, [('production_id','=', ref('mrp_production_mo0')),('state','=','draft')])
assert order_id, _('No Work order define for this production order!')
-
The scheduler runs.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[('state','=','confirmed')]"
-
I am checking Internal picking.
-
!python {model: stock.picking}: |
from tools.translate import _
pick_ids = self.search(cr, uid, [('state','!=','done'),('type','=','internal')])
assert pick_ids, _('No Internal Pickings!')
-
I see that there is a manufacturing order for the sub product CPU_GEN of PC1 with ready state.
-
!python {model: mrp.production}: |
from tools.translate import _
order_ids = self.search(cr, uid, [('state','=','ready'),('origin','like','%MO/0123456')])
assert order_ids, _('No new manufacturing order!')
-
I check that there one more work order created for new production order.
-
!python {model: mrp.production.workcenter.line}: |
from tools.translate import _
prod_obj = self.pool.get('mrp.production')
prod_order_ids = prod_obj.search(cr, uid, [('state','=','ready'),('origin','like','%MO/0123456')])
workorder_id = self.search(cr, uid, [('production_id','=', prod_order_ids[0]),('state','=','draft')])
assert workorder_id, _('No Work order define for this production order!')
-
I start the second production order of the CPU_GEN product.
-
!python {model: mrp.production}: |
import netsvc
wf_service = netsvc.LocalService("workflow")
prod_order_ids = self.search(cr, uid, [('state','=','ready'),('origin','like','%MO/0123456')])
for po in prod_order_ids:
wf_service.trg_validate(uid, 'mrp.production', po, 'button_produce', cr)
-
I am creating a mrp.product.produce record
-
!record {model: mrp.product.produce, id: mrp_product_produce_0}:
mode: consume_produce
product_qty: 5.0
-
I produce the product CPU_GEN.
-
!python {model: mrp.product.produce}: |
prod_obj = self.pool.get('mrp.production')
prod_order_ids = prod_obj.search(cr, uid, [('origin','like','%MO/0123456')])
self.do_produce(cr, uid, [ref("mrp_product_produce_0")], {"lang": "en_US", "tz":
False, "search_default_current": 1, "active_model": "mrp.production", "active_ids":
prod_order_ids, "active_id": prod_order_ids[0], })
-
I check that my production order and its related work order is in done state.
-
!python {model: mrp.production.workcenter.line}: |
from tools.translate import _
prod_obj = self.pool.get('mrp.production')
prod_order_ids = prod_obj.search(cr, uid, [('origin','like','%MO/0123456')])
assert prod_order_ids, _('Workorder not found')
workorder_id = self.search(cr, uid, [('production_id','=', prod_order_ids[0])])
workorder_bro = self.browse(cr, uid, workorder_id[0])
assert workorder_bro.state == 'done', _('Work order is not done! It is %s') % workorder_bro.state
-
Now I check my original production order is now ready.
-
!python {model: mrp.production}: |
from tools.translate import _
prod_ids = self.search(cr, uid, [('id','=',ref('mrp_production_mo0')),('state','=','ready')])
assert prod_ids, _('Production order is not ready!')
-
I check that both internal pickings are done.
-
!python {model: stock.picking}: |
from tools.translate import _
pick_ids = self.search(cr, uid, [('state','=','done'),('type','=','internal')])
assert pick_ids, _('Internal pickings are not done!')
-
Now I start my first production order.
-
!workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo0}
-
I check that the related work order is in progress state.
-
!python {model: mrp.production.workcenter.line}: |
from tools.translate import _
order_id = self.search(cr, uid, [('production_id','=', ref('mrp_production_mo0')),('state','=','startworking')])
assert order_id, _('Work order not started yet!')
-
I am creating a mrp.product.produce record.
-
!record {model: mrp.product.produce, id: mrp_product_produce_0}:
mode: consume_produce
product_qty: 5.0
-
I produce the product PC1.
-
!python {model: mrp.product.produce}: |
prod_obj = self.pool.get('mrp.production')
prod_order_ids = prod_obj.search(cr, uid, [('state','=','in_production')])
self.do_produce(cr, uid, [ref("mrp_product_produce_0")], {"lang": "en_US", "tz":
False, "search_default_current": 1, "active_model": "mrp.production", "active_ids":
[ref("mrp_production_mo0")], "active_id": ref("mrp_production_mo0"), })
-
I check the related work order is done.
-
!python {model: mrp.production.workcenter.line}: |
from tools.translate import _
order_id = self.search(cr, uid, [('production_id','=', ref('mrp_production_mo0')),('state','=','done')])
assert order_id, _('Work order not done yet!')
-
Calculates start date for stock moves finding interval from resource calendar.
-
!python {model: mrp.production}: |
self._move_pass(cr, uid, [ref('mrp_production_mo0')], context=None)
-
Calculates planned end date of production order.
-
!python {model: mrp.production}: |
mo = self.browse(cr, uid, ref("mrp_production_mo0"))
self._production_date_end(cr, uid, [ref("mrp_production_mo0")], mo.date_planned, False, context=None)

View File

@ -1,17 +0,0 @@
-
In order to test the PDF reports defined on a MRP Operations, we will print a Barcode Report
-
!python {model: mrp_operations.operation.code}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.mrp.code.barcode').create(cr, uid, [ref('mrp_operations.mrp_op_1'),ref('mrp_operations.mrp_op_2'),ref('mrp_operations.mrp_op_3'),ref('mrp_operations.mrp_op_4'),ref('mrp_operations.mrp_op_5')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-barcode_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a MRP Operations, we will print Workcenter's Barcode Report
-
!python {model: mrp.workcenter}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.mrp.wc.barcode').create(cr, uid, [ref('mrp.mrp_workcenter_0'),ref('mrp.mrp_workcenter_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-workcenter_barcode_report.'+format), 'wb+').write(data)

View File

@ -0,0 +1,120 @@
-
I compute the production order.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
order.action_compute(context=context)
-
I check planned date in workcenter lines of production order.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
for line in order.workcenter_lines:
#TODO: to check start date of next line should be end of date of previous line.
assert line.date_planned, "Planned Start date is not computed: %s" %(line)
assert line.date_planned_end, "Planned End date is not computed: %s" %(line)
-
I confirm the Production Order.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp.mrp_production_shelf100cm}
-
I run scheduler.
-
!python {model: procurement.order}: |
self.run_scheduler(cr, uid)
-
I forcefully close internal shipment.
-
!python {model: mrp.production}: |
self.force_production(cr, uid, [ref("mrp.mrp_production_shelf100cm")])
-
I start production.
-
!workflow {model: mrp.production, action: button_produce, ref: mrp.mrp_production_shelf100cm}
-
Production start on first work center, so I start work operation on first work center.
-
!python {model: mrp.production}: |
import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_start_working', cr)
-
Now I pause first work operation due to technical fault of work center.
-
!python {model: mrp.production}: |
import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_pause', cr)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_resume', cr)
-
I resume first work operation.
-
!python {model: mrp.production}: |
import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_resume', cr)
-
I cancel first work operation.
-
!python {model: mrp.production}: |
import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_cancel', cr)
-
I reset first work operation and start after resolve techninal fault of work center.
-
!python {model: mrp.production}: |
import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_draft', cr)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_start_working', cr)
-
Now Finished work of first work operation so I close that operation.
-
!python {model: mrp.production}: |
import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_done', cr)
-
Now I close other operations after start one by one.
-
!python {model: mrp.production}: |
import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
wf_service = netsvc.LocalService("workflow")
for work_line in order.workcenter_lines[1:]:
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', work_line.id, 'button_start_working', cr)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', work_line.id, 'button_done', cr)
-
I check that the production order is now done.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context)
print order.state
assert order.state == 'done', "Production should be closed after finished all operations."
-
I print a Barcode Report of Operation line.
-
!python {model: mrp_operations.operation.code}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.mrp.code.barcode').create(cr, uid, [ref('mrp_operations.mrp_op_1'),ref('mrp_operations.mrp_op_2'),ref('mrp_operations.mrp_op_3'),ref('mrp_operations.mrp_op_4'),ref('mrp_operations.mrp_op_5')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-barcode_report.'+format), 'wb+').write(data)
-
I print Workcenter's Barcode Report.
-
!python {model: mrp.workcenter}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.mrp.wc.barcode').create(cr, uid, [ref('mrp.mrp_workcenter_0'),ref('mrp.mrp_workcenter_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-workcenter_barcode_report.'+format), 'wb+').write(data)

View File

@ -325,7 +325,11 @@ class pos_order(osv.osv):
}
return abs
def action_invoice_state(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'state':'invoiced'}, context=context)
def action_invoice(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")
inv_ref = self.pool.get('account.invoice')
inv_line_ref = self.pool.get('account.invoice.line')
product_obj = self.pool.get('product.product')
@ -341,7 +345,7 @@ class pos_order(osv.osv):
acc = order.partner_id.property_account_receivable.id
inv = {
'name': 'Invoice from POS: '+order.name,
'name': order.name,
'origin': order.name,
'account_id': acc,
'journal_id': order.sale_journal.id or None,
@ -379,6 +383,7 @@ class pos_order(osv.osv):
and [(6, 0, inv_line['invoice_line_tax_id'])] or []
inv_line_ref.create(cr, uid, inv_line, context=context)
inv_ref.button_reset_taxes(cr, uid, [inv_id], context=context)
wf_service.trg_validate(uid, 'pos.order', order.id, 'invoice', cr)
if not inv_ids: return {}
@ -682,10 +687,44 @@ pos_order_line()
class pos_category(osv.osv):
_name = 'pos.category'
_inherit = 'product.category'
_description = "PoS Category"
_order = "sequence, name"
def _check_recursion(self, cr, uid, ids, context=None):
level = 100
while len(ids):
cr.execute('select distinct parent_id from pos_category where id IN %s',(tuple(ids),))
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False
level -= 1
return True
_constraints = [
(_check_recursion, 'Error ! You cannot create recursive categories.', ['parent_id'])
]
def name_get(self, cr, uid, ids, context=None):
if not len(ids):
return []
reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
res = []
for record in reads:
name = record['name']
if record['parent_id']:
name = record['parent_id'][1]+' / '+name
res.append((record['id'], name))
return res
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
res = self.name_get(cr, uid, ids, context=context)
return dict(res)
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
'parent_id': fields.many2one('pos.category','Parent Category', select=True),
'child_id': fields.one2many('pos.category', 'parent_id', string='Child Categories'),
'child_id': fields.one2many('pos.category', 'parent_id', string='Children Categories'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
}
pos_category()

View File

@ -16,8 +16,8 @@
<group col="7" colspan="4">
<field name="name"/>
<field name="date_order"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_customer':1}"/>
<button name="invoice" string="Invoice" icon="gtk-apply" type="workflow" states="paid" attrs="{'invisible': ['|',('partner_id','=',False),('state','&lt;&gt;','paid')]}"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_customer':1}" attrs="{'readonly': [('state','=','invoiced')]}"/>
<button name="action_invoice" string="Invoice" icon="gtk-apply" type="object" states="paid" attrs="{'readonly': [('partner_id','=',False)]}"/>
</group>
<notebook colspan="4">
<page string="Sale Order">
@ -587,9 +587,12 @@
<field name="type">form</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="categ_id" position="after">
<field name="pos_categ_id"/>
</field>
<group name="status" position="after">
<group colspan="2" col="2" name="pos">
<separator string="Point-of-Sale" colspan="2"/>
<field name="pos_categ_id"/>
</group>
</group>
</field>
</record>
@ -609,6 +612,20 @@
</record>
<!-- Categories tree view -->
<record id="pos_category_form_view" model="ir.ui.view">
<field name="name">pos.category.form</field>
<field name="model">pos.category</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="PoS Categories">
<group colspan="4" col="6">
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
</group>
</form>
</field>
</record>
<record id="pos_category_tree_view" model="ir.ui.view">
<field name="name">pos.category.tree</field>
<field name="model">pos.category</field>
@ -616,7 +633,8 @@
<field name="field_parent" eval="False"/>
<field name="arch" type="xml">
<tree string="PoS Categories">
<field name="name"/>
<field name="sequence" invisible="1"/>
<field name="complete_name"/>
</tree>
</field>
</record>

View File

@ -34,7 +34,7 @@
<field name="wkf_id" ref="wkf_pos"/>
<field name="name">invoiced</field>
<field name="flow_stop">True</field>
<field name="action">action_invoice()</field>
<field name="action">action_invoice_state()</field>
<field name="kind">function</field>
</record>

View File

@ -59,6 +59,7 @@ depending on the product's configuration.
'board_mrp_procurement_view.xml',
],
'demo_xml': ['stock_orderpoint.xml'],
'test': ['test/procurement.yml'],
'installable': True,
'active': False,
'certificate': '00954248826881074509',

View File

@ -63,7 +63,6 @@ mrp_property()
class StockMove(osv.osv):
_inherit = 'stock.move'
_columns= {
'procurements': fields.one2many('procurement.order', 'move_id', 'Procurements'),
}
@ -154,11 +153,11 @@ class procurement_order(osv.osv):
return {'value': v}
return {}
def check_product(self, cr, uid, ids):
def check_product(self, cr, uid, ids, context=None):
""" Checks product type.
@return: True or False
"""
return all(procurement.product_id.type in ('product', 'consu') for procurement in self.browse(cr, uid, ids))
return all(proc.product_id.type in ('product', 'consu') for proc in self.browse(cr, uid, ids, context=context))
def check_move_cancel(self, cr, uid, ids, context=None):
""" Checks if move is cancelled or not.
@ -174,9 +173,9 @@ class procurement_order(osv.osv):
""" Checks if move is done or not.
@return: True or False.
"""
if not context:
context = {}
return all(not procurement.move_id or procurement.move_id.state == 'done' for procurement in self.browse(cr, uid, ids, context=context))
return all(proc.product_id.type == 'service' or (proc.move_id and proc.move_id.state == 'done') \
for proc in self.browse(cr, uid, ids, context=context))
#
# This method may be overrided by objects that override procurement.order
# for computing their own purpose
@ -258,26 +257,25 @@ class procurement_order(osv.osv):
def check_produce(self, cr, uid, ids, context=None):
""" Checks product type.
@return: True or Product Id.
@return: True or False
"""
res = True
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
for procurement in self.browse(cr, uid, ids, context=context):
if procurement.product_id.product_tmpl_id.supply_method <> 'produce':
partner_list = sorted([(partner_id.sequence, partner_id) for partner_id in procurement.product_id.seller_ids if partner_id])
if partner_list:
partner = partner_list and partner_list[0] and partner_list[0][1] and partner_list[0][1].name or False
if user.company_id and user.company_id.partner_id:
if partner.id == user.company_id.partner_id.id:
return True
product = procurement.product_id
#TOFIX: if product type is 'service' but supply_method is 'buy'.
if product.supply_method <> 'produce':
supplier = product.seller_id
if supplier and user.company_id and user.company_id.partner_id:
if supplier.id == user.company_id.partner_id.id:
continue
return False
if procurement.product_id.product_tmpl_id.type=='service':
res = res and self.check_produce_service(cr, uid, procurement, context)
if product.type=='service':
res = self.check_produce_service(cr, uid, procurement, context)
else:
res = res and self.check_produce_product(cr, uid, procurement, context)
res = self.check_produce_product(cr, uid, procurement, context)
if not res:
return False
return res
return True
def check_buy(self, cr, uid, ids):
""" Checks product type.
@ -483,7 +481,7 @@ class StockPicking(osv.osv):
if move.state == 'done' and move.procurements:
for procurement in move.procurements:
wf_service.trg_validate(user, 'procurement.order',
procurement.id, 'button_check', cursor)
procurement.id, 'button_check', cursor)
return res
StockPicking()

View File

@ -50,12 +50,14 @@
<field name="wkf_id" ref="wkf_procurement"/>
<field name="name">produce_check</field>
</record>
<!-- act_produce_service should be move in project_mrp module. -->
<record id="act_produce_service" model="workflow.activity">
<field name="wkf_id" ref="wkf_procurement"/>
<field name="name">produce_service</field>
<field name="kind">function</field>
<field name="action">action_produce_assign_service()</field>
</record>
<record id="act_make_done" model="workflow.activity">
<field name="wkf_id" ref="wkf_procurement"/>
<field name="name">ready</field>
@ -163,18 +165,28 @@
<field name="act_to" ref="act_produce_check"/>
<field name="condition">check_produce()</field>
</record>
<record id="trans_product_check_produce_service" model="workflow.transition">
<field name="act_from" ref="act_produce_check"/>
<field name="act_to" ref="act_produce_service"/>
<field name="condition">not check_product()</field>
</record>
<record id="trans_make_to_stock_make_done" model="workflow.transition">
<field name="act_from" ref="act_make_to_stock"/>
<field name="act_from" ref="act_make_to_stock"/> <!-- TOFIX: If product is service product and procure method is 'make_to_stock', procurement is closed without generated service -->
<field name="act_to" ref="act_make_done"/>
<field name="condition">True</field>
<field name="trigger_model" eval="False"/>
<field name="trigger_expr_id" eval="False"/>
</record>
<!-- TOFIX: Without installing 'mrp' module, If product is produce(mto), procurement never close (Its gone in idle) so sale order never close and also invoice never created if post paid invoice. solution of this issue is below, just add one transition from act_produce_check to act_make_done -->
<!--
<record id="trans_produce_make_done" model="workflow.transition">
<field name="act_from" ref="act_produce_check"/>
<field name="act_to" ref="procurement.act_make_done"/>
<field name="condition">check_product()</field>
</record> -->
<!-- TOFIX: service related transition should be move into project_mrp module. -->
<record id="trans_product_check_produce_service" model="workflow.transition">
<field name="act_from" ref="act_produce_check"/>
<field name="act_to" ref="act_produce_service"/>
<field name="condition">not check_product()</field>
</record>
<record id="trans_produce_service_cancel" model="workflow.transition">
<field name="act_from" ref="act_produce_service"/>
<field name="act_to" ref="act_cancel"/>
@ -184,6 +196,7 @@
<field name="act_from" ref="act_produce_service"/>
<field name="act_to" ref="act_make_done"/>
</record>
<record id="trans_make_done_done" model="workflow.transition">
<field name="act_from" ref="act_make_done"/>
<field name="act_to" ref="act_done"/>

View File

@ -0,0 +1,88 @@
-
For test the procurement process, First I have to apply a minimum stock rule on product
-
I create minimum stock rule for product.
-
!record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}:
company_id: base.main_company
location_id: stock.stock_location_stock
logic: max
name: OP/00008
product_id: product.product_product_cpu2
product_max_qty: 15.0
product_min_qty: 5.0
product_uom: product.product_uom_kgm
qty_multiple: 1
warehouse_id: stock.warehouse0
-
Check product quantity and update it, if needed for apply a minimum stock rule.
-
!python {model: product.product}: |
product = self.browse(cr, uid, ref('product.product_product_cpu2'))
if product.virtual_available < 5.0:
change_qty = self.pool.get('stock.change.product.qty')
id = change_qty.create(cr, uid, {'location_id' : ref('stock.stock_location_stock'), 'new_quantity': 4, 'product_id': product.id})
change_qty.change_product_qty(cr, uid, [id], {'active_model':'product.product', 'active_id': product.id, 'active_ids':[product.id]})
assert product.qty_available == 4,"Product quantity is not updated."
assert product.virtual_available < 5.0,'Virtual stock have more quantities.'
-
I run the scheduler.
-
!python {model: procurement.order}: |
self.run_scheduler(cr, uid)
-
I check that procurement order is based on minimum stock rule.
-
!python {model: procurement.order}: |
proc_ids = self.search(cr, uid, [('product_id','=', ref('product.product_product_cpu2'))])
assert proc_ids, 'No Procurement created.'
proc_order = self.browse(cr, uid, proc_ids)[0]
assert proc_order.product_qty == 11.0,"Procurement product quantity is not corresponded."
-
I check product quantity.
-
!python {model: product.product}: |
product = self.browse(cr, uid, ref('product.product_product_cpu2'))
assert product.virtual_available == 15.0,"After run the scheduler product's virtual stock is not updated."
-
For test the Procurement Request wizard, Again I have to update product quantity.
-
!python {model: product.product}: |
mk_procure = self.pool.get('make.procurement')
procur_order = self.pool.get('procurement.order')
product = self.browse(cr, uid, ref('product.product_product_cpu2'))
context.update({'active_model': 'product.product','active_id':ref('product.product_product_cpu2')})
values = {'warehouse_id': ref('base.main_company'), 'uom_id': ref('product.product_uom_unit'), 'qty': 5}
id = mk_procure.create(cr, uid, values, context)
procurement = mk_procure.make_procurement(cr, uid, [id], context)
assert product.virtual_available == 20.0, 'Virtual stock should be updated'
proc_id = procurement.get('res_id')
for procurement in procur_order.browse(cr, uid, [proc_id]):
if procurement.state == 'confirmed':
assert procurement.state == 'confirmed',"Procurement state should be 'Confirmed'."
assert procurement.product_id.id == ref('product.product_product_cpu2'),"Product is not correspond."
assert procurement.product_qty == 5,"Product Quantity is not correspond."
assert procurement.product_uom.id == ref('product.product_uom_unit'),"Product's UOM is not correspond."
context.update({'proc': proc_id})
-
I run the scheduler.
-
!python {model: procurement.order}: |
self.run_scheduler(cr, uid)
-
I check the current state of procurement.
-
!python {model: procurement.order}: |
proc_id = context.get('proc')
proc = self.browse(cr, uid, [proc_id])[0]
assert proc.state == 'ready' or 'exception',"Procurement should be in Ready or Exception state"
-
I compute minimum stock.
-
!python {model: procurement.orderpoint.compute}: |
proc_id = context.get('proc')
context.update({'active_model': 'procurement.order', 'active_id': proc_id})
id = self.create(cr, uid, {'automatic': True}, context)
self.procure_calculation(cr, uid, [id], context)

View File

@ -442,6 +442,16 @@
<field name="type">product</field>
<field name="categ_id" ref="product_category_shelves0"/>
</record>
<record id="product_product_span100" model="product.product">
<field name="default_code">SPAN100</field>
<field name="supply_method">produce</field>
<field eval="'make_to_order'" name="procure_method"/>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="name">Shelf Panel</field>
<field name="type">product</field>
<field name="categ_id" ref="product_category_shelves0"/>
</record>
<record id="product_product_woodmm0" model="product.product">
<field name="default_code">WOOD002</field>
<field name="supply_method">buy</field>
@ -455,6 +465,19 @@
<field name="categ_id" ref="product_category_rawmaterial0"/>
</record>
<record id="product_product_woodmm10" model="product.product">
<field name="default_code">WOOD010</field>
<field name="supply_method">buy</field>
<field name="standard_price">7.0</field>
<field name="uom_id" ref="product_uom_meter"/>
<field name="uom_po_id" ref="product_uom_meter"/>
<field name="name">Wood 10mm</field>
<field eval="2" name="seller_delay"/>
<field eval="7.0" name="sale_delay"/>
<field name="type">product</field>
<field name="categ_id" ref="product_category_rawmaterial0"/>
</record>
<record id="product_product_kitchendesignproject0" model="product.product">
<field name="default_code">PROJ</field>
<field name="supply_method">produce</field>
@ -509,7 +532,7 @@
<record id="product_product_rearpanelarm0" model="product.product">
<field name="default_code">RPAN100</field>
<field name="supply_method">buy</field>
<field name="supply_method">produce</field>
<field name="standard_price">10.0</field>
<field eval="0" name="sale_ok"/>
<field name="uom_id" ref="product_uom_unit"/>
@ -548,7 +571,7 @@
<record id="product_product_shelf0" model="product.product">
<field name="default_code">RCK100</field>
<field name="supply_method">buy</field>
<field name="supply_method">produce</field>
<field name="standard_price">5.0</field>
<field eval="0" name="sale_ok"/>
<field name="uom_id" ref="product_uom_unit"/>

View File

@ -56,7 +56,7 @@
<field name="virtual_available"/>
<field name="lst_price"/>
<field name="price" invisible="not context.get('pricelist',False)"/>
<field name="standard_price"/>
<field name="standard_price" groups="base.group_extended"/>
<field name="state" groups="base.group_extended"/>
<field name="company_id" groups="base.group_multi_company" invisible="1"/>
</tree>
@ -100,9 +100,10 @@
</group>
<group colspan="2" col="2">
<separator string="Base Prices" colspan="2"/>
<field groups="base.group_extended" name="cost_method"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
<field name="list_price"/>
<field groups="base.group_extended" name="cost_method"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"
groups="base.group_extended"/>
<newline/>
<field name="price_margin" groups="product.group_product_variant"/>
<field name="price_extra" groups="product.group_product_variant"/>
@ -637,8 +638,9 @@
<group colspan="2" col="2">
<separator string="Base Prices" colspan="2"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
<field name="list_price"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"
groups="base.group_extended"/>
<field groups="base.group_extended" name="cost_method"/>
</group>

View File

@ -63,25 +63,25 @@ class project_task_delegate(osv.osv_memory):
task_name =tools.ustr(task.name)
if 'project_id' in fields:
res.update({'project_id': task.project_id and task.project_id.id})
res['project_id'] = int(task.project_id.id) if task.project_id else False
if 'name' in fields:
if task_name.startswith(_('CHECK: ')):
newname = tools.ustr(task_name).replace(_('CHECK: '), '')
else:
newname = tools.ustr(task_name or '')
res.update({'name': newname})
res['name'] = newname
if 'planned_hours' in fields:
res.update({'planned_hours': task.remaining_hours or 0.0})
res['planned_hours'] = task.remaining_hours or 0.0
if 'prefix' in fields:
if task_name.startswith(_('CHECK: ')):
newname = tools.ustr(task_name).replace(_('CHECK: '), '')
else:
newname = tools.ustr(task_name or '')
prefix = _('CHECK: %s') % newname
res.update({'prefix': prefix})
res['prefix'] = prefix
if 'new_task_description' in fields:
res.update({'new_task_description': task.description})
res['new_task_description'] = task.description
return res

View File

@ -54,8 +54,10 @@ and decide on their status as they evolve.
],
'demo_xml': ['project_issue_demo.xml'],
'test': [
'test/convert_issue_to_task.yml',
'test/test_project_issue_states.yml'
'test/subscribe_issue.yml',
'test/issue_process.yml',
'test/cancel_issue.yml',
'test/issue_demo.yml'
],
'installable': True,
'active': False,

View File

@ -314,7 +314,8 @@ class project_issue(crm.crm_case, osv.osv):
'description':bug.description,
'date_deadline': bug.date,
'project_id': bug.project_id.id,
'priority': bug.priority,
# priority must be in ['0','1','2','3','4'], while bug.priority is in ['1','2','3','4','5']
'priority': str(int(bug.priority) - 1),
'user_id': bug.user_id.id,
'planned_hours': 0.0,
})

View File

@ -0,0 +1,60 @@
-
In order to test process of issue tracking in OpenERP, I cancel the unqualified Issue.
-
!python {model: project.issue}: |
self.case_cancel(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I check the issue is in cancel state.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in cancel state}:
- state == 'cancel'
-
I re-open the Issue.
-
!python {model: project.issue}: |
self.case_open(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I check the state of issue after open it.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in open state}:
- state == 'open'
-
I put the issue in pending state.
-
!python {model: project.issue}: |
self.case_pending(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I check the state of issue after put it in pending state.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in pending state}:
- state == 'pending'
-
I cancel the issue is in pending state.
-
!python {model: project.issue}: |
self.case_cancel(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I check the issue is in cancel state.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in cancel state}:
- state == 'cancel'
-
I close Issue.
-
!python {model: project.issue}: |
self.case_close(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I check state of Issue after close.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in done state}:
- state == 'done'
-
I cancel the issue is in done state.
-
!python {model: project.issue}: |
self.case_cancel(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I check the issue is in cancel state.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in cancel state}:
- state == 'cancel'

View File

@ -1,32 +0,0 @@
-
Create an issue
-
!record {model: project.issue, id: project_issue_onchangeevent0}:
categ_id: project_issue.bug_categ
name: on_change event does not pass context to the method
project_id: project.project_project_22
working_hours_close: 0.0
working_hours_open: 0.0
-
Check there is no task attached to issue
-
!assert {model: project.issue, id: project_issue_onchangeevent0, string: There must not be any task attached to issue}:
- task_id.id == False
-
Convert issue to task
-
!python {model: project.issue}: |
self.convert_issue_task(cr, uid, [ref("project_issue_onchangeevent0")],
{"lang": "en_US", "project_id": False, "tz": False, "active_model": "ir.ui.menu",
"department_id": False, "section_id": False, "search_default_project_id":
False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs":
1, "active_ids": [ref("project_issue.menu_project_issue_track")], "active_id":
ref("project_issue.menu_project_issue_track"), })
-
Check there is a task attached to issue
-
!assert {model: project.issue, id: project_issue_onchangeevent0, string: After creating a task for the issue there must be a task attached to it}:
- task_id.id != False

View File

@ -0,0 +1,45 @@
Return-Path: <Robert_Adersen@yahoo.com>
X-Original-To: abc@mycompany.com
Delivered-To: abc@mycompany.com
Received: by mail1.mycompany.com (Postfix, from userid 10002)
id 3955EBFACA; Tue, 29 Nov 2011 08:14:47 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail1.mycompany.com
X-Spam-Level:
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from nm39-vm6.bullet.mail.ne1.yahoo.com (nm39-vm6.bullet.mail.ne1.yahoo.com [98.138.229.166])
by mail1.mycompany.com (Postfix) with SMTP id 0D074BF53A
for <abc@mycompany.com>; Tue, 29 Nov 2011 08:14:44 +0100 (CET)
Received: from [98.138.90.54] by nm39.bullet.mail.ne1.yahoo.com with NNFMP; 29 Nov 2011 07:13:26 -0000
Received: from [98.138.84.39] by tm7.bullet.mail.ne1.yahoo.com with NNFMP; 29 Nov 2011 07:13:26 -0000
Received: from [127.0.0.1] by smtp107.mail.ne1.yahoo.com with NNFMP; 29 Nov 2011 07:13:26 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.in; s=s1024; t=1322550806; bh=LFefFqrky41IufKZHP8a86obZoBPxyX1aafgWNcrw7U=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding; b=NB8bd6b4Uk3/3fKhdzbcqFEZGPpKyotLeE0xh8H08rcFEahMFfY5uXgsYZsUFvTLCKfTyQWh/oPTVxHeUTGY/Y5MzAnndghX6S0mzlFtmW2dwLMqdWxQLZwU7EhbyYF9PCHicsmtlUVyo7Ou5ePSviqC0SOyCJJVWwzWlv5W9Zg=
X-Yahoo-Newman-Id: 152218.10448.bm@smtp107.mail.ne1.yahoo.com
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: i4zQqJUVM1mab8kxoCTmgMwxw9th.MdiJzmc4Ffbno7QGkl
acotmc0pGoiw_GrhwReSA6uNIveeAUi9WA6NniWAElxbUzGIQplTBHjRhdqF
d_rLG1Yn71DYxllLCZC8xoRzumVHw.kue0ymrl4D0VO.lEeyXbbYoz.TpAvu
ZASBwSV_mESEUu96bb1esfOjI_2MhibMNmt.2egkOG6LS3AcDkVWXJb.VpQe
yZieJ5djjUx9uu4HModjROSUWHKm3Qd5ZwvG.3s1JvHNNvPC3Mo6x.DXi_rj
d70J2pruXhJ9ZnbNooZiSHkrhaugWV.kquq6475ZxKP6Tu7G8iUgZUkHWCf.
aEdBFl2.4RanSkMohEfbNtwpXUQ0eDDOOPatHFB27JSP0jw--
X-Yahoo-SMTP: oNtzSBqswBAqJIGYOgyGesyleENrhUEtEgBkQ053
Received: from [192.168.1.30] (Robert_Adersen@180.211.100.2 with plain)
by smtp107.mail.ne1.yahoo.com with SMTP; 28 Nov 2011 23:13:25 -0800 PST
Message-ID: <4ED48611.6070605@yahoo.in>
Date: Tue, 29 Nov 2011 12:43:21 +0530
From: Robert Adersen <Robert_Adersen@yahoo.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10
MIME-Version: 1.0
To: abc@mycompany.com
Subject: Error in the account module
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hello Sir,
I am using the openerp v6.1 and i have problem in hr module, so try to
check it and solve my problem.
thanks
Robert Adersen

View File

@ -0,0 +1,8 @@
-
!record {model: project.issue, id: project_task_1, view: False}:
task_id: 'project.project_task_17'
name: 'Error in account module'
-
!record {model: project.issue, id: project01, view: False}:
project_id: 'project.project_project_9'
name: 'OpenERP Integration'

View File

@ -0,0 +1,57 @@
-
In order to test process of issue tracking in OpenERP, I Open the Issue.
-
!python {model: project.issue}: |
self.case_open(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I check state of Issue after opened it.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in open state}:
- state == 'open'
-
Now I put Issue in pending due to need more information.
-
!python {model: project.issue}: |
self.case_pending(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I check state after put in pending.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in pending state}:
- state == 'pending'
-
I send mail to get more details.
-
!python {model: mail.compose.message }: |
ctx = context.copy()
ctx.update({'active_model': 'project.issue', 'active_id': ref("crm_case_buginaccountsmodule0"), 'active_ids': [ref("crm_case_buginaccountsmodule0")]})
vals = self.default_get(cr, uid , [], context=ctx)
try:
new_id = self.create(cr, uid, {'email_from': 'support@mycompany.com','email_to': 'Robert_Adersen@yahoo.com', 'subject': 'Regarding error in account module we nees more details'})
self.send_mail(cr, uid, [new_id], context=ctx)
except Exception, e:
pass
-
After getting sufficient details, I re-open Issue from pending state.
-
!python {model: project.issue}: |
self.case_open(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I check state of Issue after re-opened.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in open state}:
- state == 'open'
-
I create Task for Issue.
-
!python {model: project.issue}: |
self.convert_issue_task(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I close Issue after resolving it
-
!python {model: project.issue}: |
self.case_close(cr, uid, [ref("crm_case_buginaccountsmodule0")])
-
I Check state of Issue after closed.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in done state}:
- state == 'done'

View File

@ -0,0 +1,17 @@
-
In Order to test process of Issue in OpenERP, Custmer send the issue by email.
-
!python {model: mail.thread}: |
import addons
request_file = open(addons.get_module_resource('project_issue','test', 'issue.eml'),'rb')
request_message = request_file.read()
self.message_process(cr, uid, 'project.issue', request_message)
-
After getting the mail, I check details of new issue of that customer.
-
!python {model: project.issue}: |
issue_ids = self.search(cr, uid, [('email_from', '=', 'Robert Adersen <Robert_Adersen@yahoo.com>')])
assert issue_ids and len(issue_ids), "issue is not created after getting request"
issue = self.browse(cr, uid, issue_ids[0], context=context)
assert not issue.partner_id, "Customer should be a new"
assert issue.name == "Error in the account module", "Subject does not match"

View File

@ -1,112 +0,0 @@
-
Create an issue
-
!record {model: project.issue, id: project_issue_stockmovedates0}:
categ_id: project_issue.bug_categ
name: Stock Move dates
project_id: project.project_project_22
working_hours_close: 0.0
working_hours_open: 0.0
-
Check if issue in 'draft' state
-
!assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in draft state}:
- state == 'draft'
-
Open the issue
-
!python {model: project.issue}: |
self.case_open(cr, uid, [ref("project_issue_stockmovedates0")], {"lang":
"en_US", "active_ids": [ref("project_issue.menu_project_issue_track")], "tz":
False, "active_model": "ir.ui.menu", "search_default_project_id": False, "search_default_my_bugs":
1, "search_default_user_id": 1, "search_default_current_bugs": 1, "project_id":
False, "active_id": ref("project_issue.menu_project_issue_track"), })
-
Check if issue in 'open' state
-
!assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in open state}:
- state == 'open'
-
Keep issue pending
-
!python {model: project.issue}: |
self.case_pending(cr, uid, [ref("project_issue_stockmovedates0")],
{"lang": "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")],
"tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs":
1, "project_id": False, "active_id": ref("project_issue.menu_project_issue_track"),
})
-
Check if issue in 'pending' state
-
!assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in pending state}:
- state == 'pending'
-
Open the issue
-
!python {model: project.issue}: |
self.case_open(cr, uid, [ref("project_issue_stockmovedates0")], {"lang":
"en_US", "active_ids": [ref("project_issue.menu_project_issue_track")], "tz":
False, "active_model": "ir.ui.menu", "search_default_project_id": False, "search_default_my_bugs":
1, "search_default_user_id": 1, "search_default_current_bugs": 1, "project_id":
False, "active_id": ref("project_issue.menu_project_issue_track"), })
-
Check if issue in 'open' state
-
!assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in open state}:
- state == 'open'
-
Cancel the issue
-
!python {model: project.issue}: |
self.case_cancel(cr, uid, [ref("project_issue_stockmovedates0")],
{"lang": "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")],
"tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs":
1, "project_id": False, "active_id": ref("project_issue.menu_project_issue_track"),
})
-
Check if issue in 'cancel' state
-
!assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in cancel state}:
- state == 'cancel'
-
Reset the issue
-
!python {model: project.issue}: |
self.case_reset(cr, uid, [ref("project_issue_stockmovedates0")],
{"lang": "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")],
"tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs":
1, "project_id": False, "active_id": ref("project_issue.menu_project_issue_track"),
})
-
Check if issue in 'draft' state
-
!assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in draft state}:
- state == 'draft'
-
Close the issue
-
!python {model: project.issue}: |
self.case_close(cr, uid, [ref("project_issue_stockmovedates0")],
{"lang": "en_US", "active_ids": [ref("project_issue.menu_project_issue_track")],
"tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
False, "search_default_my_bugs": 1, "search_default_user_id": 1, "search_default_current_bugs":
1, "project_id": False, "active_id": ref("project_issue.menu_project_issue_track"),
})
-
Check if issue in 'done' state
-
!assert {model: project.issue, id: project_issue_stockmovedates0, severity: error, string: Issue is in done state}:
- state == 'done'

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