[MERGE] merged with trunk

bzr revid: javier@cl-t076-283cl-20111010170727-r7rh4th9e42x08mp
This commit is contained in:
javieredm@vauxoo.com
2011-10-10 13:07:27 -04:00
committed by javier
93 changed files with 2541 additions and 2025 deletions
-2
View File
@@ -23,8 +23,6 @@
<report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
<report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>
<report id="account_move_line_list" model="account.tax.code" name="account.tax.code.entries" rml="account/report/account_tax_code.rml" string="All Entries"/>
<report
auto="False"
id="account_vat_declaration"
-1
View File
@@ -33,7 +33,6 @@ import account_print_overdue
import account_aged_partner_balance
#import tax_report
import account_tax_report
import account_tax_code
import account_balance_landscape
import account_invoice_report
import account_report
-63
View File
@@ -1,63 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from report import report_sxw
def _get_country(record):
if record.partner_id \
and record.partner_id.address \
and record.partner_id.address[0].country_id:
return record.partner_id.address[0].country_id.code
else:
return ''
def _record_to_report_line(record):
return {'date': record.date,
'ref': record.ref,
'acode': record.account_id.code,
'name': record.name,
'debit': record.debit,
'credit': record.credit,
'pname': record.partner_id and record.partner_id.name or '',
'country': _get_country(record)
}
class account_tax_code_report(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(account_tax_code_report, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
'get_line':self.get_line,
})
def get_line(self, obj):
line_ids = self.pool.get('account.move.line').search(self.cr, self.uid, [('tax_code_id','=',obj.id)])
if not line_ids: return []
return map(_record_to_report_line,
self.pool.get('account.move.line')\
.browse(self.cr, self.uid, line_ids))
report_sxw.report_sxw('report.account.tax.code.entries', 'account.tax.code',
'addons/account/report/account_tax_code.rml', parser=account_tax_code_report, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-144
View File
@@ -1,144 +0,0 @@
<?xml version="1.0"?>
<document filename="Accounting Entries.pdf">
<template pageSize="(595.0,842.0)" title="Accounting Entries" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="28.0" y1="42.0" width="539" height="758"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Line_Title">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_Line_Content_Detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
<blockTable colWidths="539.0" repeatRows="1" style="Table2">
<tr>
<td>
<para style="terp_header_Centre">Accounting Entries-[[ company.currency_id.name ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="52.0,68.0,55.0,110.0,130.0,64.0,60.0" repeatRows="1" style="Table_Line_Title">
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">Voucher No</para>
</td>
<td>
<para style="terp_tblheader_Details">A/c Code</para>
</td>
<td>
<para style="terp_tblheader_Details">Third Party (Country)</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_8">[[ repeatIn(get_line(o),'line') ]]</para>
<blockTable colWidths="52.0,68.0,54.0,110.0,131.0,63.0,60.0" style="Table_Line_Content_Detail">
<tr>
<td>
<para style="terp_default_9">[[ not line and removeParentNode('blockTable') ]] [[ formatLang(line['date'],date=True) ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['ref'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['acode'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['pname'] ]] ([[ line['country'] ]] )</para>
</td>
<td>
<para style="terp_default_9">[[ line['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['debit'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['credit'], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
</section>
</story>
</document>
+2 -2
View File
@@ -13,7 +13,7 @@
<newline/>
<field name="chart_tax_id" widget='selection'/>
<field name="fiscalyear_id"/>
<field name="based_on"/>
<!--- <field name="based_on"/>--> <!-- the option based_on 'payment' is probably not fully compliant with what the users understand with that term. So, currently, it's seems better to remove it from the view to avoid further problems -->
<separator string="Periods" colspan="4"/>
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" />
<field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" />
@@ -43,4 +43,4 @@
icon="STOCK_PRINT"/>
</data>
</openerp>
</openerp>
@@ -73,8 +73,8 @@ class account_invoice_line(osv.osv):
_inherit = "account.invoice.line"
_description = "Invoice Line"
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context)
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None):
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context, company_id=company_id)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
if rec:
res_prod['value'].update({'account_analytic_id': rec.analytic_id.id})
@@ -307,8 +307,8 @@ class account_invoice_line(osv.osv):
res ['analytics_id'] = line.analytics_id and line.analytics_id.id or False
return res
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context)
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None):
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context, company_id=company_id)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
if rec and rec.analytics_id:
res_prod['value'].update({'analytics_id': rec.analytics_id.id})
@@ -462,7 +462,7 @@ sale_order_line()
class account_bank_statement(osv.osv):
_inherit = "account.bank.statement"
_name = "account.bank.statement"
def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, st_line_number, context=None):
account_move_line_pool = self.pool.get('account.move.line')
account_bank_statement_line_pool = self.pool.get('account.bank.statement.line')
@@ -484,7 +484,7 @@ class account_bank_statement(osv.osv):
if not st_line.amount:
continue
return True
account_bank_statement()
@@ -8,15 +8,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Search Payment lines">
<group col="4" colspan="6">
<field name="duedate" />
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="search_entries" string="Search" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
<group col="4" colspan="6">
<field name="duedate" />
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="search_entries" string="Search" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
</field>
</record>
@@ -25,15 +25,16 @@
<field name="model">payment.order.create</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Search Payment lines">
<group col="4" colspan="6">
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="create_payment" string="_Add to payment order" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
<form string="Search Payment lines">
<group col="4" colspan="6">
<field name="entries"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="create_payment" string="_Add to payment order" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
</field>
</record>
@@ -29,7 +29,7 @@ class payment_order_create(osv.osv_memory):
Create a payment object with lines corresponding to the account move line
to pay according to the date and the mode provided by the user.
Hypothesis:
- Small number of non-reconcilied move line, payment mode and bank account type,
- Small number of non-reconciled move line, payment mode and bank account type,
- Big number of partner and bank account.
If a type is given, unsuitable account Entry lines are ignored.
@@ -48,12 +48,11 @@ class payment_order_create(osv.osv_memory):
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
res = super(payment_order_create, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
if context and 'line_ids' in context:
view_obj = etree.XML(res['arch'])
child = view_obj.getchildren()[0]
domain = '[("id", "in", '+ str(context['line_ids'])+')]'
field = etree.Element('field', attrib={'domain': domain, 'name':'entries', 'colspan':'4', 'height':'300', 'width':'800', 'nolabel':"1"})
child.addprevious(field)
res['arch'] = etree.tostring(view_obj)
doc = etree.XML(res['arch'])
nodes = doc.xpath("//field[@name='entries']")
for node in nodes:
node.set('domain', '[("id", "in", '+ str(context['line_ids'])+')]')
res['arch'] = etree.tostring(doc)
return res
def create_payment(self, cr, uid, ids, context=None):
@@ -81,14 +80,14 @@ class payment_order_create(osv.osv_memory):
elif payment.date_prefered == 'fixed':
date_to_pay = payment.date_scheduled
payment_obj.create(cr, uid,{
'move_line_id': line.id,
'amount_currency': line.amount_to_pay,
'bank_id': line2bank.get(line.id),
'order_id': payment.id,
'partner_id': line.partner_id and line.partner_id.id or False,
'communication': line.ref or '/',
'date': date_to_pay,
'currency': line.invoice and line.invoice.currency_id.id or False,
'move_line_id': line.id,
'amount_currency': line.amount_to_pay,
'bank_id': line2bank.get(line.id),
'order_id': payment.id,
'partner_id': line.partner_id and line.partner_id.id or False,
'communication': line.ref or '/',
'date': date_to_pay,
'currency': line.invoice and line.invoice.currency_id.id or False,
}, context=context)
return {'type': 'ir.actions.act_window_close'}
@@ -76,7 +76,7 @@ class account_payment_populate_statement(osv.osv_memory):
statement.currency.id, line.amount_currency, context=ctx)
context.update({'move_line_ids': [line.move_line_id.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='payment', date=line.ml_maturity_date, context=context)
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), voucher_currency_id= statement.currency.id, ttype='payment', date=line.ml_maturity_date, context=context)
if line.move_line_id:
voucher_res = {
+1 -1
View File
@@ -415,7 +415,7 @@ class auction_lots(osv.osv):
result = [ (r['id'], str(r['obj_num'])+' - '+r['name']) for r in self.read(cr, user, ids, ['name', 'obj_num'])]
return result
def name_search(self, cr, user, name, args=None, operator='ilike', context=None):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args = []
ids = []
+27 -3
View File
@@ -551,8 +551,8 @@
<!-- Salary Rules -->
<record id="hr_salary_rule_tree" model="ir.ui.view">
<field name="name">hr.salary.rule.tree</field>
<record id="hr_salary_rule_list" model="ir.ui.view">
<field name="name">hr.salary.rule.list</field>
<field name="model">hr.salary.rule</field>
<field name="type">tree</field>
<field name="arch" type="xml">
@@ -565,6 +565,22 @@
</tree>
</field>
</record>
<record id="hr_salary_rule_tree" model="ir.ui.view">
<field name="name">hr.salary.rule.tree</field>
<field name="model">hr.salary.rule</field>
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field eval="20" name="priority"/>
<field name="arch" type="xml">
<tree string="Salary Rules">
<field name="name"/>
<field name="code"/>
<field name="category_id" invisible="True"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</tree>
</field>
</record>
<record id="hr_salary_rule_form" model="ir.ui.view">
<field name="name">hr.salary.rule.form</field>
<field name="model">hr.salary.rule</field>
@@ -645,7 +661,7 @@
<field name="name">Salary Rules</field>
<field name="res_model">hr.salary.rule</field>
<field name="view_type">form</field>
<field name="view_id" ref="hr_salary_rule_tree"/>
<field name="view_id" ref="hr_salary_rule_list"/>
<field name="domain">[('parent_rule_id','=',False)]</field>
<field name="search_view_id" ref="view_hr_rule_filter"/>
</record>
@@ -653,6 +669,14 @@
<menuitem id="menu_action_hr_salary_rule_form" action="action_salary_rule_form" parent="payroll_configure" sequence="12"/>
<act_window name="All Children Rules"
domain="[('id', 'in', [active_id])]"
res_model="hr.salary.rule"
src_model="hr.salary.rule"
view_id="hr_salary_rule_tree"
view_type="tree"
id="act_children_salary_rules"/>
<!-- payslip runs -->
<record id="hr_payslip_run_filter" model="ir.ui.view">
+6 -5
View File
@@ -103,9 +103,10 @@ class idea_post_vote(osv.osv_memory):
@param ids: List of Idea Post vote’s IDs.
@return: Dictionary {}
"""
ctx_key = 'idea_ids' if context.get('idea_ids') is not None else 'active_ids'
vote_ids = context and context.get('active_ids', []) or []
vote_id = context['active_ids'][0]
idea_id = context[ctx_key][0]
vote_pool = self.pool.get('idea.vote')
idea_pool = self.pool.get('idea.idea')
comment_pool = self.pool.get('idea.comment')
@@ -114,19 +115,19 @@ class idea_post_vote(osv.osv_memory):
score = str(do_vote_obj['vote'])
comment = do_vote_obj.get('note', False)
vote = {
'idea_id': vote_id,
'idea_id': idea_id,
'user_id': uid,
'score': score
}
if comment:
comment = {
'user_id':uid,
'idea_id':vote_id,
'idea_id':idea_id,
'content': comment,
}
comment = comment_pool.create(cr, uid, comment)
idea_pool._vote_save(cr, uid, vote_id, None, score, context)
idea_pool._vote_save(cr, uid, idea_id, None, score, context)
#vote = vote_pool.create(cr, uid, vote)
return {'type': 'ir.actions.act_window_close'}
+2
View File
@@ -19,3 +19,5 @@
#
##############################################################################
import l10n_be_hr_payroll
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+4 -2
View File
@@ -22,7 +22,7 @@
'name': 'Belgian Payroll Rules',
'category': 'Localization/Payroll',
'author': 'OpenERP SA',
'depends': ['hr_payroll','hr_contract'],
'depends': ['hr_payroll'],
'version': '1.0',
'description': """
Belgian Payroll Rules
@@ -36,7 +36,7 @@ Belgian Payroll Rules
* Employee Payslip
* Monthly Payroll Register
* Integrated with Holiday Management
* Salary Maj, ONSS, Precompte Professionnel, Child Allowance, ...
* Salary Maj, ONSS, Withholding Tax, Child Allowance, ...
""",
'active': False,
@@ -50,3 +50,5 @@ Belgian Payroll Rules
],
'installable': True
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
File diff suppressed because it is too large Load Diff
+20 -15
View File
@@ -20,32 +20,37 @@
##############################################################################
from osv import fields, osv
import decimal_precision as dp
class hr_contract_be(osv.osv):
_inherit = 'hr.contract'
_columns = {
'reim_travel':fields.float('Reimbursement of travel expenses', digits=(16,2)),
'company_car_emp':fields.float('Company car employer', digits=(16,2)),
'company_car_wkr':fields.float('Company Car Deduction for Worker', digits=(16,2)),
'mis_ex_onss':fields.float('Miscellaneous exempt ONSS ', digits=(16,2)),
'ch_value':fields.float('Check Value Meal ', digits=(16,2)),
'ch_worker':fields.float('Check Value Meal - by worker ', digits=(16,2)),
'insurance':fields.float('Insurance Group - by worker ', digits=(16,2)),
'advantage':fields.float('Benefits of various nature ', digits=(16,2)),
'suppl_net':fields.float('Net supplements', digits=(16,2)),
'retained_net':fields.float('Net retained ', digits=(16,2)),
'travel_reimbursement_amount': fields.float('Reimbursement of travel expenses', digits_compute=dp.get_precision('Payroll')),
'car_company_amount': fields.float('Company car employer', digits_compute=dp.get_precision('Payroll')),
'car_employee_deduction': fields.float('Company Car Deduction for Worker', digits_compute=dp.get_precision('Payroll')),
'misc_onss_deduction': fields.float('Miscellaneous exempt ONSS ', digits_compute=dp.get_precision('Payroll')),
'meal_voucher_amount': fields.float('Check Value Meal ', digits_compute=dp.get_precision('Payroll')),
'meal_voucher_employee_deduction': fields.float('Check Value Meal - by worker ', digits_compute=dp.get_precision('Payroll')),
'insurance_employee_deduction': fields.float('Insurance Group - by worker ', digits_compute=dp.get_precision('Payroll')),
'misc_advantage_amount': fields.float('Benefits of various nature ', digits_compute=dp.get_precision('Payroll')),
'additional_net_amount': fields.float('Net supplements', digits_compute=dp.get_precision('Payroll')),
'retained_net_amount': fields.float('Net retained ', digits_compute=dp.get_precision('Payroll')),
}
hr_contract_be()
class hr_employee_be(osv.osv):
_inherit = 'hr.employee'
_columns = {
'statut_fiscal':fields.selection([('without income','Without Income'),('with income','With Income')], 'Tax status for spouse'),
'handicap':fields.boolean('Disabled Spouse', help="if recipient spouse is declared disabled by law"),
'handicap_child':fields.boolean('Disabled Children', help="if recipient children is/are declared disabled by law"),
'resident':fields.boolean('Nonresident', help="if recipient lives in a foreign country"),
'number_handicap':fields.integer('Number of disabled children'),
'spouse_fiscal_status': fields.selection([('without income','Without Income'),('with income','With Income')], 'Tax status for spouse'),
'disabled_spouse_bool': fields.boolean('Disabled Spouse', help="if recipient spouse is declared disabled by law"),
'disabled_children_bool': fields.boolean('Disabled Children', help="if recipient children is/are declared disabled by law"),
'resident_bool': fields.boolean('Nonresident', help="if recipient lives in a foreign country"),
'disabled_children_number': fields.integer('Number of disabled children'),
}
hr_employee_be()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -2,7 +2,7 @@
<openerp>
<data>
<record id="hr_payroll_head_salary" model="hr.salary.rule.category">
<field name="name">Brut Total</field>
<field name="name">Gross</field>
<field name="code">BRUT</field>
</record>
<record id="hr_payroll.COMP" model="hr.salary.rule.category">
@@ -10,22 +10,22 @@
<field name="code">COMP. PART</field>
</record>
<record id="hr_payroll_head_onss" model="hr.salary.rule.category">
<field name="name">Cotisation Sociale Travailleur</field>
<field name="name">Worker Social Contribution</field>
<field name="code">ONSS</field>
<field name="parent_id" ref="hr_payroll.ALW"/>
</record>
<record id="hr_payroll_head_div_impos" model="hr.salary.rule.category">
<field name="name">Total des divers imposables</field>
<field name="name">Misc. Taxable</field>
<field name="code">DIV. IMPOS</field>
<field name="parent_id" ref="hr_payroll.ALW"/>
</record>
<record id="hr_payroll_head_pp" model="hr.salary.rule.category">
<field name="name">Precompte Professionnel Bareme 2011</field>
<field name="name">Withholding Tax Grid 2011 (Precompte Professionnel Bareme 2011)</field>
<field name="code">P.P.</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<record id="hr_payroll_head_div_net" model="hr.salary.rule.category">
<field name="name">Total divers net</field>
<field name="name">Misc. Net</field>
<field name="code">DIV. NET</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
@@ -35,10 +35,10 @@
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<!-- HR SALAR RULES-->
<!-- HR SALARY RULES-->
<record id="hr_payroll_rules_maj" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_salary"/>
<field name="name">Premium pay 108% Worker</field>
<field name="name">Worker Salary. Premium pay of 108%</field>
<field name="code">SALARY</field>
<field name="condition_select">none</field>
<field name="amount_select">code</field>
@@ -46,7 +46,7 @@
</record>
<record id="hr_payroll_rules_employee" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_salary"/>
<field name="name">Salary Employee</field>
<field name="name">Employee Salary</field>
<field name="code">SALARY</field>
<field name="condition_select">none</field>
<field name="amount_select">code</field>
@@ -55,7 +55,7 @@
</record>
<record id="hr_payroll_rules_onss_rule" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_onss"/>
<field name="name">Office National de Sécurité Sociale</field>
<field name="name">Social contribution</field>
<field name="code">ONSS</field>
<field name="sequence">41</field>
<field name="condition_select">none</field>
@@ -65,7 +65,7 @@
</record>
<record id="hr_payroll_rules_p_p_b1" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_pp"/>
<field name="name">Precompte Professionnel Bareme 2011</field>
<field name="name">Withholding Tax Grid 2011</field>
<field name="code">P.P</field>
<field name="sequence">120</field>
<field name="amount_select">fix</field>
@@ -75,34 +75,34 @@
<record id="hr_payroll_rules_bareme" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_pp"/>
<field name="parent_rule_id" ref="hr_payroll_rules_p_p_b1"/>
<field name="name">Precompte Professionnel</field>
<field name="name">Withholding Tax</field>
<field name="code">B.I.</field>
<field name="amount_select">fix</field>
<field name="sequence">120</field>
<field name="condition_select">python</field>
<field name="appears_on_payslip" eval="False"/>
<field name="condition_python">result = (((employee.marital=='single') or (employee.marital=='married' and employee.statut_fiscal=='with income')) and (employee.resident!=True))</field>
<field name="condition_python">result = (((employee.marital=='single') or (employee.marital=='married' and employee.spouse_fiscal_status=='with income')) and (employee.resident_bool!=True))</field>
</record>
<record id="hr_payroll_rules_baremeII" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_pp"/>
<field name="parent_rule_id" ref="hr_payroll_rules_p_p_b1"/>
<field name="name">Precompte Professionnel</field>
<field name="name">Withholding Tax</field>
<field name="code">B.II</field>
<field name="amount_select">fix</field>
<field name="sequence">120</field>
<field name="condition_select">python</field>
<field name="appears_on_payslip" eval="False"/>
<field name="condition_python">result = ((employee.marital=='married' and employee.statut_fiscal=='without income') and (employee.resident!=True))</field>
<field name="condition_python">result = ((employee.marital=='married' and employee.spouse_fiscal_status=='without income') and (employee.resident_bool!=True))</field>
</record>
<record id="hr_payroll_rules_baremeIII" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_pp"/>
<field name="parent_rule_id" ref="hr_payroll_rules_p_p_b1"/>
<field name="name">Precompte Professionnel</field>
<field name="name">Withholding Tax</field>
<field name="code">B.III</field>
<field name="amount_select">fix</field>
<field name="sequence">120</field>
<field name="condition_select">python</field>
<field name="condition_python">result = employee.resident==True</field>
<field name="condition_python">result = employee.resident_bool==True</field>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rules_child_alw" model="hr.salary.rule">
@@ -147,7 +147,7 @@
the child that is established, regardless of age, that due to developments and recognized
before age 65</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(employee.number_handicap)</field>
<field name="condition_python">result = bool(employee.disabled_children_number)</field>
</record>
<record id="hr_payroll_rules_spouse_handicap" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_div_net"/>
@@ -157,7 +157,7 @@
<field name="sequence">145</field>
<field name="amount_fix">31</field>
<field name="condition_select">python</field>
<field name="condition_python">result = employee.handicap==True</field>
<field name="condition_python">result = employee.disabled_spouse_bool==True</field>
</record>
<record id="hr_payroll_rules_company_car_parent" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_div_impos"/>
@@ -175,9 +175,9 @@
<field name="code">CAR 1</field>
<field name="sequence">15</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.company_car_wkr)</field>
<field name="condition_python">result = bool(contract.car_employee_deduction)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result = contract.company_car_wkr</field>
<field name="amount_python_compute">result = contract.car_employee_deduction</field>
</record>
<record id="hr_payroll_rules_company_car_2" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_div_net"/>
@@ -186,9 +186,9 @@
<field name="code">CAR 2</field>
<field name="sequence">160</field>
<field name="condition_select">python</field>
<field name="condition_python">result = contract.company_car_wkr</field>
<field name="condition_python">result = contract.car_employee_deduction</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result = -contract.company_car_wkr</field>
<field name="amount_python_compute">result = -contract.car_employee_deduction</field>
</record>
<record id="hr_payroll_rules_company_car_emp" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll.COMP"/>
@@ -197,15 +197,15 @@
<field name="code">CAR 3</field>
<field name="sequence">160</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.company_car_emp)</field>
<field name="condition_python">result = bool(contract.car_company_amount)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result = -contract.company_car_emp</field>
<field name="amount_python_compute">result = -contract.car_company_amount</field>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rules_parent_ch" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_div_net"/>
<field name="name">Check Value Meal</field>
<field name="code">Ch.M.</field>
<field name="name">Meal Voucher</field>
<field name="code">MEAL_V</field>
<field name="amount_select">fix</field>
<field name="sequence">165</field>
<field name="condition_select">none</field>
@@ -214,27 +214,27 @@
<record id="hr_payroll_rules_ch_value" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll.COMP"/>
<field name="parent_rule_id" ref="hr_payroll_rules_parent_ch"/>
<field name="name">Check Value Meal, Company Part</field>
<field name="code">Ch.M.</field>
<field name="name">Meal Voucher, Company Part</field>
<field name="code">MEAL_V_COMP</field>
<field name="amount_select">fix</field>
<field name="sequence">165</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result = -(contract.ch_value - contract.ch_worker) * worked_days.WORK100.number_of_days</field>
<field name="amount_python_compute">result = -(contract.meal_voucher_amount - contract.meal_voucher_employee_deduction) * worked_days.WORK100.number_of_days</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.ch_value)</field>
<field name="condition_python">result = bool(contract.meal_voucher_amount)</field>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rules_ch_worker" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_div_net"/>
<field name="name">Retain on Check Value Meal</field>
<field name="name">Retain on Meal Voucher</field>
<field name="parent_rule_id" ref="hr_payroll_rules_parent_ch"/>
<field name="code">Meal Check</field>
<field name="code">MEAL_V_EMP</field>
<field name="sequence">165</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.ch_worker)</field>
<field name="condition_python">result = bool(contract.meal_voucher_employee_deduction)</field>
<field name="amount_select">percentage</field>
<field name="amount_percentage">-100.0</field>
<field name="amount_percentage_base">contract.ch_worker</field>
<field name="amount_percentage_base">contract.meal_voucher_employee_deduction</field>
<field name="quantity">worked_days.WORK100.number_of_days</field>
<field name="appears_on_payslip" eval="True"/>
</record>
@@ -245,8 +245,8 @@
<field name="amount_select">code</field>
<field name="sequence">65</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.reim_travel)</field>
<field name="amount_python_compute">result = contract.reim_travel</field>
<field name="condition_python">result = bool(contract.travel_reimbursement_amount)</field>
<field name="amount_python_compute">result = contract.travel_reimbursement_amount</field>
</record>
<record id="hr_payroll_rules_mis_ex_onss" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll.DED"/>
@@ -255,8 +255,8 @@
<field name="amount_select">code</field>
<field name="sequence">165</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.mis_ex_onss)</field>
<field name="amount_python_compute">result = -contract.mis_ex_onss</field>
<field name="condition_python">result = bool(contract.misc_onss_deduction)</field>
<field name="amount_python_compute">result = -contract.misc_onss_deduction</field>
</record>
<record id="hr_payroll_rules_insurance" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll.DED"/>
@@ -265,8 +265,8 @@
<field name="amount_select">code</field>
<field name="sequence">165</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.insurance)</field>
<field name="amount_pyton_compute">result = -contract.insurance</field>
<field name="condition_python">result = bool(contract.insurance_employee_deduction)</field>
<field name="amount_pyton_compute">result = -contract.insurance_employee_deduction</field>
</record>
<record id="hr_payroll_rules_advantage" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll.ALW"/>
@@ -275,8 +275,8 @@
<field name="amount_select">code</field>
<field name="sequence">10</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.advantage)</field>
<field name="amount_python_compute">result = contract.advantage</field>
<field name="condition_python">result = bool(contract.misc_advantage_amount)</field>
<field name="amount_python_compute">result = contract.misc_advantage_amount</field>
</record>
<record id="hr_payroll_rules_suppl_net" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_div_net"/>
@@ -285,8 +285,8 @@
<field name="amount_select">code</field>
<field name="sequence">185</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.suppl_net)</field>
<field name="amount_python_compute">result = contract.suppl_net</field>
<field name="condition_python">result = bool(contract.additional_net_amount)</field>
<field name="amount_python_compute">result = contract.additional_net_amount</field>
</record>
<record id="hr_payroll_rules_retained_net" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_div_net"/>
@@ -295,8 +295,8 @@
<field name="amount_select">code</field>
<field name="sequence">190</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(contract.retained_net)</field>
<field name="amount_python_compute">result = -contract.retained_net</field>
<field name="condition_python">result = bool(contract.retained_net_amount)</field>
<field name="amount_python_compute">result = -contract.retained_net_amount</field>
</record>
<record id="hr_payroll_salary_structure_employee" model="hr.payroll.structure">
<field name="code">C.P.218</field>
@@ -7,11 +7,11 @@
<field name="name">Bonamy's Contract (Belgium payroll C.P. 218)</field>
<field name="struct_id" ref="hr_payroll_salary_structure_employee"/>
<field eval="2500.0" name="wage"/>
<field eval="6.0" name="ch_value"/>
<field eval="1.09" name="ch_worker"/>
<field eval="250.0" name="company_car_emp"/>
<field eval="110" name="company_car_wkr"/>
<field eval="50.0" name="suppl_net"/>
<field eval="6.0" name="meal_voucher_amount"/>
<field eval="1.09" name="meal_voucher_employee_deduction"/>
<field eval="250.0" name="car_company_amount"/>
<field eval="110" name="car_employee_deduction"/>
<field eval="50.0" name="additional_net_amount"/>
<field name="working_hours" ref="resource.timesheet_group1"/>
</record>
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="hr_contract_form_inherit" model="ir.ui.view">
<record id="hr_contract_form_l10n_be_inherit" model="ir.ui.view">
<field name="name">hr.contract.form.inherit</field>
<field name="model">hr.contract</field>
<field name="type">form</field>
@@ -10,29 +11,29 @@
<field name="arch" type="xml">
<data>
<xpath expr="/form/notebook/page[@name='information']/group[@name='right_column']/field[@name='struct_id']" position="after">
<field name="reim_travel"/>
<field name="company_car_emp"/>
<field name="mis_ex_onss"/>
<field name="ch_value"/>
<field name="advantage"/>
<field name="travel_reimbursement_amount"/>
<field name="car_company_amount"/>
<field name="misc_onss_deduction"/>
<field name="meal_voucher_amount"/>
<field name="misc_advantage_amount"/>
<separator string="Miscellaneous" colspan="2"/>
<field name="suppl_net"/>
<field name="retained_net"/>
<field name="additional_net_amount"/>
<field name="retained_net_amount"/>
</xpath>
<xpath expr="/form/notebook/page/group/field[@name='trial_date_end']" position="after">
<group colspan="2" col="2">
<separator string="by Worker" colspan="2"/>
<field name="insurance"/>
<field name="ch_worker"/>
<field name="company_car_wkr"/>
<field name="insurance_employee_deduction"/>
<field name="meal_voucher_employee_deduction"/>
<field name="car_employee_deduction"/>
</group>
</xpath>
</data>
</field>
</record>
<record id="view_employee_marital_required_form" model="ir.ui.view">
<field name="name">hr.employee.employee.inherit.form</field>
<!-- <record id="view_employee_marital_required_form" model="ir.ui.view">
<field name="name">hr.employee.inherit.form</field>
<field name="model">hr.employee</field>
<field name="type">form</field>
<field name="priority">25</field>
@@ -41,31 +42,32 @@
<field name="marital" position="replace">
</field>
</field>
</record>
</record> -->
<record id="hr_contract_hr_hr_employee_view_for" model="ir.ui.view">
<field name="name">hr.hr.employee.view.for</field>
<record id="hr_employee_form__l10n_be_view_for" model="ir.ui.view">
<field name="name">hr.employee.inherit.form</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="priority">30</field>
<field name="arch" type="xml">
<data>
<xpath expr="/form/notebook/page/group/field[@name='birthday']" position="after">
<!-- <xpath expr="/form/notebook/page/group/field[@name='birthday']" position="after">
<field name="marital" required="True"/>
</xpath>
</xpath> -->
<xpath expr="/form/notebook/page/group/field[@name='gender']" position="before">
<field name="resident" eval="False"/>
<field name="resident_bool" eval="False"/>
</xpath>
<xpath expr="/form/notebook/page/group/field[@name='marital']" position="after">
<field name="statut_fiscal" attrs="{'invisible':[('marital','!=','married')],'required':[('marital','=','married')]}" colspan="1" help="if spouse has professionnel income or not"/>
<field name="handicap" attrs="{'invisible':[('marital','!=','married')]}" colspan="1"/>
<field name="spouse_fiscal_status" attrs="{'invisible':[('marital','!=','married')],'required':[('marital','=','married')]}" colspan="1" help="if spouse has professionnel income or not"/>
<field name="disabled_spouse_bool" attrs="{'invisible':[('marital','!=','married')]}" colspan="1"/>
</xpath>
<xpath expr="/form/notebook/page/group/field[@name='children']" position="after">
<field name="handicap_child"/>
<field name="number_handicap" attrs="{'invisible':[('handicap_child','!=',True)]}" colspan="1" help="number of dependent children declared as disabled"/>
<field name="disabled_children_bool"/>
<field name="disabled_children_number" attrs="{'invisible':[('disabled_children_bool','!=',True)]}" colspan="1" help="number of dependent children declared as disabled"/>
</xpath>
</data>
</field>
</record>
</data>
</openerp>
+1
View File
@@ -97,6 +97,7 @@ Dashboard provided by this module:
'test/mrp_packs.yml',
'test/mrp_phantom_bom.yml',
'test/mrp_production_order.yml',
'test/mrp_production_cancel.yml',
'test/mrp_report.yml',
],
+9 -9
View File
@@ -1,7 +1,7 @@
-
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}:
@@ -16,7 +16,7 @@
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}:
@@ -31,7 +31,7 @@
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}:
@@ -42,7 +42,7 @@
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}:
@@ -64,10 +64,10 @@
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
@@ -82,15 +82,15 @@
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.
+6
View File
@@ -96,6 +96,12 @@
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.
-
+29
View File
@@ -0,0 +1,29 @@
-
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}
+39 -21
View File
@@ -11,6 +11,7 @@
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
@@ -18,14 +19,28 @@
I compute the data.
-
!python {model: mrp.production}: |
self.action_compute(cr, uid, [ref("mrp_production_mo1")], {"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"),
})
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.
-
@@ -50,28 +65,28 @@
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 of PC1 with ready state.
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')])
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 start producing that product first. So I marked it as started.
-
!workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo1}
-
I create record for producing products with quantity 5.00.
I create record for producing products with quantity 6.00.
-
!record {model: mrp.product.produce, id: mrp_product_produce0}:
product_qty: 5.00
product_qty: 6.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','=','confirmed')])
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
@@ -79,23 +94,26 @@
-
!python {model: mrp.production}: |
from tools.translate import _
prod_ids = self.search(cr, uid, [('state','=','done')])
assert prod_ids, _('Manufacturing order is yet not done!')
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 5.00.
I create record for producing products with quantity 6.00.
-
!record {model: mrp.product.produce, id: mrp_product_produce1}:
product_qty: 5.00
product_qty: 6.00
mode: 'consume_produce'
-
Finally my production order is done.
-
!python {model: mrp.product.produce}: |
from tools.translate import _
prod_obj = self.pool.get('mrp.production')
prod_ids = prod_obj.search(cr, uid, [('product_id.default_code','=','PC1')])
self.do_produce(cr, uid, [ref('mrp_product_produce1')], context={'active_ids': prod_ids})
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'
+1 -1
View File
@@ -65,7 +65,7 @@ So that we can compare the theoretic delay and real delay.
'process/mrp_operation_process.xml'
],
'demo_xml': ['mrp_operation_data.xml'],
'test': ['test/mrp_operations.yml', 'test/mrp_operations_report.yml'],
'test': ['test/mrp_operations.yml', 'test/mrp_operations_report.yml','test/mrp_operation_test.yml'],
'installable': True,
'active': False,
'certificate': '0056233813133',
@@ -0,0 +1,56 @@
-
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!')
+14 -2
View File
@@ -14,6 +14,7 @@
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 5.0
allow_reorder: True
-
I am computing the data.
-
@@ -32,7 +33,7 @@
!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!')
assert order_id, _('No Work order define for this production order!')
-
The scheduler runs.
-
@@ -61,7 +62,7 @@
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!')
assert workorder_id, _('No Work order define for this production order!')
-
I start the second production order of the CPU_GEN product.
-
@@ -144,3 +145,14 @@
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)
+1 -1
View File
@@ -48,7 +48,7 @@ The aim is to have a complete module to manage all products repairs. The followi
'mrp_repair_report.xml',
],
'demo_xml': [],
'test': ['test/test_mrp_repair.yml', 'test/mrp_repair_report.yml'],
'test': ['test/test_mrp_repair.yml', 'test/mrp_repair_report.yml','test/mrp_repair_cancel.yml'],
'installable': True,
'active': False,
'certificate': '0060814381277',
+5 -27
View File
@@ -68,12 +68,15 @@ class mrp_repair(osv.osv):
val = 0.0
cur = repair.pricelist_id.currency_id
for line in repair.operations:
#manage prices with tax included use compute_all instead of compute
if line.to_invoice:
for c in tax_obj.compute(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id):
tax_calculate = tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id)
for c in tax_calculate['taxes']:
val += c['amount']
for line in repair.fees_lines:
if line.to_invoice:
for c in tax_obj.compute(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id):
tax_calculate = tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id)
for c in tax_calculate['taxes']:
val += c['amount']
res[repair.id] = cur_obj.round(cr, uid, cur, val)
return res
@@ -105,8 +108,6 @@ class mrp_repair(osv.osv):
return res
def _get_lines(self, cr, uid, ids, context=None):
if context is None:
context = {}
result = {}
for line in self.pool.get('mrp.repair.line').browse(cr, uid, ids, context=context):
result[line.repair_id.id] = True
@@ -462,13 +463,6 @@ class mrp_repair(osv.osv):
self.write(cr, uid, [repair.id], {'state': 'ready'})
return True
def action_invoice_cancel(self, cr, uid, ids, context=None):
""" Writes repair order state to 'Exception in invoice'
@return: True
"""
self.write(cr, uid, ids, {'state': 'invoice_except'})
return True
def action_repair_start(self, cr, uid, ids, context=None):
""" Writes repair order state to 'Under Repair'
@return: True
@@ -480,22 +474,6 @@ class mrp_repair(osv.osv):
repair.write({'state': 'under_repair'})
return True
def action_invoice_end(self, cr, uid, ids, context=None):
""" Writes repair order state to 'Ready' if invoice method is Before repair.
@return: True
"""
repair_line = self.pool.get('mrp.repair.line')
for order in self.browse(cr, uid, ids, context=context):
val = {}
if (order.invoice_method == 'b4repair'):
val['state'] = 'ready'
repair_line.write(cr, uid, [l.id for
l in order.operations], {'state': 'confirmed'}, context=context)
else:
pass
self.write(cr, uid, [order.id], val, context=context)
return True
def action_repair_end(self, cr, uid, ids, context=None):
""" Writes repair order state to 'To be invoiced' if invoice method is
After repair else state is set to 'Ready'.
@@ -0,0 +1,100 @@
-
In order to test repair orders I have created stock move line record.
-
!record {model: stock.move, id: stock_move_pcbasicpc0}:
company_id: base.main_company
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_14
location_id: stock.stock_location_stock
name: '[PC1] Basic PC'
product_id: product.product_product_pc1
product_qty: 1.0
product_uom: product.product_uom_unit
product_uos_qty: 1.0
-
I start by creating new Repair order for "Basic PC" product and Invoice Method is "No Invoice".
-
!record {model: mrp.repair, id: mrp_repair_rma2}:
address_id: base.res_partner_address_1
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
invoice_method: 'none'
partner_invoice_id: base.res_partner_address_1
location_dest_id: stock.stock_location_14
location_id: stock.stock_location_14
move_id: 'stock_move_pcbasicpc0'
name: RMA000055
operations:
- location_dest_id: stock.location_production
location_id: stock.stock_location_stock
name: '[HDD1] HDD Seagate 7200.8 80GB'
price_unit: 50.0
product_id: product.product_product_hdd1
product_uom: product.product_uom_unit
product_uom_qty: 1.0
state: draft
to_invoice: 1
type: add
fees_lines:
- name: 'HDD1 Seagate repair fees'
product_id: product.product_product_hdd1
product_uom_qty: 1.0
product_uom: product.product_uom_unit
price_unit: 50.0
partner_id: base.res_partner_9
product_id: product.product_product_pc1
-
I confirm this Repair order.
-
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma2}
-
I Cancel this Repair order.
-
!python {model: mrp.repair.cancel}: |
context = {"lang": 'en_US', "active_model":"mrp.repair", "active_ids": [ref("mrp_repair_rma2")], "tz": False, "active_id":ref('mrp_repair_rma2')}
self.fields_view_get(cr, uid, False, "form", context)
self.cancel_repair(cr, uid, [ref("mrp_repair_rma2")], context=context)
-
I check that Repair order is in "Cancel" state.
-
!assert {model: mrp.repair, id: mrp_repair_rma2}:
- state == 'cancel'
-
I Reopen the repair order as new.
-
!python {model: mrp.repair}: |
self.action_cancel_draft(cr, uid, [ref('mrp_repair_rma2')])
-
I change the Invoice method of the repair order to Before repair.
-
!python {model: mrp.repair}: |
self.write(cr, uid, [ref('mrp_repair_rma2')], {'invoice_method': 'b4repair'})
-
I confirm the Repair order again.
-
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma2}
-
Repair order state to 'Ready'.
-
!python {model: mrp.repair}: |
self.action_repair_ready(cr, uid, [ref('mrp_repair_rma2')], context=None)
-
I click on "Create Invoice" button of this wizard to make invoice.
-
!workflow {model: mrp.repair, action: action_invoice_create, ref: mrp_repair_rma2}
-
I check that Invoice is created for this repair order.
-
!python {model: mrp.repair}: |
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma2')], context=context)[0]
assert repair_id.invoice_id.id, _("No invoice exists for this repair order.")
-
I start the repairing process by click on "Start Repair" Button.
-
!workflow {model: mrp.repair, action: action_repair_start, ref: mrp_repair_rma2}
-
Repairing Process for product is Done and I End Repair process by click on "End Repair" button For Invoice Type b4repair.
-
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rma2}
+50 -23
View File
@@ -1,14 +1,13 @@
- |
-
In order to test "mrp_repair" module, I start with creating repair order, confirm it, and start repair.
- |
-
Given that I have already stock move line created.
-
!record {model: stock.move, id: stock_move_pcbasicpc0}:
company_id: base.main_company
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_stock
location_dest_id: stock.stock_location_14
location_id: stock.stock_location_stock
name: '[PC1] Basic PC'
product_id: product.product_product_pc1
@@ -16,8 +15,8 @@
product_uom: product.product_uom_unit
product_uos_qty: 1.0
- |
I start by creating new Repair order for "Basic Pc" product.
-
I start by creating new Repair order for "Basic PC" product.
-
!record {model: mrp.repair, id: mrp_repair_rma0}:
address_id: base.res_partner_address_1
@@ -39,53 +38,81 @@
state: draft
to_invoice: 1
type: add
fees_lines:
- name: 'HDD1 Seagate repair fees'
product_id: product.product_product_hdd1
product_uom_qty: 1.0
product_uom: product.product_uom_unit
price_unit: 50.0
partner_id: base.res_partner_9
product_id: product.product_product_pc1
- |
-
On change of product sets some values
-
!python {model: mrp.repair}: |
self.onchange_product_id(cr, uid, [ref('mrp_repair_rma0')], product_id=False)
-
On change of move id sets values of guarantee limit, source location, destination location, partner and partner address.
-
!python {model: mrp.repair}: |
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
self.onchange_move_id(cr, uid, [ref('mrp_repair_rma0')], False, repair_id.move_id)
-
On change of operation type it sets source location, destination location and to invoice field
-
!python {model: mrp.repair.line}: |
self.onchange_operation_type(cr, uid, [ref('mrp_repair_rma0')], type, False)
-
On change of partner sets the values of partner address, partner invoice address and pricelist.
-
!python {model: mrp.repair}: |
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
self.onchange_partner_id(cr, uid, [ref('mrp_repair_rma0')], False, repair_id.address_id)
-
On change of production lot sets the values of source location, destination location, move and guarantee limit
-
!python {model: mrp.repair}: |
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
self.onchange_lot_id(cr, uid, [ref('mrp_repair_rma0')], False, repair_id.product_id)
-
I check that Repair order is in "Draft" state.
-
!assert {model: mrp.repair, id: mrp_repair_rma0}:
- state == 'draft'
- |
-
I confirm This Repair order.
-
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma0}
- |
I start the repairing process by click on "Start Repair" Button.
-
I start the repairing process by click on "Start Repair" Button For Invoice Type After repair.
-
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rma0}
- |
-
I check that state is "Under Repair".
-
!assert {model: mrp.repair, id: mrp_repair_rma0}:
- state == 'under_repair'
- |
-
Repairing Process for product is Done and I End Repair process by click on "End Repair" button.
-
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rma0}
- |
-
I select invoiced after repair option in this "RMA00004" Repair order.
so I create Invoice by click on "Make Invoice" wizard.
-
!record {model: mrp.repair.make_invoice, id: mrp_repair_make_invoice_0}:
group: 1
- |
-
I click on "Create Invoice" button of this wizard to make invoice.
-
!python {model: mrp.repair.make_invoice}: |
self.make_invoices(cr, uid, [ref("mrp_repair_make_invoice_0")], {"active_ids": [ref("mrp_repair.mrp_repair_rma0")]})
- |
-
I check that Invoice is created for this repair order.
-
!python {model: mrp.repair}: |
obj_lines = self.pool.get('account.invoice.line')
inv_obj = self.pool.get('account.invoice')
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
invoice_ids = inv_obj.search(cr, uid, [('partner_id', '=', repair_id.partner_id.id)])
invoice_id = inv_obj.browse(cr, uid, invoice_ids)[0]
assert repair_id.partner_id.id == invoice_id.partner_id.id, "No invoice existing for the same partner"
assert repair_id.invoice_id.id, _("No invoice exists for this repair order")
+1 -1
View File
@@ -61,7 +61,7 @@ Print product labels with barcode.
'partner_view.xml',
'process/product_process.xml'
],
'test':['test/product_report.yml'],
'test':['test/product_report.yml','test/product_test.yml'],
'installable': True,
'active': False,
'certificate': '0068861431437',
+16 -24
View File
@@ -160,30 +160,22 @@ class product_pricelist(osv.osv):
product_uom_obj = self.pool.get('product.uom')
supplierinfo_obj = self.pool.get('product.supplierinfo')
price_type_obj = self.pool.get('product.price.type')
product_pricelist_version_obj = self.pool.get('product.pricelist.version')
# product.pricelist.version:
if pricelist_ids:
pricelist_version_ids = pricelist_ids
else:
# all pricelists:
pricelist_version_ids = self.pool.get('product.pricelist').search(cr, uid, [], context=context)
if not pricelist_ids:
pricelist_ids = self.pool.get('product.pricelist').search(cr, uid, [], context=context)
pricelist_version_ids = list(set(pricelist_version_ids))
plversions_search_args = [
('pricelist_id', 'in', pricelist_version_ids),
'|',
('date_start', '=', False),
('date_start', '<=', date),
'|',
('date_end', '=', False),
('date_end', '>=', date),
]
plversion_ids = product_pricelist_version_obj.search(cr, uid, plversions_search_args)
if len(pricelist_version_ids) != len(plversion_ids):
msg = "At least one pricelist has no active version !\nPlease create or activate one."
raise osv.except_osv(_('Warning !'), _(msg))
pricelist_version_ids = self.pool.get('product.pricelist.version').search(cr, uid, [
('pricelist_id', 'in', pricelist_ids),
'|',
('date_start', '=', False),
('date_start', '<=', date),
'|',
('date_end', '=', False),
('date_end', '>=', date),
])
if len(pricelist_ids) != len(pricelist_version_ids):
raise osv.except_osv(_('Warning !'), _("At least one pricelist has no active version !\nPlease create or activate one."))
# product.product:
product_ids = [i[0] for i in products_by_qty_by_partner]
@@ -198,7 +190,7 @@ class product_pricelist(osv.osv):
results = {}
for product_id, qty, partner in products_by_qty_by_partner:
for pricelist_id in pricelist_version_ids:
for pricelist_id in pricelist_ids:
price = False
tmpl_id = products_dict[product_id].product_tmpl_id and products_dict[product_id].product_tmpl_id.id or False
@@ -221,7 +213,7 @@ class product_pricelist(osv.osv):
'AND (min_quantity IS NULL OR min_quantity <= %s) '
'AND i.price_version_id = v.id AND v.pricelist_id = pl.id '
'ORDER BY sequence',
(tmpl_id, product_id, plversion_ids[0], qty))
(tmpl_id, product_id, pricelist_version_ids[0], qty))
res1 = cr.dictfetchall()
uom_price_already_computed = False
for res in res1:
@@ -289,7 +281,7 @@ class product_pricelist(osv.osv):
if 'uom' in context and not uom_price_already_computed:
product = products_dict[product_id]
uom = product.uos_id or product.uom_id
price = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, price, context['uom'])
price = product_uom_obj._compute_price(cr, uid, uom.id, price, context['uom'])
if results.get(product_id):
results[product_id][pricelist_id] = price
+36
View File
@@ -0,0 +1,36 @@
-
In order to test product,I start by creating a 20KG UOM for 'Sugar'
-
!record {model: product.uom, id: product_20k_uom_sugar}:
name: 20KG
uom_type: bigger
category_id: product.product_uom_categ_kgm
rounding: 0.010
factor_inv: 20
-
I create a 10KG UOM for 'Sugar'
-
!record {model: product.uom, id: product_10k_uom_sugar}:
name: 10KG
uom_type: bigger
category_id: product.product_uom_categ_kgm
rounding: 0.010
factor_inv: 10
-
I create a new product 'Sugar' in 20KG UOM.
-
!record {model: product.product, id: product_sugar_id1}:
categ_id: 'product.product_category_rawmaterial0'
cost_method: standard
name: Sugar 20KG
procure_method: make_to_order
standard_price: 400.0
uom_id: product.product_20k_uom_sugar
uom_po_id: product.product_20k_uom_sugar
-
I test onchanged on UOM, Create Duplicate Product and Delete original Product.
-
!python {model: product.product}: |
self.onchange_uom(cr ,uid, [ref("product_sugar_id1")], ref("product.product_20k_uom_sugar"), ref("product.product_10k_uom_sugar"))
self.copy(cr, uid, ref("product_sugar_id1"))
self.unlink(cr, uid, [ref("product_sugar_id1")])
+2 -1
View File
@@ -66,7 +66,8 @@ Dashboard for purchase management that includes:
'purchase_unit_test.xml',
'test/procurement_buy.yml',
'test/purchase_report.yml',
],
'test/purchase_order_cancel_draft.yml'
],
'demo': ['purchase_demo.xml'],
'installable': True,
'active': False,
@@ -51,6 +51,13 @@
I confirm the purchase order for iPod.
-
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_po0}
-
I changed Expected Date to Next Day.
-
!python {model: purchase.order}: |
import datetime
next_day = (datetime.date.today()+datetime.timedelta(days=1))
self.write(cr, uid, [ref("purchase_order_po0")], {'minimum_planned_date': next_day})
-
I check that the order which was initially in the draft state has transit to confirm state.
-
@@ -0,0 +1,114 @@
-
In order to test to Cancel purchase order from Approved State,I start by creating a new product 'Pen Drive1'
-
!record {model: product.product, id: product_product_pendrive1}:
categ_id: 'product.product_category_3'
cost_method: standard
mes_type: fixed
name: Pen Drive
price_margin: 1.0
procure_method: make_to_order
property_stock_inventory: stock.location_inventory
property_stock_procurement: stock.location_procurement
property_stock_production: stock.location_production
standard_price: 500.0
supply_method: buy
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I create first purchase order for Pen Drive1 where "invoice_method" is From Order.
-
!record {model: purchase.order, id: purchase_order_pendrive1}:
company_id: base.main_company
date_order: !eval time.strftime('%Y-%m-%d')
invoice_method: order
location_id: stock.stock_location_stock
order_line:
- date_planned: !eval time.strftime('%Y-%m-%d')
name: Pen Drive
price_unit: 500.0
product_id: 'product_product_pendrive1'
product_qty: 10.0
product_uom: product.product_uom_unit
partner_address_id: base.res_partner_address_7
partner_id: base.res_partner_4
pricelist_id: purchase.list0
-
Initially purchase order is in the draft state.
-
!assert {model: purchase.order, id: purchase_order_pendrive1}:
- state == 'draft'
-
I confirm the purchase order for Pen Drive1.
-
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_pendrive1}
-
I check that the order which was initially in the draft state has transmit to confirm state.
-
!assert {model: purchase.order, id: purchase_order_pendrive1}:
- state == 'approved'
-
I have to first cancel Picking of Approved Purchase order .
-
!python {model: stock.picking}: |
search_ids=self.search(cr, uid, [('purchase_id', '=', ref("purchase_order_pendrive1"))])
self.action_cancel(cr, uid, search_ids)
-
Now I have to cancel confirm purchase order for Pen Drive1.
-
!python {model: purchase.order}: |
self.action_cancel(cr, uid, [ref("purchase_order_pendrive1")])
-
I check that the order which was in approved state has transmit to cancel state.
-
!assert {model: purchase.order, id: purchase_order_pendrive1}:
- state == 'cancel'
-
Now again set purchase order for Pen Drive1 to draft state.
-
!python {model: purchase.order}: |
self.action_cancel_draft(cr, uid, [ref("purchase_order_pendrive1")])
-
I check that the First purchase order is in draft state.
-
!assert {model: purchase.order, id: purchase_order_pendrive1}:
- state == 'draft'
-
I test for Copy and Delete Perchase order in Draft state.
-
!python {model: purchase.order}: |
copy_id = self.copy(cr, uid, ref("purchase_order_pendrive1"))
self.unlink(cr, uid, [copy_id])
-
I create Second purchase order for Pen Drive1 where "invoice_method" is From Order.
-
!record {model: purchase.order, id: purchase_order_pendrive2}:
company_id: base.main_company
date_order: !eval time.strftime('%Y-%m-%d')
invoice_method: order
location_id: stock.stock_location_stock
order_line:
- date_planned: !eval time.strftime('%Y-%m-%d')
name: Pen Drive
price_unit: 500.0
product_id: 'product_product_pendrive1'
product_qty: 10.0
product_uom: product.product_uom_unit
partner_address_id: base.res_partner_address_7
partner_id: base.res_partner_4
pricelist_id: purchase.list0
-
Initially Second purchase order is in the draft state.
-
!assert {model: purchase.order, id: purchase_order_pendrive2}:
- state == 'draft'
-
I have merged first and second purchase order which are in draft state, belong to the same supplier,have same stock location, same pricelist.
-
!python {model: purchase.order.group}: |
ids = [ref("purchase_order_pendrive1"),ref("purchase_order_pendrive2")]
self.fields_view_get(cr, uid, context={'active_ids': ids})
self.merge_orders(cr, uid, [1], context={'active_ids': ids})
@@ -40,6 +40,7 @@ that exceeds minimum amount set by configuration wizard.
'purchase_double_validation_workflow.xml',
'purchase_double_validation_installer.xml'
],
'test': ['test/purchase_double_validation_test.yml'],
'demo_xml': [],
'installable': True,
'active': False,
@@ -0,0 +1,117 @@
-
I Create new limit amount from Configure Limit Amount for Purchase wizard.
-
!record {model: purchase.double.validation.installer, id: purchase_double_validation_installer_1}:
limit_amount: 3000
-
Then I set the Limit Amount
-
!python {model: purchase.double.validation.installer}: |
self.execute(cr, uid, [ref("purchase_double_validation_installer_1")])
-
In order to test the purchase double validation flow,I start by creating a new product 'MOB1'
-
!record {model: product.product, id: product_product_mob1}:
categ_id: 'product.product_category_3'
cost_method: standard
mes_type: fixed
name: MOB1
price_margin: 2.0
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: 2000.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
-
In order to test the purchase double validation flow,I create a new record where "invoice_method" is From Order.
-
Test for purchase double validation in which Total > = Limit Amount.
-
I create purchase order for MOB1 for 3 quantity.
-
!record {model: purchase.order, id: purchase_order_po11}:
company_id: base.main_company
date_order: '2011-01-1'
invoice_method: order
location_id: stock.stock_location_stock
order_line:
- date_planned: '2011-01-11'
name: MOB1
price_unit: 2000.0
product_id: 'product_product_mob1'
product_qty: 3.0
product_uom: product.product_uom_unit
state: draft
partner_address_id: base.res_partner_address_7
partner_id: base.res_partner_4
pricelist_id: purchase.list0
-
Initially purchase order is in the draft state.
-
!assert {model: purchase.order, id: purchase_order_po11}:
- state == 'draft'
-
I confirm the purchase order for MOB1.
-
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_po11}
-
I check that the order which was initially in the draft state has transmit to confirm state for double validation.
-
!assert {model: purchase.order, id: purchase_order_po11}:
- state == 'confirmed'
-
I Approved purchase order by Supplier for MOB1.
-
!workflow {model: purchase.order, action: purchase_approve, ref: purchase_order_po11}
-
I check that the order which was initially in the confirmed state has transmit to approved state.
-
!assert {model: purchase.order, id: purchase_order_po11}:
- state == 'approved'
-
Test for purchase double validation in which Total < Limit Amount.
-
I create purchase order for MOB1 for 1 quantity.
-
!record {model: purchase.order, id: purchase_order_po12}:
company_id: base.main_company
date_order: '2011-01-02'
invoice_method: order
location_id: stock.stock_location_stock
order_line:
- date_planned: '2011-01-12'
name: MOB1
price_unit: 2000.0
product_id: 'product_product_mob1'
product_qty: 1.0
product_uom: product.product_uom_unit
state: draft
partner_address_id: base.res_partner_address_7
partner_id: base.res_partner_4
pricelist_id: purchase.list0
-
Initially purchase order is in the draft state.
-
!assert {model: purchase.order, id: purchase_order_po12}:
- state == 'draft'
-
I confirm the purchase order for MOB1.
-
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_po12}
-
I check that the order which was initially in the draft state has transmit to approved state.
-
!assert {model: purchase.order, id: purchase_order_po12}:
- state == 'approved'
+3 -1
View File
@@ -43,7 +43,9 @@ This new object will regroup and will allow you to easily keep track and order a
"security/ir.model.access.csv","purchase_requisition_sequence.xml"
],
"active": False,
"test":['test/purchase_requisition_report.yml'],
"test":['test/purchase_requisition_report.yml',
'test/purchase_requisition_test.yml',
],
"installable": True,
"certificate" : "001023264099823179629",
}
@@ -0,0 +1,166 @@
-
In order to test the purchase requisition flow,I start by creating a new product 'MOB1'
-
!record {model: product.product, id: product_product_mob1}:
name: MOB1
categ_id: product.product_category_3
cost_method: standard
mes_type: fixed
price_margin: 2.0
procure_method: make_to_stock
property_stock_inventory: stock.location_inventory
property_stock_procurement: stock.location_procurement
property_stock_production: stock.location_production
standard_price: 2000.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 purchase requisition for MOB1 for 1 quantity.
-
!record {model: purchase.requisition, id: purchase_requisition_te0}:
company_id: base.main_company
exclusive: multiple
line_ids:
- company_id: base.main_company
product_id: product_product_mob1
product_qty: 10.0
product_uom_id: product.product_uom_unit
name: TE00009
-
Initially purchase requisition is in draft state.
-
!assert {model: purchase.requisition, id: purchase_requisition_te0}:
- state == 'draft'
-
Copy purchase requisition which is in draft state than confirm and Done it.
-
!python {model: purchase.requisition}: |
copy_id = self.copy(cr, uid, ref("purchase_requisition_te0"))
self.tender_cancel(cr, uid, [copy_id], context=None)
self.tender_reset(cr, uid, [copy_id], context=None)
self.tender_in_progress(cr, uid, [copy_id], context=None)
self.tender_done(cr, uid, [copy_id], context=None)
-
I confirm the purchase requisition for MOB1.
-
!python {model: purchase.requisition}: |
self.tender_in_progress(cr, uid, [ref("purchase_requisition_te0")])
-
I check that the purchase requisition which was initially in the draft state has transmit to In Progress after confirm it.
-
!assert {model: purchase.requisition, id: purchase_requisition_te0}:
- state == 'in_progress'
-
In order to create a purchase order for 'Axelor', i click on the wizard 'Request a Quotation' and create record for wizard.
-
!record {model: purchase.requisition.partner, id: purchase_requisition_partner_0}:
partner_address_id: base.res_partner_address_3000
partner_id: base.res_partner_desertic_hispafuentes
-
I click on 'Create Quotation' for creating PO.
-
!python {model: purchase.requisition.partner}: |
self.create_order(cr, uid, [ref("purchase_requisition_partner_0")], {"active_model": "purchase.requisition",
"active_ids": [ref("purchase_requisition_te0")],"active_id": ref("purchase_requisition_te0"), })
-
I confirm the purchase order of Axelor.
-
!python {model: purchase.order}: |
purchase_id= self.search(cr, uid, [('requisition_id','=',ref("purchase_requisition_te0"))])
import netsvc
wf_service = netsvc.LocalService("workflow")
if purchase_id:
wf_service.trg_validate(uid, 'purchase.order',purchase_id[0],'purchase_confirm', cr)
wf_service.trg_validate(uid, 'purchase.order',purchase_id[0],'purchase_approve', cr)
-
I check that Quotation of Axelor is Approved.
-
!python {model: purchase.order}: |
purchase_id= self.search(cr, uid, [('requisition_id','=',ref("purchase_requisition_te0"))])[0]
state=self.browse(cr,uid,purchase_id).state
assert (state=='approved')
-
I click on Done button
-
!python {model: purchase.requisition}: |
self.tender_done(cr, uid, [ref("purchase_requisition_te0")],)
-
I check that after click on Done button state is in done.
-
!assert {model: purchase.requisition, id: purchase_requisition_te0}:
- state == 'done'
-
In order to test the purchase requisition flow for Requisition Type is exclusive
-
I create purchase requisition for Requisition Type is exclusive
-
!record {model: purchase.requisition, id: purchase_requisition_ex1}:
company_id: base.main_company
exclusive: exclusive
line_ids:
- company_id: base.main_company
product_id: product_product_mob1
product_qty: 10.0
product_uom_id: product.product_uom_unit
name: TE000010
-
I Create a First Purchase Order for the supplier 'Distrib PC'.
-
!record {model: purchase.requisition.partner, id: purchase_requisition_partner_1}:
partner_address_id: base.res_partner_address_7
partner_id: base.res_partner_4
-
I create Quotations For supplier 'Distrib PC'.
-
!python {model: purchase.requisition.partner}: |
self.create_order(cr, uid, [ref("purchase_requisition_partner_1")], {"active_model": "purchase.requisition",
"active_ids": [ref("purchase_requisition_ex1")],"active_id": ref("purchase_requisition_ex1"), })
-
I Create a Second Purchase Order for the supplier ASUStek.
-
!record {model: purchase.requisition.partner, id: purchase_requisition_partner_2}:
partner_address_id: base.res_partner_address_tang
partner_id: base.res_partner_asus
-
I create Quotations For supplier 'ASUStek'.
-
!python {model: purchase.requisition.partner}: |
self.create_order(cr, uid, [ref("purchase_requisition_partner_2")], {"active_model": "purchase.requisition",
"active_ids": [ref("purchase_requisition_ex1")],"active_id": ref("purchase_requisition_ex1"), })
-
I check that Initially purchase requisition is draft state.
-
!assert {model: purchase.requisition, id: purchase_requisition_ex1}:
- state == 'draft'
-
I confirm the Second purchase order of ASUStek, than check that Quotation is Approved.
-
!python {model: purchase.order}: |
purchase_id= self.search(cr, uid, [('partner_id','=',ref("base.res_partner_asus")),('requisition_id','=',ref("purchase_requisition_ex1"))])
import netsvc
wf_service = netsvc.LocalService("workflow")
if purchase_id:
wf_service.trg_validate(uid, 'purchase.order',purchase_id[0],'purchase_confirm', cr)
wf_service.trg_validate(uid, 'purchase.order',purchase_id[0],'purchase_approve', cr)
state=self.browse(cr,uid,purchase_id[0]).state
assert (state=='approved')
-
I check that Quotation of Distrib PC is cancelled.
-
!python {model: purchase.order}: |
partner_id=self.pool.get('res.partner').search(cr,uid,[('name','=','Distrib PC')])[0]
purchase_id= self.search(cr, uid, [('partner_id','=',partner_id),('requisition_id','=',ref("purchase_requisition_ex1"))])[0]
state=self.browse(cr,uid,purchase_id).state
assert (state=='cancel')
-
I check that Purchase Requisition is Done.
-
!assert {model: purchase.requisition, id: purchase_requisition_ex1}:
- state == 'done'
@@ -65,15 +65,22 @@ class sale_advance_payment_inv(osv.osv_memory):
that is defined as 'Automatic Invoice after delivery'."))
val = obj_lines.product_id_change(cr, uid, [], sale_adv_obj.product_id.id,
uom = False, partner_id = sale.partner_id.id, fposition_id = sale.fiscal_position.id)
res = val['value']
if not res.get('account_id'):
raise osv.except_osv(_('Configuration Error !'),
_('There is no income account defined ' \
'for this product: "%s" (id:%d)') % \
(sale_adv_obj.product_id.name, sale_adv_obj.product_id.id,))
line_id = obj_lines.create(cr, uid, {
'name': val['value']['name'],
'account_id': val['value']['account_id'],
'name': res.get('name'),
'account_id': res['account_id'],
'price_unit': sale_adv_obj.amount,
'quantity': sale_adv_obj.qtty,
'discount': False,
'uos_id': val['value']['uos_id'],
'uos_id': res.get('uos_id'),
'product_id': sale_adv_obj.product_id.id,
'invoice_line_tax_id': [(6, 0, val['value']['invoice_line_tax_id'])],
'invoice_line_tax_id': [(6, 0, res.get('invoice_line_tax_id'))],
'account_analytic_id': sale.project_id.id or False,
#'note':'',
})
@@ -109,15 +116,15 @@ class sale_advance_payment_inv(osv.osv_memory):
if sale.order_policy == 'picking':
self.pool.get('sale.order.line').create(cr, uid, {
'order_id': sale.id,
'name': val['value']['name'],
'name': res.get('name'),
'price_unit': -sale_adv_obj.amount,
'product_uom_qty': sale_adv_obj.qtty,
'product_uos_qty': sale_adv_obj.qtty,
'product_uos': val['value']['uos_id'],
'product_uom': val['value']['uos_id'],
'product_uos': res.get('uos_id'),
'product_uom': res.get('uos_id'),
'product_id': sale_adv_obj.product_id.id,
'discount': False,
'tax_id': [(6, 0, val['value']['invoice_line_tax_id'])],
'tax_id': [(6, 0, res.get('invoice_line_tax_id'))],
}, context)
context.update({'invoice_id':list_inv})
+2 -2
View File
@@ -2091,7 +2091,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2149,7 +2149,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2122,7 +2122,7 @@ msgid "Future Qty"
msgstr "Бъдещо количесто"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2180,7 +2180,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2091,7 +2091,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2149,7 +2149,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2271,7 +2271,7 @@ msgid "Future Qty"
msgstr "Qtat futura"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Compte variació d'estoc"
@@ -2329,7 +2329,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Ubicació on el sistema emmagatzemarà els productes finalitzats."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2122,7 +2122,7 @@ msgid "Future Qty"
msgstr "Budoucí množ."
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Účet výměny zásob"
@@ -2180,7 +2180,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Umístění, kde systém naskladní hotové výrobky."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2092,7 +2092,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2150,7 +2150,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2258,7 +2258,7 @@ msgid "Future Qty"
msgstr "Zukünftige Menge"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Bestandsveränderungskonto"
@@ -2316,7 +2316,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Lagerort, wo das System die Fertigprodukte lagert."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2109,7 +2109,7 @@ msgid "Future Qty"
msgstr "Μελοντική Ποσ."
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2167,7 +2167,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Τοποθεσία όπου το σύστημα θα αποθηκεύσει τα ολοκληρωμένα προϊόντα."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2281,7 +2281,7 @@ msgid "Future Qty"
msgstr "Ctdad futura"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Cuenta variación stock"
@@ -2339,7 +2339,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Ubicación donde el sistema almacenará los productos finalizados."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2095,7 +2095,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2153,7 +2153,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2277,7 +2277,7 @@ msgid "Future Qty"
msgstr "Ctdad futura"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Cuenta variación stock"
@@ -2335,7 +2335,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Ubicación donde el sistema almacenará los productos finalizados."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2249,7 +2249,7 @@ msgid "Future Qty"
msgstr "Ctdad. Futura"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Cuenta de Variación de inventario"
@@ -2307,7 +2307,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Ubocación donde el sistema colocará los productos finales."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2087,7 +2087,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2145,7 +2145,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2170,7 +2170,7 @@ msgid "Future Qty"
msgstr "Tuleva määrä"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Varastomuutoksen tili"
@@ -2228,7 +2228,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Paikka jonne järjestelmä varastoi valmiit tuotteet."
#. module: stock
#: help:product.category,property_stock_variation:0
#: elp:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2294,7 +2294,7 @@ msgid "Future Qty"
msgstr "Qté à venir"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "COmpte des variation de stock"
@@ -2352,7 +2352,7 @@ msgid "Location where the system will stock the finished products."
msgstr "L'emplacement ou le système stockera les produits finis"
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2092,7 +2092,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2150,7 +2150,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2094,7 +2094,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2152,7 +2152,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2164,7 +2164,7 @@ msgid "Future Qty"
msgstr "Jövőbeni mennyiség"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Készlet főkönyvi számla"
@@ -2222,7 +2222,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2162,7 +2162,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2220,7 +2220,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Lokasi dimana sistem akan menyimpan produk jadi"
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2177,7 +2177,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2235,7 +2235,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Ubicazione dove il sistema stoccherà i prodotti finiti"
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2092,7 +2092,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2150,7 +2150,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2095,7 +2095,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2153,7 +2153,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2092,7 +2092,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2150,7 +2150,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2106,7 +2106,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2164,7 +2164,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2095,7 +2095,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2153,7 +2153,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2094,7 +2094,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2152,7 +2152,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2091,7 +2091,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2149,7 +2149,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2247,7 +2247,7 @@ msgid "Future Qty"
msgstr "Ilość planowana"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Konto wyceny zapasów"
@@ -2305,7 +2305,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Strefa, w której system umieści gotowe produkty."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2096,7 +2096,7 @@ msgid "Future Qty"
msgstr "Quantidade Futura"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2154,7 +2154,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2237,7 +2237,7 @@ msgid "Future Qty"
msgstr "Qtde Futura"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Conta para Variação de Estoque"
@@ -2295,7 +2295,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Local onde o sistema estocará os produtos acabados"
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2115,7 +2115,7 @@ msgid "Future Qty"
msgstr "Cant. viitoare"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Cont variații de stoc"
@@ -2173,7 +2173,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Locația în care sistemul va stoca produsele finite."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2216,7 +2216,7 @@ msgid "Future Qty"
msgstr "Будущее Кол-во"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Счет изменения стоимости ТМЦ"
@@ -2274,7 +2274,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Место хранения, где система будет хранить готовую продукцию."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2091,7 +2091,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2149,7 +2149,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2092,7 +2092,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2150,7 +2150,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2107,7 +2107,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2165,7 +2165,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2107,7 +2107,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2165,7 +2165,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+3 -3
View File
@@ -1978,8 +1978,8 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
msgid "Stock Variation Account"
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Valuation Account"
msgstr ""
#. module: stock
@@ -2036,7 +2036,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid "When real-time inventory valuation is enabled on a product, this account will hold the current value of the products."
msgstr ""
+2 -2
View File
@@ -2093,7 +2093,7 @@ msgid "Future Qty"
msgstr "Future Qty"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2151,7 +2151,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2092,7 +2092,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2150,7 +2150,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2091,7 +2091,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2149,7 +2149,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2253,7 +2253,7 @@ msgid "Future Qty"
msgstr "Gelecek Miktar"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "Stok Varyasyon Hesabı"
@@ -2311,7 +2311,7 @@ msgid "Location where the system will stock the finished products."
msgstr "Sistemin tamamlanan ürünleri stoklayacağı lokasyon."
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2095,7 +2095,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2153,7 +2153,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2095,7 +2095,7 @@ msgid "Future Qty"
msgstr "Future Qty"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2153,7 +2153,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+2 -2
View File
@@ -2140,7 +2140,7 @@ msgid "Future Qty"
msgstr "未来数量"
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr "库存变动科目"
@@ -2198,7 +2198,7 @@ msgid "Location where the system will stock the finished products."
msgstr "系统存储成品的库位"
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
+34 -18
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:16+0000\n"
"PO-Revision-Date: 2011-01-28 03:06+0000\n"
"PO-Revision-Date: 2011-09-27 10:25+0000\n"
"Last-Translator: Walter Cheuk <wwycheuk@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-09-05 04:57+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2011-09-28 05:19+0000\n"
"X-Generator: Launchpad (build 14049)\n"
#. module: stock
#: field:product.product,track_outgoing:0
@@ -163,7 +163,7 @@ msgstr ""
#: view:report.stock.move:0
#: field:stock.change.standard.price,stock_journal:0
msgid "Stock journal"
msgstr ""
msgstr "庫存日誌"
#. module: stock
#: view:report.stock.move:0
@@ -475,7 +475,7 @@ msgstr "調動統計"
#. module: stock
#: view:stock.production.lot:0
msgid "Product Lots Filter"
msgstr ""
msgstr "生產批次篩選"
#. module: stock
#: report:lot.stock.overview:0
@@ -636,7 +636,7 @@ msgstr ""
#. module: stock
#: constraint:stock.move:0
msgid "You try to assign a lot which is not from the same product"
msgstr ""
msgstr "指定了不同產品的批次"
#. module: stock
#: view:res.partner:0
@@ -1152,7 +1152,7 @@ msgstr ""
#: code:addons/stock/stock.py:1319
#, python-format
msgid "is in draft state."
msgstr "尚在草案階段"
msgstr "尚在草案階段。"
#. module: stock
#: model:ir.actions.act_window,help:stock.action_tracking_form
@@ -1402,6 +1402,12 @@ msgid ""
"* Done: has been processed, can't be modified or cancelled anymore\n"
"* Cancelled: has been cancelled, can't be confirmed anymore"
msgstr ""
"* 草案(Draft): 未確認,不會安排處理直至確認\n"
"* 確認(Confirmed): 仍等候產品有貨供應\n"
"* 供貨(Available): 已預留產品,只等候確認\n"
"* 等待(Waiting): 自動供貨前要再等候下一步 (如於「接單生產(Make-To-Order)」流程)\n"
"* 完成(Done): 已處理,無法再修改或取消\n"
"* 取消(Cancelled): 已取消,無法再確認"
#. module: stock
#: help:stock.location,company_id:0
@@ -1440,6 +1446,11 @@ msgid ""
" When the picking is done the state is 'Done'. \n"
"The state is 'Waiting' if the move is waiting for another one."
msgstr ""
"建立調動時先處於「草案(Draft)」狀態。\n"
" 然後,如安排者找不到貨,設為「無貨(Not Available)」狀態。\n"
" 當已預留貨物,變成「供貨(Available)」。\n"
" 完成提貨後狀態為「完成(Done)」。 \n"
"如調動正等候其他工作完成,狀態為「等待(Waiting)」。"
#. module: stock
#: selection:report.stock.inventory,location_type:0
@@ -1486,7 +1497,7 @@ msgstr "貨幣"
#. module: stock
#: field:product.product,track_production:0
msgid "Track Manufacturing Lots"
msgstr ""
msgstr "追蹤生產批次"
#. module: stock
#: code:addons/stock/wizard/stock_inventory_merge.py:44
@@ -1537,7 +1548,7 @@ msgstr "貨架 2"
#. module: stock
#: field:stock.report.tracklots,tracking_id:0
msgid "Tracking lot"
msgstr ""
msgstr "追蹤批次"
#. module: stock
#: view:stock.picking:0
@@ -1558,7 +1569,7 @@ msgstr "本地化"
#. module: stock
#: model:ir.model,name:stock.model_stock_report_tracklots
msgid "Stock report by tracking lots"
msgstr ""
msgstr "按追蹤批次庫存報告"
#. module: stock
#: code:addons/stock/product.py:370
@@ -2091,7 +2102,7 @@ msgid "Future Qty"
msgstr ""
#. module: stock
#: field:product.category,property_stock_variation:0
#: field:product.category,property_stock_valuation_account_id:0
msgid "Stock Variation Account"
msgstr ""
@@ -2119,7 +2130,7 @@ msgstr ""
#: code:addons/stock/stock.py:2210
#, python-format
msgid "You can only delete draft moves."
msgstr "不能刪除調動草案"
msgstr "只能刪除調動草案。"
#. module: stock
#: code:addons/stock/wizard/stock_partial_picking.py:97
@@ -2149,7 +2160,7 @@ msgid "Location where the system will stock the finished products."
msgstr ""
#. module: stock
#: help:product.category,property_stock_variation:0
#: help:product.category,property_stock_valuation_account_id:0
msgid ""
"When real-time inventory valuation is enabled on a product, this account "
"will hold the current value of the products."
@@ -2542,7 +2553,7 @@ msgstr "數量(量度單位)"
#, python-format
msgid ""
"You are moving %.2f %s products but only %.2f %s available in this lot."
msgstr ""
msgstr "您正移動%.2f件 %s 產品,但此批次只有%.2f件 %s。"
#. module: stock
#: view:stock.move:0
@@ -3032,7 +3043,7 @@ msgstr ""
#. module: stock
#: view:stock.inventory:0
msgid "Lot Inventory"
msgstr ""
msgstr "批次存貨"
#. module: stock
#: view:stock.move:0
@@ -3501,6 +3512,11 @@ msgid ""
" When the picking it done the state is 'Done'. \n"
"The state is 'Waiting' if the move is waiting for another one."
msgstr ""
"建立調動時先處於「草案(Draft)」狀態。\n"
" 然後設為「確認(Confirmed)」狀態。\n"
" 如庫存有貨,變成「供貨(Available)」。\n"
" 完成提貨後狀態為「完成(Done)」。 \n"
"如調動正等候其他工作完成,狀態為「等待(Waiting)」。"
#. module: stock
#: view:board.board:0
@@ -3720,7 +3736,7 @@ msgstr ""
#. module: stock
#: constraint:stock.move:0
msgid "You must assign a production lot for this product"
msgstr "須為此產品分配生產批次"
msgstr "須為此產品指定生產批次"
#. module: stock
#: view:stock.move:0
@@ -3817,7 +3833,7 @@ msgstr ""
#. module: stock
#: model:ir.model,name:stock.model_stock_report_prodlots
msgid "Stock report by production lots"
msgstr "生產批次回報之庫存"
msgstr "按生產批次庫存報告"
#. module: stock
#: view:stock.location:0
@@ -3878,7 +3894,7 @@ msgstr "輸出"
#. module: stock
#: selection:stock.move.split.lines,action:0
msgid "Keep in one lot"
msgstr ""
msgstr "保持為同一批次"
#. module: stock
#: view:product.product:0
+9 -10
View File
@@ -44,13 +44,12 @@ class product_product(osv.osv):
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
account_variation = product_obj.categ_id.property_stock_variation and product_obj.categ_id.property_stock_variation.id or False
account_valuation = product_obj.categ_id.property_stock_valuation_account_id and product_obj.categ_id.property_stock_valuation_account_id.id or False
return {
'stock_account_input': stock_input_acc,
'stock_account_output': stock_output_acc,
'stock_journal': journal_id,
'property_stock_variation': account_variation
'property_stock_valuation_account_id': account_valuation
}
def do_change_standard_price(self, cr, uid, ids, datas, context=None):
@@ -71,9 +70,9 @@ class product_product(osv.osv):
stock_input_acc = datas.get('stock_input_account', False)
journal_id = datas.get('stock_journal', False)
product_obj=self.browse(cr, uid, ids, context=context)[0]
account_variation = product_obj.categ_id.property_stock_variation
account_variation_id = account_variation and account_variation.id or False
if not account_variation_id: raise osv.except_osv(_('Error!'), _('Variation Account is not specified for Product Category: %s') % (product_obj.categ_id.name))
account_valuation = product_obj.categ_id.property_stock_valuation_account_id
account_valuation_id = account_valuation and account_valuation.id or False
if not account_valuation_id: raise osv.except_osv(_('Error!'), _('Valuation Account is not specified for Product Category: %s') % (product_obj.categ_id.name))
move_ids = []
loc_ids = location_obj.search(cr, uid,[('usage','=','internal')])
for rec_id in ids:
@@ -132,7 +131,7 @@ class product_product(osv.osv):
})
move_line_obj.create(cr, uid, {
'name': product.categ_id.name,
'account_id': account_variation_id,
'account_id': account_valuation_id,
'credit': amount_diff,
'move_id': move_id
})
@@ -158,7 +157,7 @@ class product_product(osv.osv):
})
move_line_obj.create(cr, uid, {
'name': product.categ_id.name,
'account_id': account_variation_id,
'account_id': account_valuation_id,
'debit': amount_diff,
'move_id': move_id
})
@@ -449,10 +448,10 @@ class product_category(osv.osv):
type='many2one', relation='account.account',
string='Stock Output Account', view_load=True,
help='When doing real-time inventory valuation, counterpart Journal Items for all outgoing stock moves will be posted in this account. This is the default value for all products in this category, it can also directly be set on each product.'),
'property_stock_variation': fields.property('account.account',
'property_stock_valuation_account_id': fields.property('account.account',
type='many2one',
relation='account.account',
string="Stock Variation Account",
string="Stock Valuation Account",
view_load=True,
help="When real-time inventory valuation is enabled on a product, this account will hold the current value of the products.",),
}
+1 -1
View File
@@ -27,7 +27,7 @@
<separator string="Accounting Stock Properties" colspan="2"/>
<field name="property_stock_account_input_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="property_stock_account_output_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="property_stock_variation"/>
<field name="property_stock_valuation_account_id"/>
<field name="property_stock_journal"/>
</group>
</form>
+12 -12
View File
@@ -2033,14 +2033,14 @@ class stock_move(osv.osv):
else:
acc_dest = accounts['stock_account_output']
acc_variation = accounts.get('property_stock_variation', False)
acc_valuation = accounts.get('property_stock_valuation_account_id', False)
journal_id = accounts['stock_journal']
if acc_dest == acc_variation:
raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Output Account defined on this product and Variant account on category of this product are same.'))
if acc_dest == acc_valuation:
raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Output Account defined on this product and Valuation account on category of this product are same.'))
if acc_src == acc_variation:
raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Input Account defined on this product and Variant account on category of this product are same.'))
if acc_src == acc_valuation:
raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Input Account defined on this product and Valuation account on category of this product are same.'))
if not acc_src:
raise osv.except_osv(_('Error!'), _('There is no stock input account defined for this product or its category: "%s" (id: %d)') % \
@@ -2051,10 +2051,10 @@ class stock_move(osv.osv):
if not journal_id:
raise osv.except_osv(_('Error!'), _('There is no journal defined on the product category: "%s" (id: %d)') % \
(move.product_id.categ_id.name, move.product_id.categ_id.id,))
if not acc_variation:
raise osv.except_osv(_('Error!'), _('There is no inventory variation account defined on the product category: "%s" (id: %d)') % \
if not acc_valuation:
raise osv.except_osv(_('Error!'), _('There is no inventory Valuation account defined on the product category: "%s" (id: %d)') % \
(move.product_id.categ_id.name, move.product_id.categ_id.id,))
return journal_id, acc_src, acc_dest, acc_variation
return journal_id, acc_src, acc_dest, acc_valuation
def _get_reference_accounting_values_for_valuation(self, cr, uid, move, context=None):
"""
@@ -2104,17 +2104,17 @@ class stock_move(osv.osv):
if move.location_id.company_id \
and (move.location_id.usage == 'internal' and move.location_dest_id.usage != 'internal'\
or move.location_id.company_id != move.location_dest_id.company_id):
journal_id, acc_src, acc_dest, acc_variation = self._get_accounting_data_for_valuation(cr, uid, move, src_company_ctx)
journal_id, acc_src, acc_dest, acc_valuation = self._get_accounting_data_for_valuation(cr, uid, move, src_company_ctx)
reference_amount, reference_currency_id = self._get_reference_accounting_values_for_valuation(cr, uid, move, src_company_ctx)
account_moves += [(journal_id, self._create_account_move_line(cr, uid, move, acc_variation, acc_dest, reference_amount, reference_currency_id, context))]
account_moves += [(journal_id, self._create_account_move_line(cr, uid, move, acc_valuation, acc_dest, reference_amount, reference_currency_id, context))]
# Incoming moves (or cross-company input part)
if move.location_dest_id.company_id \
and (move.location_id.usage != 'internal' and move.location_dest_id.usage == 'internal'\
or move.location_id.company_id != move.location_dest_id.company_id):
journal_id, acc_src, acc_dest, acc_variation = self._get_accounting_data_for_valuation(cr, uid, move, dest_company_ctx)
journal_id, acc_src, acc_dest, acc_valuation = self._get_accounting_data_for_valuation(cr, uid, move, dest_company_ctx)
reference_amount, reference_currency_id = self._get_reference_accounting_values_for_valuation(cr, uid, move, src_company_ctx)
account_moves += [(journal_id, self._create_account_move_line(cr, uid, move, acc_src, acc_variation, reference_amount, reference_currency_id, context))]
account_moves += [(journal_id, self._create_account_move_line(cr, uid, move, acc_src, acc_valuation, reference_amount, reference_currency_id, context))]
move_obj = self.pool.get('account.move')
for j_id, move_lines in account_moves:
+3 -3
View File
@@ -260,9 +260,9 @@
<field name="lot_input_id" ref="stock_location_shop1"/>
</record>
<record forcecreate="True" id="property_stock_variation" model="ir.property">
<field name="name">property_stock_variation</field>
<field name="fields_id" search="[('model','=','product.category'),('name','=','property_stock_variation')]"/>
<record forcecreate="True" id="property_stock_valuation_account_id" model="ir.property">
<field name="name">property_stock_valuation_account_id</field>
<field name="fields_id" search="[('model','=','product.category'),('name','=','property_stock_valuation_account_id')]"/>
<field eval="'account.account,'+str(ref('account.a_recv'))" model="account.account" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
+7 -2
View File
@@ -70,6 +70,7 @@ class stock_fill_inventory(osv.osv_memory):
product_obj = self.pool.get('product.product')
stock_location_obj = self.pool.get('stock.location')
move_obj = self.pool.get('stock.move')
uom_obj = self.pool.get('product.uom')
if ids and len(ids):
ids = ids[0]
else:
@@ -91,12 +92,16 @@ class stock_fill_inventory(osv.osv_memory):
for location in location_ids:
datas = {}
res[location] = {}
move_ids = move_obj.search(cr, uid, [('location_dest_id','=',location),('state','=','done')], context=context)
move_ids = move_obj.search(cr, uid, ['|',('location_dest_id','=',location),('location_id','=',location),('state','=','done')], context=context)
for move in move_obj.browse(cr, uid, move_ids, context=context):
lot_id = move.prodlot_id.id
prod_id = move.product_id.id
qty = move.product_qty
if move.location_dest_id.id == location:
qty = uom_obj._compute_qty(cr, uid, move.product_uom.id,move.product_qty, move.product_id.uom_id.id)
else:
qty = -uom_obj._compute_qty(cr, uid, move.product_uom.id,move.product_qty, move.product_id.uom_id.id)
if datas.get((prod_id, lot_id)):
qty += datas[(prod_id, lot_id)]['product_qty']