@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:19+0000\n"
|
||||
"Last-Translator: Dragan Životić <dragan_zivotic@yahoo.com>\n"
|
||||
"PO-Revision-Date: 2010-08-04 13:59+0000\n"
|
||||
"Last-Translator: Данило Шеган <Unknown>\n"
|
||||
"Language-Team: Serbian <sr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -942,6 +942,9 @@ class account_invoice(osv.osv):
|
||||
number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
|
||||
else:
|
||||
number = self.pool.get('ir.sequence').get(cr, uid, 'account.invoice.' + invtype)
|
||||
|
||||
if not number:
|
||||
raise osv.except_osv(_('Warning !'), _('There is no active invoice sequence defined for the journal !'))
|
||||
|
||||
if invtype in ('in_invoice', 'in_refund'):
|
||||
ref = reference
|
||||
|
||||
@@ -220,16 +220,11 @@
|
||||
<field name="obj_num" string="Ref" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="ach_uid"/>
|
||||
<field name="ach_login"/>
|
||||
<field name="obj_price" sum="Total Adj."/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="obj_comm"/>
|
||||
<field name="bord_vnd_id"/>
|
||||
<field name="lot_num"/>
|
||||
<field name="lot_est1"/>
|
||||
<field name="lot_est2"/>
|
||||
<field name="lot_type" select="1"/>
|
||||
<field name="auction_id"/>
|
||||
<field name="state" select="1"/>
|
||||
<button name="button_bought" string="Sold" states="draft" type="object" icon="gtk-jump-to"/>
|
||||
<button name="button_not_bought" string="Not sold" states="draft" type="object" icon="gtk-undo"/>
|
||||
<button name="button_taken_away" string="Taken away" states="sold" type="object" icon="gtk-goto-last"/>
|
||||
@@ -278,6 +273,8 @@
|
||||
<field name="lot_est1"/>
|
||||
<field name="lot_est2"/>
|
||||
<field name="obj_price"/>
|
||||
<field name="seller_price"/>
|
||||
<field name="buyer_price"/>
|
||||
<field name="obj_comm"/>
|
||||
</group>
|
||||
<group colspan="2" col="1">
|
||||
@@ -290,14 +287,26 @@
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<separator string="Seller Information" colspan="4"/>
|
||||
<field name="seller_id"/>
|
||||
<field name="seller_price"/>
|
||||
<newline/>
|
||||
<field name="vnd_lim"/>
|
||||
<field name="vnd_lim_net"/>
|
||||
<field name="sel_inv_id"/>
|
||||
<field name="paid_vnd"/>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Buyer Information" colspan="4"/>
|
||||
<field name="ach_uid"/>
|
||||
<field name="is_ok"/>
|
||||
<field name="ach_login" />
|
||||
<field name="paid_ach"/>
|
||||
<field name="ach_inv_id"/>
|
||||
<field name="ach_emp"/>
|
||||
</group>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Seller Information" colspan="4"/>
|
||||
<field name="seller_id"/>
|
||||
<newline/>
|
||||
<field name="vnd_lim"/>
|
||||
<field name="vnd_lim_net"/>
|
||||
<field name="sel_inv_id"/>
|
||||
<field name="paid_vnd"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<separator string="" colspan="4"/>
|
||||
<field name="state" colspan="1"/>
|
||||
<group col="8" colspan="2">
|
||||
@@ -309,38 +318,6 @@
|
||||
</group>
|
||||
</page>
|
||||
<page string="Bids">
|
||||
<separator string="Finalists Bid" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="ach_uid"/>
|
||||
<field name="ach_login" select="1" />
|
||||
<newline/>
|
||||
<field name="buyer_price"/>
|
||||
<field name="ach_inv_id"/>
|
||||
<newline/>
|
||||
<field name="is_ok"/>
|
||||
<field name="paid_ach"/>
|
||||
<field name="ach_emp"/>
|
||||
</group>
|
||||
<field name="statement_id" domain="[('state','=','draft')]" colspan="4" nolabel="1"
|
||||
widget="one2many_list">
|
||||
<tree string="Buyer's Payment History">
|
||||
<field name="statement_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="date"/>
|
||||
</tree>
|
||||
<form string="Buyer's Payment History">
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
<field name="date"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="account_id"/>
|
||||
<field name="type"/>
|
||||
<field name="statement_id"/>
|
||||
<field name="reconcile_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="reconcile_amount"/>
|
||||
</form>
|
||||
</field>
|
||||
<field name="bid_lines" colspan="4" nolabel="1" editable="top">
|
||||
<tree string="Bids Details" editable="top">
|
||||
<field name="bid_id"/>
|
||||
@@ -355,19 +332,44 @@
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="History">
|
||||
<field name="history_ids" colspan="4" readonly="1" nolabel="1">
|
||||
<tree string="History">
|
||||
<field name="name"/>
|
||||
<field name="lot_id"/>
|
||||
<field name="auction_id"/>
|
||||
<field name="price"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Note">
|
||||
<field name="obj_desc" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="History" groups="base.group_extended">
|
||||
<group colspan="2" col="2">
|
||||
<field name="statement_id" domain="[('state','=','draft')]" colspan="4" nolabel="1"
|
||||
widget="one2many_list">
|
||||
<tree string="Buyer's Payment History">
|
||||
<field name="statement_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="date"/>
|
||||
</tree>
|
||||
<form string="Buyer's Payment History">
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
<field name="date"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="account_id"/>
|
||||
<field name="type"/>
|
||||
<field name="statement_id"/>
|
||||
<field name="reconcile_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="reconcile_amount"/>
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<field name="history_ids" colspan="4" readonly="1" nolabel="1">
|
||||
<tree string="History">
|
||||
<field name="name"/>
|
||||
<field name="lot_id"/>
|
||||
<field name="auction_id"/>
|
||||
<field name="price"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -45,9 +45,9 @@ class res_partner_contact(osv.osv):
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Last Name', size=30, required=True),
|
||||
'first_name': fields.char('First Name', size=30),
|
||||
'mobile': fields.char('Mobile', size=30),
|
||||
'name': fields.char('Last Name', size=64, required=True),
|
||||
'first_name': fields.char('First Name', size=64),
|
||||
'mobile': fields.char('Mobile', size=64),
|
||||
'title': fields.many2one('res.partner.title','Title'),
|
||||
'website': fields.char('Website', size=120),
|
||||
'lang_id': fields.many2one('res.lang', 'Language'),
|
||||
@@ -203,7 +203,7 @@ class res_partner_job(osv.osv):
|
||||
'address_id': fields.many2one('res.partner.address', 'Address', \
|
||||
help='Address which is linked to the Partner'), # TO Correct: domain=[('partner_id', '=', name)]
|
||||
'contact_id': fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'),
|
||||
'function': fields.char('Partner Function', size=34, help="Function of this contact with this partner"),
|
||||
'function': fields.char('Partner Function', size=64, help="Function of this contact with this partner"),
|
||||
'sequence_contact': fields.integer('Contact Seq.',help='Order of\
|
||||
importance of this address in the list of addresses of the linked contact'),
|
||||
'sequence_partner': fields.integer('Partner Seq.',help='Order of importance\
|
||||
|
||||
@@ -23,18 +23,17 @@
|
||||
<attribute name="string">Install Generic Modules</attribute>
|
||||
</separator>
|
||||
<group colspan="8">
|
||||
<field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="misc_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
<field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
<field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/> <field name="misc_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
<separator string="Install Specific Business Modules" colspan="4"/>
|
||||
<field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
|
||||
<field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
<field name="auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction)"/>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
|
||||
@@ -86,10 +86,6 @@ class base_setup_installer(osv.osv_memory):
|
||||
help="Installs a preselected set of OpenERP "
|
||||
"applications selected to help you manage your auctions "
|
||||
"as well as the business processes around them."),
|
||||
'profile_bookstore':fields.boolean('Book Stores',
|
||||
help="Installs a preselected set of OpenERP "
|
||||
"applications which will help you manage your book store "
|
||||
"or your library."),
|
||||
}
|
||||
_defaults = {
|
||||
'crm': True,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
# 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
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import netsvc
|
||||
from osv import fields,osv
|
||||
from tools.translate import _
|
||||
|
||||
|
||||
@@ -19,10 +19,8 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import netsvc
|
||||
from osv import fields,osv
|
||||
from tools.translate import _
|
||||
import tools
|
||||
|
||||
import decimal_precision as dp
|
||||
|
||||
|
||||
@@ -325,6 +325,17 @@ class payroll_advice(osv.osv):
|
||||
_name = 'hr.payroll.advice'
|
||||
_description = 'Bank Advice Note'
|
||||
|
||||
def _get_bank(self, cr, uid, ids, field_name, args, context=None):
|
||||
res = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
for rec in self.browse(cr, uid, ids, context=context):
|
||||
if rec.company_id and rec.company_id.partner_id.bank_ids:
|
||||
res[rec.id] = rec.company_id.partner_id.bank_ids[0].bank.name
|
||||
else:
|
||||
res[rec.id] = ''
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'register_id':fields.many2one('hr.payroll.register', 'Payroll Register', required=False),
|
||||
'name':fields.char('Name', size=2048, required=True, readonly=False),
|
||||
@@ -340,6 +351,7 @@ class payroll_advice(osv.osv):
|
||||
'chaque_nos':fields.char('Chaque Nos', size=256, required=False, readonly=False),
|
||||
'account_id': fields.many2one('account.account', 'Account', required=True),
|
||||
'company_id':fields.many2one('res.company', 'Company', required=False),
|
||||
'bank': fields.function(_get_bank, method=True, string='Bank', type="char"),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -368,6 +380,18 @@ class payroll_advice(osv.osv):
|
||||
self.write(cr, uid, ids, {'state':'cancel'}, context=context)
|
||||
return True
|
||||
|
||||
def onchange_company_id(self, cr, uid, ids, company_id, context=None):
|
||||
res = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
if company_id:
|
||||
company = self.pool.get('res.company').browse(cr, uid, company_id, context=context)
|
||||
res.update({'bank': company.partner_id.bank_ids[0].bank.name})
|
||||
return {
|
||||
'value':res
|
||||
}
|
||||
|
||||
|
||||
payroll_advice()
|
||||
|
||||
class payroll_advice_line(osv.osv):
|
||||
|
||||
@@ -606,7 +606,7 @@
|
||||
<filter icon="terp-check" string="Deduction" domain="[('type','=','deduction')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="type"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="4" groups="base.group_extended">
|
||||
@@ -692,11 +692,11 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_hr_company_contribution_filter" model="ir.ui.view">
|
||||
<record id="view_hr_company_contribution_filter" model="ir.ui.view">
|
||||
<field name="name">company.contribution.select</field>
|
||||
<field name="model">company.contribution</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Company Contribution">
|
||||
<group col="8" colspan="4">
|
||||
<filter icon="terp-document-new" string="Fixed Amount" domain="[('amount_type','=','fix')]" help="Draft Slip"/>
|
||||
@@ -720,7 +720,7 @@
|
||||
<field name="res_model">company.contribution</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="hr_company_contribution_tree"/>
|
||||
<field name="search_view_id" ref="view_hr_company_contribution_filter"/>
|
||||
<field name="search_view_id" ref="view_hr_company_contribution_filter"/>
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_hr_company_contribution_tree"
|
||||
@@ -814,10 +814,13 @@
|
||||
<field name="flag"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="company_id"/>
|
||||
<field name="chaque_nos"/>
|
||||
</page>
|
||||
<page string="Letter Content">
|
||||
<group colspan="4" col="6">
|
||||
<field name="company_id" on_change="onchange_company_id(company_id)"/>
|
||||
<field name="chaque_nos"/>
|
||||
<field name="bank"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Letter Details"/>
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<frame id="first" x1="57.0" y1="57.0" width="480" height="728"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -104,7 +104,7 @@
|
||||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="72.0,295.0,47.0,68.0" style="Table3">
|
||||
<blockTable colWidths="72.0,294.0,46.0,68.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P6">Expanse To</para>
|
||||
@@ -130,7 +130,7 @@
|
||||
<para style="P6">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">[[o.date]]</para>
|
||||
<para style="P12">[[formatLang(time.strftime('%Y-%m-%d'), date = True)]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -177,22 +177,22 @@
|
||||
<para style="P8">[[ l.employee_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[l.basic]]</para>
|
||||
<para style="P10">[[formatLang(l.basic)]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[l.other_pay]]</para>
|
||||
<para style="P10">[[formatLang(l.other_pay)]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[l.allounce]]</para>
|
||||
<para style="P10">[[formatLang(l.allounce)]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[l.grows]]</para>
|
||||
<para style="P10">[[formatLang(l.grows)]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[l.deduction]]</para>
|
||||
<para style="P10">[[formatLang(l.deduction)]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[l.net]]</para>
|
||||
<para style="P10">[[formatLang(l.net)]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -230,7 +230,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<blockTable colWidths="241.0,241.0" style="Table5">
|
||||
<blockTable colWidths="240.0,240.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P6">For [[company.name]],</para>
|
||||
|
||||
@@ -72,15 +72,9 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table18">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -95,15 +89,9 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table10">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -240,18 +228,18 @@
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
||||
<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="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.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="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="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -272,11 +260,11 @@
|
||||
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
|
||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Table" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_space" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
|
||||
<blockTable colWidths="539.0" style="Table2">
|
||||
@@ -296,7 +284,7 @@
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="43.0,101.0,67.0,328.0" style="Table15">
|
||||
<blockTable colWidths="42.0,207.0,93.0,197.0" style="Table15">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Code</para>
|
||||
@@ -312,7 +300,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="43.0,496.0" style="Table16">
|
||||
<blockTable colWidths="42.0,497.0" style="Table16">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Address </para>
|
||||
@@ -322,7 +310,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="43.0,168.0,65.0,263.0" style="Table1">
|
||||
<blockTable colWidths="42.0,207.0,93.0,197.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Email</para>
|
||||
@@ -338,7 +326,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="43.0,102.0,66.0,169.0,68.0,91.0" style="Table17">
|
||||
<blockTable colWidths="42.0,207.0,93.0,197.0" style="Table17">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Slip ID</para>
|
||||
@@ -346,12 +334,6 @@
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.number or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Bill No</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.move_id and o.move_id.name or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">PAN No</para>
|
||||
</td>
|
||||
@@ -360,7 +342,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="43.0,102.0,66.0,169.0,68.0,91.0" style="Table18">
|
||||
<blockTable colWidths="42.0,207.0,93.0,197.0" style="Table18">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Register</para>
|
||||
@@ -368,17 +350,11 @@
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.register_id and o.register_id.name or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Payment</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.payment_id and o.payment_id.name or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Designation </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.employee_id.contract_ids and o.employee_id.contract_ids[0].function.name or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.employee_id.contract_ids and o.employee_id.contract_ids[0].job_id.name or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -515,7 +491,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"><font>[[repeatIn(get_earnings(o.line_ids),'a') ]]</font><font>[[ a.code or removeParentNode('tr') ]]</font></para>
|
||||
<para style="terp_default_9">[[repeatIn(get_earnings(o.line_ids),'a') ]] [[ a.code or removeParentNode('tr') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(a.total) ]]</para>
|
||||
@@ -669,3 +645,4 @@
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
|
||||
@@ -64,14 +64,14 @@
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<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="Caption" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.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"/>
|
||||
@@ -81,8 +81,8 @@
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" 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_tblheader_Details" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.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="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -97,10 +97,10 @@
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_space" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="1.0"/>
|
||||
<paraStyle name="Drawing" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Header" fontName="Times-Roman"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
|
||||
<paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Times-Roman"/>
|
||||
<paraStyle name="Header" fontName="Helvetica"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13"/>
|
||||
<paraStyle name="Addressee" fontName="Helvetica" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
@@ -109,15 +109,15 @@
|
||||
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
|
||||
<para style="terp_tblheader_Details_Centre">Payment Advice</para>
|
||||
@@ -132,7 +132,9 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.date,date=True) ]]</para>
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -147,7 +149,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Axis Bank</para>
|
||||
<para style="terp_default_Bold_9">[[o.bank or 'Bank']]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
@@ -172,7 +174,7 @@
|
||||
<blockTable colWidths="539.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><u>[[ o.name ]] for period [[ get_month(o.date)['mname'] ]]</u></para>
|
||||
<para style="terp_tblheader_General_Centre">[[ o.name ]] for period [[ get_month(o.date)['mname'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -335,3 +337,4 @@
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
|
||||
@@ -234,16 +234,16 @@ class mailgate_tool(osv.osv_memory):
|
||||
msg_pool = self.pool.get('mailgate.message')
|
||||
for res_id in res_ids:
|
||||
msg_data = {
|
||||
'name': msg.get('subject', 'No subject'),
|
||||
'date': msg.get('date') ,
|
||||
'description': msg.get('body', msg.get('from')),
|
||||
'name': msg.get('subject', 'No subject'),
|
||||
'date': msg.get('date'),
|
||||
'description': msg.get('body', msg.get('from')),
|
||||
'history': True,
|
||||
'res_model': model,
|
||||
'email_cc': msg.get('cc'),
|
||||
'email_from': msg.get('from'),
|
||||
'res_model': model,
|
||||
'email_cc': msg.get('cc'),
|
||||
'email_from': msg.get('from'),
|
||||
'email_to': msg.get('to'),
|
||||
'message_id': msg.get('message-id'),
|
||||
'references': msg.get('references'),
|
||||
'message_id': msg.get('message-id'),
|
||||
'references': msg.get('references') or msg.get('in-reply-to'),
|
||||
'res_id': res_id,
|
||||
'user_id': uid,
|
||||
'attachment_ids': [(6, 0, attach)]
|
||||
@@ -380,6 +380,9 @@ class mailgate_tool(osv.osv_memory):
|
||||
if 'References' in fields:
|
||||
msg['references'] = msg_txt.get('References')
|
||||
|
||||
if 'In-Reply-To' in fields:
|
||||
msg['in-reply-to'] = msg_txt.get('In-Reply-To')
|
||||
|
||||
if 'X-Priority' in fields:
|
||||
msg['priority'] = msg_txt.get('X-Priority', '3 (Normal)').split(' ')[0]
|
||||
|
||||
@@ -425,12 +428,12 @@ class mailgate_tool(osv.osv_memory):
|
||||
res_ids = []
|
||||
attachment_ids = []
|
||||
new_res_id = False
|
||||
if msg.get('references'):
|
||||
references = msg.get('references')
|
||||
if msg.get('references') or msg.get('in-reply-to'):
|
||||
references = msg.get('references') or msg.get('in-reply-to')
|
||||
if '\r\n' in references:
|
||||
references = msg.get('references').split('\r\n')
|
||||
references = references.split('\r\n')
|
||||
else:
|
||||
references = msg.get('references').split(' ')
|
||||
references = references.split(' ')
|
||||
for ref in references:
|
||||
ref = ref.strip()
|
||||
res_id = tools.misc.reference_re.search(ref)
|
||||
@@ -464,7 +467,7 @@ class mailgate_tool(osv.osv_memory):
|
||||
email_from = msg.get('from'),
|
||||
email_cc = msg.get('cc'),
|
||||
message_id = msg.get('message-id'),
|
||||
references = msg.get('references', False),
|
||||
references = msg.get('references', False) or msg.get('in-reply-to', False),
|
||||
attach = attachments.items(),
|
||||
context = context)
|
||||
else:
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-03 08:26+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-04 08:05+0000\n"
|
||||
"Last-Translator: vrsb <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: mrp
|
||||
@@ -157,8 +157,8 @@ msgid ""
|
||||
"Number of operation this workcenter can do in parallel. If this workcenter "
|
||||
"represent a team of 5 workers, the capacity per cycle is 5."
|
||||
msgstr ""
|
||||
"Количество одновременно выполняемых рабочим центром операций. Если рабочиё "
|
||||
"центр представлен пятью рабочими, этот показатель равен 5"
|
||||
"Количество одновременно выполняемых участком обработки операций. Если "
|
||||
"участок обработки представлен пятью рабочими, этот показатель равен 5"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_button:product.product.procurement,init,create:0
|
||||
@@ -181,7 +181,7 @@ msgstr "Кол-во продукции"
|
||||
#. module: mrp
|
||||
#: field:mrp.production,move_lines:0
|
||||
msgid "Products Consummed"
|
||||
msgstr ""
|
||||
msgstr "Израсходовано"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.workcenter,costs_cycle_account_id:0
|
||||
@@ -653,7 +653,7 @@ msgstr ""
|
||||
#. module: mrp
|
||||
#: rml:mrp.production.order:0
|
||||
msgid "WorkCenter"
|
||||
msgstr ""
|
||||
msgstr "Участок обработки"
|
||||
|
||||
#. module: mrp
|
||||
#: field:stock.warehouse.orderpoint,product_min_qty:0
|
||||
@@ -813,7 +813,7 @@ msgstr ""
|
||||
#. module: mrp
|
||||
#: field:mrp.workcenter,name:0
|
||||
msgid "Workcenter Name"
|
||||
msgstr ""
|
||||
msgstr "Участок обработки"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.production:0
|
||||
@@ -847,7 +847,7 @@ msgstr ""
|
||||
#: model:ir.ui.menu,name:mrp.menu_mrp_workcenter_action
|
||||
#: field:mrp.routing,workcenter_lines:0
|
||||
msgid "Workcenters"
|
||||
msgstr ""
|
||||
msgstr "Участки обработки"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.procurement:0
|
||||
|
||||
@@ -23,15 +23,15 @@
|
||||
"version" : "1.0",
|
||||
"author" : "OpenERP SA",
|
||||
"website" : "http://www.openerp.com/",
|
||||
"depends" : ["base"],
|
||||
"depends" : ["base", "mail_gateway"],
|
||||
"category" : "Generic Modules/Outlook interface",
|
||||
"description": '''
|
||||
This module provide the Outlook plug-in.
|
||||
|
||||
Outlook plug-in allows you to select an object that you’d like to add
|
||||
to your email and its attachments from MS Outlook. You can select a partner, a task,
|
||||
a project, an analytical account, or any other object and attach selected
|
||||
mail as .eml file in attachment of selected record.
|
||||
a project, an analytical account, or any other object and Archived selected
|
||||
mail in mailgate.messages with attachments.
|
||||
|
||||
''',
|
||||
"init_xml" : [],
|
||||
|
||||
@@ -711,7 +711,7 @@ def SearchObjectsForText(btnProcessor,*args):
|
||||
|
||||
search_txt = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0])
|
||||
if not search_txt:
|
||||
win32ui.MessageBox("Enter text to search for", "", flag_info)
|
||||
win32ui.MessageBox("Enter text to search for", "Archive to OpenERP", flag_info)
|
||||
return
|
||||
# Get titles from list
|
||||
obj_titles=[]
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
File diff suppressed because one or more lines are too long
@@ -33,8 +33,7 @@ STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME
|
||||
CAPTION "OpenERP Configuarion"
|
||||
FONT 8, "Tahoma", 1000, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Done",ID_DONE,400,239,50,14//,WS_VISIBLE //| WS_TABSTOP
|
||||
PUSHBUTTON "Cancel",IDCANCEL,340,239,50,14//, WS_VISIBLE //| WS_TABSTOP
|
||||
DEFPUSHBUTTON "Cancel",ID_DONE,400,239,50,14//,WS_VISIBLE //| WS_TABSTOP
|
||||
CONTROL "",IDC_TAB,"SysTabControl32",0x0,8,7,440,228
|
||||
CONTROL "",IDC_LIST,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL |
|
||||
LVS_SHOWSELALWAYS | LVS_REPORT | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES,0,0,0,0
|
||||
@@ -57,7 +56,7 @@ BEGIN
|
||||
EDITTEXT ID_USERNAME,85,70,154,12,ES_AUTOHSCROLL | WS_VISIBLE | WS_TABSTOP
|
||||
LTEXT "Password : ",IDC_STATIC,30,90,100,17
|
||||
EDITTEXT ID_PASSWORD,85,90,154,12,ES_AUTOHSCROLL | WS_VISIBLE | WS_TABSTOP | ES_PASSWORD
|
||||
PUSHBUTTON "Test Connection",ID_BUT_TESTCONNECTION,179,110,60,13, WS_VISIBLE | WS_TABSTOP
|
||||
PUSHBUTTON "Connect",ID_BUT_TESTCONNECTION,179,110,60,13, WS_VISIBLE | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_OBJECT_SETTINGS DIALOGEX 0, 0, 430, 210
|
||||
@@ -92,25 +91,21 @@ BEGIN
|
||||
LTEXT "",IDC_ABOUT,80,90,250,100
|
||||
END
|
||||
|
||||
IDD_SERVER_PORT_DIALOG DIALOGEX 0, 0, 160, 90
|
||||
IDD_SERVER_PORT_DIALOG DIALOGEX 0, 0, 160, 55
|
||||
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_CONTEXTHELP
|
||||
CAPTION "Server and Port"
|
||||
CAPTION "OpenERP Connection"
|
||||
FONT 8, "Tahoma", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Server : ",IDC_STATIC,5,3,150,17
|
||||
EDITTEXT ID_SERVER,40,3,94,12,ES_AUTOHSCROLL | WS_TABSTOP
|
||||
EDITTEXT ID_SERVER,40,3,100,12,ES_AUTOHSCROLL | WS_TABSTOP
|
||||
LTEXT "Port : ",IDC_STATIC,5,18,100,17
|
||||
EDITTEXT ID_PORT,40,18,94,12,ES_AUTOHSCROLL | WS_TABSTOP
|
||||
GROUPBOX " Protocol ", IDC_STATIC_GROUP, 5, 35, 150, 30
|
||||
PUSHBUTTON "XML-RPC",IDR_XML_PROTOCOL,8,45,50,14,BS_AUTORADIOBUTTON | BST_CHECKED |WS_TABSTOP
|
||||
PUSHBUTTON "XML-RPCS",IDR_XMLS_PROTOCOL,55,45,50,14,BS_AUTORADIOBUTTON | WS_TABSTOP
|
||||
PUSHBUTTON "NET-RPC",IDR_NETRPC_PROTOCOL,105,45,45,14,BS_AUTORADIOBUTTON | WS_TABSTOP
|
||||
PUSHBUTTON "Close",IDCANCEL,60,70,45,14,WS_TABSTOP
|
||||
DEFPUSHBUTTON "OK",IDOK,110,70,45,14,WS_TABSTOP
|
||||
EDITTEXT ID_PORT,40,18,100,12,ES_AUTOHSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Close",IDCANCEL,110,35,45,14,WS_TABSTOP
|
||||
DEFPUSHBUTTON "OK",IDOK,60,35,45,14,WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_SYNC DIALOGEX 0, 0, 470, 300
|
||||
IDD_SYNC DIALOGEX 0, 0, 470, 320
|
||||
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_CONTEXTHELP
|
||||
CAPTION "Archive to OpenERP"
|
||||
@@ -120,8 +115,9 @@ BEGIN
|
||||
LTEXT "Search for : ",IDC_STATIC,15,17,40,12
|
||||
EDITTEXT ID_SEARCH_TEXT,60,15,120,12,ES_AUTOHSCROLL | WS_TABSTOP// left top width height
|
||||
PUSHBUTTON "Search",ID_SEARCH,187,15,40,14,WS_TABSTOP
|
||||
LTEXT "Documents : ",IDC_STATIC,15,140,100,14
|
||||
CONTROL "List1",IDC_NAME_LIST,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | LVS_SHOWSELALWAYS | LVS_REPORT | WS_TABSTOP, 15,150,234,110
|
||||
PUSHBUTTON "Upload to OpenERP",ID_MAKE_ATTACHMENT,160,270,85,14,WS_TABSTOP
|
||||
PUSHBUTTON "Archive to OpenERP",ID_MAKE_ATTACHMENT,160,270,85,14,WS_TABSTOP
|
||||
|
||||
GROUPBOX " Create a Document ", IDC_STATIC_GROUP, 263,5,202,100,WS_TABSTOP
|
||||
LTEXT "Type of Document : ",IDC_STATIC,266,25,100,12
|
||||
@@ -132,7 +128,7 @@ BEGIN
|
||||
GROUPBOX " Create a Contact ", IDC_STATIC_GROUP, 263, 110,202,185,WS_TABSTOP
|
||||
LTEXT "Create a New Contact : ",IDC_STATIC,280,140,100,12
|
||||
PUSHBUTTON "Create Contact",ID_CREATE_CONTACT,360,138,60,14,WS_TABSTOP
|
||||
PUSHBUTTON "Cancel",IDCANCEL,385,270,60,14,WS_TABSTOP
|
||||
PUSHBUTTON "Close",IDCANCEL,385,300,60,14,WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_NEW_CONTACT_DIALOG DIALOGEX 0, 0, 350, 190
|
||||
|
||||
@@ -37,7 +37,8 @@ def generateEML(mail):
|
||||
|
||||
eml_name= ustr(sub).encode('iso-8859-1')+'-'+str(mail.EntryID)[-9:]
|
||||
ls = ['*', '/', '\\', '<', '>', ':', '?', '"', '|', '\t', '\n']
|
||||
attachments_folder_path = os.path.abspath(os.path.dirname(__file__)+"\\dialogs\\resources\\attachments\\")
|
||||
mails_folder_path = os.path.abspath(os.path.dirname(__file__)+"\\dialogs\\resources\\mails\\")
|
||||
attachments_folder_path = mails_folder_path + "\\attachments\\"
|
||||
if not os.path.exists(attachments_folder_path):
|
||||
os.makedirs(attachments_folder_path)
|
||||
for i in xrange(1, attachments.Count+1):
|
||||
@@ -62,7 +63,7 @@ def generateEML(mail):
|
||||
print mail.lastErrorText()
|
||||
sys.exit()
|
||||
|
||||
mails_folder_path = os.path.abspath(os.path.dirname(__file__)+"\\dialogs\\resources\\mails\\")
|
||||
|
||||
if not os.path.exists(mails_folder_path):
|
||||
os.makedirs(mails_folder_path)
|
||||
for c in ls:
|
||||
|
||||
@@ -26,11 +26,11 @@ import os
|
||||
import pythoncom
|
||||
import time
|
||||
from manager import ustr
|
||||
|
||||
waittime = 10
|
||||
wait_count = 0
|
||||
wait_limit = 12
|
||||
|
||||
import binascii
|
||||
import base64
|
||||
def execute(connector, method, *args):
|
||||
global wait_count
|
||||
res = False
|
||||
@@ -119,7 +119,7 @@ class XMLRpcConn(object):
|
||||
|
||||
def InsertObj(self, obj_title,obj_name,image_path):
|
||||
self._obj_list=list(self._obj_list)
|
||||
self._obj_list.append((obj_title,obj_name,ustr(image_path).encode('iso-8859-1')))
|
||||
self._obj_list.append((obj_title,obj_name,ustr(image_path)))
|
||||
self._obj_list.sort(reverse=True)
|
||||
|
||||
def DeleteObject(self,sel_text):
|
||||
@@ -133,46 +133,53 @@ class XMLRpcConn(object):
|
||||
import win32ui, win32con
|
||||
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object')
|
||||
import eml
|
||||
msg = ""
|
||||
ext_msg = ""
|
||||
new_msg = files = ext_msg =""
|
||||
eml_path=eml.generateEML(mail)
|
||||
att_name = ustr(eml_path.split('\\')[-1])
|
||||
cnt=1
|
||||
flag=False
|
||||
for rec in recs: #[('res.partner', 3, 'Agrolait')]
|
||||
cnt+=1
|
||||
obj = rec[0]
|
||||
obj_id = rec[1]
|
||||
ids=execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.attachment','search',[('res_id','=',obj_id),('name','=',att_name)])
|
||||
object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',obj)])
|
||||
object_name = execute( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',object_ids,['name'])[0]['name']
|
||||
sub = ustr(mail.Subject)
|
||||
if ids:
|
||||
name=execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',obj_id,['name'])['name']
|
||||
ext_msg+=""" - File "{0}.eml" is already archived to {1} "{2}" .
|
||||
""".format(sub,object_name,name)
|
||||
continue
|
||||
if len(sub) > 60:
|
||||
l = 60 - len(sub)
|
||||
sub = sub[0:l]
|
||||
res={}
|
||||
res['res_model'] = obj
|
||||
content = "".join(open(eml_path,"r").readlines()).encode('base64')
|
||||
res['name'] = att_name
|
||||
res['datas_fname'] = sub+".eml"
|
||||
res['datas'] = content
|
||||
res['res_id'] = obj_id
|
||||
execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.attachment','create',res)
|
||||
msg+=""" - File "{0}.eml" archived to {1} "{2}".
|
||||
""".format(sub,object_name,str(rec[2]))
|
||||
flag=True
|
||||
if flag:
|
||||
t = "Mail archived to OpenERP.\nArchive Summary : \n"
|
||||
if ext_msg != "" :
|
||||
t+="\nAlready Attached Documents : \n"+ext_msg +"\n"
|
||||
t+="Newly Attachment Documents:\n"+msg
|
||||
win32ui.MessageBox(t,"Archive To OpenERP",win32con.MB_ICONINFORMATION)
|
||||
attachments=mail.Attachments
|
||||
|
||||
for rec in recs: #[('res.partner', 3, 'Agrolait')]
|
||||
model = rec[0]
|
||||
res_id = rec[1]
|
||||
|
||||
object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',model)])
|
||||
object_name = execute( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',object_ids,['name'])[0]['name']
|
||||
|
||||
|
||||
#Reading the Object ir.model Name
|
||||
|
||||
ext_ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'mailgate.message','search',[('message_id','=',mail.EntryID),('model','=',model),('res_id','=',res_id)])
|
||||
if ext_ids:
|
||||
name = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,model,'read',res_id,['name'])['name']
|
||||
ext_msg += """This mail is already archived to {1} '{2}'.
|
||||
""".format(object_name,name)
|
||||
continue
|
||||
|
||||
msg = {
|
||||
'subject':mail.Subject,
|
||||
'date':str(mail.ReceivedTime),
|
||||
'body':mail.Body,
|
||||
'cc':mail.CC,
|
||||
'from':mail.SenderEmailAddress,
|
||||
'to':mail.To,
|
||||
'message-id':str(mail.EntryID),## we are use Entry_Id as a MessageID Because MessageID is not provided by Outlook API, http://msdn.microsoft.com/en-us/library/bb176688%28v=office.12%29.aspx
|
||||
'references':False,
|
||||
}
|
||||
result = {}
|
||||
if attachments:
|
||||
result = self.MakeAttachment([rec], mail)
|
||||
|
||||
attachment_ids = result.get(model, {}).get(res_id, [])
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'email.server.tools','history',model, res_id, msg, attachment_ids)
|
||||
|
||||
new_msg += """- {0} : {1}\n""".format(object_name,str(rec[2]))
|
||||
flag = True
|
||||
|
||||
if flag:
|
||||
t = ext_msg
|
||||
t += """Mail archived Successfully with attachments.\n"""+new_msg
|
||||
win32ui.MessageBox(t,"Archived to OpenERP",win32con.MB_ICONINFORMATION)
|
||||
return flag
|
||||
|
||||
def IsCRMInstalled(self):
|
||||
@@ -189,7 +196,7 @@ class XMLRpcConn(object):
|
||||
obj_list.append((-999, ustr('')))
|
||||
for id in ids:
|
||||
object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','read',[id],['id','name'])[0]
|
||||
obj_list.append((object['id'], ustr(object['name']).encode('iso-8859-1')))
|
||||
obj_list.append((object['id'], ustr(object['name'])))
|
||||
return obj_list
|
||||
|
||||
def GetObjectItems(self, search_list=[], search_text=''):
|
||||
@@ -203,17 +210,17 @@ class XMLRpcConn(object):
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'search',['|',('name','ilike',ustr(search_text)),('email','ilike',ustr(search_text))])
|
||||
recs = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',ids,['id','name','street','city'])
|
||||
for rec in recs:
|
||||
name = ustr(rec['name']).encode('iso-8859-1')
|
||||
name = ustr(rec['name'])
|
||||
if rec['street']:
|
||||
name += ', ' + ustr(rec['street']).encode('iso-8859-1')
|
||||
name += ', ' + ustr(rec['street'])
|
||||
if rec['city']:
|
||||
name += ', ' + ustr(rec['city']).encode('iso-8859-1')
|
||||
name += ', ' + ustr(rec['city'])
|
||||
res.append((obj,rec['id'],name,object_name))
|
||||
else:
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'search',[('name','ilike',ustr(search_text))])
|
||||
recs = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',ids,['id','name'])
|
||||
for rec in recs:
|
||||
name = ustr(rec['name']).encode('iso-8859-1')
|
||||
name = ustr(rec['name'])
|
||||
res.append((obj,rec['id'],name,object_name))
|
||||
return res
|
||||
|
||||
@@ -247,17 +254,22 @@ class XMLRpcConn(object):
|
||||
|
||||
def MakeAttachment(self, recs, mail):
|
||||
attachments = mail.Attachments
|
||||
result = {}
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
att_folder_path = os.path.abspath(os.path.dirname(__file__)+"\\dialogs\\resources\\attachments\\")
|
||||
if not os.path.exists(att_folder_path):
|
||||
os.makedirs(att_folder_path)
|
||||
for rec in recs: #[('res.partner', 3, 'Agrolait')]
|
||||
|
||||
obj = rec[0]
|
||||
obj_id = rec[1]
|
||||
res={}
|
||||
res['res_model'] = obj
|
||||
attachment_ids = []
|
||||
if obj not in result:
|
||||
result[obj] = {}
|
||||
for i in xrange(1, attachments.Count+1):
|
||||
fn = ustr(attachments[i].FileName).encode('iso-8859-1')
|
||||
fn = ustr(attachments[i].FileName)
|
||||
if len(fn) > 64:
|
||||
l = 64 - len(fn)
|
||||
f = fn.split('.')
|
||||
@@ -271,7 +283,10 @@ class XMLRpcConn(object):
|
||||
res['datas_fname'] = ustr(fn)
|
||||
res['datas'] = content
|
||||
res['res_id'] = obj_id
|
||||
execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.attachment','create',res)
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.attachment','create',res)
|
||||
attachment_ids.append(id)
|
||||
result[obj].update({obj_id: attachment_ids})
|
||||
return result
|
||||
|
||||
def CreateContact(self, sel=None, res=None):
|
||||
res=eval(str(res))
|
||||
@@ -345,7 +360,7 @@ class XMLRpcConn(object):
|
||||
state_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', [])
|
||||
for state_id in state_ids:
|
||||
obj = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'read', [state_id],['id','name'])[0]
|
||||
state_list.append((obj['id'], ustr(obj['name']).encode('iso-8859-1')))
|
||||
state_list.append((obj['id'], ustr(obj['name'])))
|
||||
return state_list
|
||||
|
||||
def GetAllCountry(self):
|
||||
@@ -356,5 +371,5 @@ class XMLRpcConn(object):
|
||||
country_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', [])
|
||||
for country_id in country_ids:
|
||||
obj = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country','read', [country_id], ['id','name'])[0]
|
||||
country_list.append((obj['id'], ustr(obj['name']).encode('iso-8859-1')))
|
||||
country_list.append((obj['id'], ustr(obj['name'])))
|
||||
return country_list
|
||||
|
||||
+74
-90
@@ -29,12 +29,12 @@ from osv import fields, osv
|
||||
class project_task_type(osv.osv):
|
||||
_name = 'project.task.type'
|
||||
_description = 'Task Stage'
|
||||
_order = 'sequence'
|
||||
_columns = {
|
||||
'name': fields.char('Stage Name', required=True, size=64, translate=True),
|
||||
'description': fields.text('Description'),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
}
|
||||
_order = 'sequence'
|
||||
|
||||
_defaults = {
|
||||
'sequence': 1
|
||||
@@ -55,8 +55,7 @@ class project(osv.osv):
|
||||
LEFT JOIN account_analytic_account account ON account.id = project.analytic_account_id
|
||||
LEFT JOIN project_user_rel rel ON rel.project_id = project.analytic_account_id
|
||||
WHERE (account.user_id = %s or rel.uid = %s)"""%(user, user))
|
||||
res = cr.fetchall()
|
||||
return [(r[0]) for r in res]
|
||||
return [(r[0]) for r in cr.fetchall()]
|
||||
return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order,
|
||||
context=context, count=count)
|
||||
|
||||
@@ -66,10 +65,6 @@ class project(osv.osv):
|
||||
res[m.id] = (m.parent_id and (m.parent_id.name + '/') or '') + m.name
|
||||
return res
|
||||
|
||||
def check_recursion(self, cursor, user, ids, parent=None):
|
||||
return super(project, self).check_recursion(cursor, user, ids,
|
||||
parent=parent)
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part=False, context=None):
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
if not part:
|
||||
@@ -80,30 +75,29 @@ class project(osv.osv):
|
||||
return {'value':{'contact_id': addr['contact'], 'pricelist_id': pricelist_id}}
|
||||
|
||||
def get_all_child_projects(self, cr, uid, ids, context=None):
|
||||
# Calculate child project for Given project id => For progress rate + planned time + Time spent
|
||||
cr.execute('''select prpc.id as id from account_analytic_account as p
|
||||
join account_analytic_account as c on p.id = c.parent_id
|
||||
join project_project as prp on prp.analytic_account_id = p.id
|
||||
join project_project as prpc on prpc.analytic_account_id = c.id
|
||||
where prp.id in %s''',(tuple(ids),))
|
||||
join account_analytic_account as c on p.id = c.parent_id
|
||||
join project_project as prp on prp.analytic_account_id = p.id
|
||||
join project_project as prpc on prpc.analytic_account_id = c.id
|
||||
where prp.id in %s''',(tuple(ids),))
|
||||
|
||||
child_ids = cr.fetchall()
|
||||
if child_ids:
|
||||
child_ids = [x[0] for x in child_ids]
|
||||
child_ids = self.get_all_child_projects(cr, uid, child_ids)
|
||||
child_ids = [x[0] for x in child_ids]
|
||||
child_ids = self.get_all_child_projects(cr, uid, child_ids)
|
||||
return ids + child_ids
|
||||
|
||||
return ids+child_ids
|
||||
|
||||
def _get_user_and_default_uom_ids(self, cr, uid):
|
||||
users_obj = self.pool.get('res.users')
|
||||
model_data_obj = self.pool.get('ir.model.data')
|
||||
|
||||
model_data_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour')
|
||||
default_uom = user_uom = model_data_obj.read(cr, uid, [model_data_id], ['res_id'])[0]['res_id']
|
||||
obj_tm = users_obj.browse(cr, uid, uid).company_id.project_time_mode_id
|
||||
if obj_tm:
|
||||
user_uom = obj_tm.id
|
||||
return user_uom, default_uom
|
||||
|
||||
|
||||
def _progress_rate(self, cr, uid, ids, names, arg, context=None):
|
||||
res = {}.fromkeys(ids, 0.0)
|
||||
progress = {}
|
||||
@@ -138,19 +132,19 @@ where prp.id in %s''',(tuple(ids),))
|
||||
p = tocompute.pop()
|
||||
for i in range(3):
|
||||
s[i] += progress.get(p, (0.0, 0.0, 0.0))[i]
|
||||
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
user_uom, def_uom = self._get_user_and_default_uom_ids(cr, uid)
|
||||
if user_uom != def_uom:
|
||||
s[0] = uom_obj._compute_qty(cr, uid, user_uom, s[0], def_uom)
|
||||
s[1] = uom_obj._compute_qty(cr, uid, user_uom, s[1], def_uom)
|
||||
s[2] = uom_obj._compute_qty(cr, uid, user_uom, s[2], def_uom)
|
||||
|
||||
|
||||
if project.state == 'close':
|
||||
progress_rate = 100.0
|
||||
else:
|
||||
progress_rate = s[1] and round(min(100.0 * s[2] / s[1], 99.99), 2)
|
||||
|
||||
|
||||
res[project.id] = {
|
||||
'planned_hours': s[0],
|
||||
'effective_hours': s[2],
|
||||
@@ -164,7 +158,7 @@ where prp.id in %s''',(tuple(ids),))
|
||||
if proj.tasks:
|
||||
raise osv.except_osv(_('Operation Not Permitted !'), _('You can not delete a project with tasks. I suggest you to deactivate it.'))
|
||||
return super(project, self).unlink(cr, uid, ids, *args, **kwargs)
|
||||
|
||||
|
||||
_columns = {
|
||||
'complete_name': fields.function(_complete_name, method=True, string="Project Name", type='char', size=250),
|
||||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the project without removing it."),
|
||||
@@ -253,21 +247,20 @@ where prp.id in %s''',(tuple(ids),))
|
||||
default['name'] = proj.name+_(' (copy)')
|
||||
res = super(project, self).copy(cr, uid, id, default, context)
|
||||
|
||||
task_ids = task_obj.search(cr, uid, [('project_id','=', res), ('active','=',True)])
|
||||
tasks = task_obj.browse(cr, uid, task_ids)
|
||||
for task in tasks:
|
||||
date_deadline = None
|
||||
if task.date_start:
|
||||
ds = date(*time.strptime(task.date_start,'%Y-%m-%d %H:%M:%S')[:3])
|
||||
if task.date_deadline:
|
||||
dd = date(*time.strptime(task.date_deadline,'%Y-%m-%d')[:3])
|
||||
diff = dd-ds
|
||||
date_deadline = (datetime.now()+diff).strftime('%Y-%m-%d %H:%M:%S')
|
||||
task_obj.write(cr, uid, task.id, {'active':True,
|
||||
'date_start': False,
|
||||
'date_end': False,
|
||||
'date_deadline':date_deadline,
|
||||
})
|
||||
# task_ids = task_obj.search(cr, uid, [('project_id','=', res), ('active','=',True)])
|
||||
# tasks = task_obj.browse(cr, uid, task_ids)
|
||||
# for task in tasks:
|
||||
# date_deadline = None
|
||||
# if task.date_start:
|
||||
# ds = date(*time.strptime(task.date_start,'%Y-%m-%d %H:%M:%S')[:3])
|
||||
# if task.date_deadline:
|
||||
# dd = date(*time.strptime(task.date_deadline,'%Y-%m-%d')[:3])
|
||||
# diff = dd-ds
|
||||
# date_deadline = (datetime.now()+diff).strftime('%Y-%m-%d %H:%M:%S')
|
||||
# task_obj.write(cr, uid, task.id, {'date_start': False,
|
||||
# 'date_end': False,
|
||||
# 'date_deadline':date_deadline,
|
||||
# })
|
||||
|
||||
return res
|
||||
|
||||
@@ -335,28 +328,29 @@ class task(osv.osv):
|
||||
_description = "Task"
|
||||
_log_create = True
|
||||
_date_name = "date_start"
|
||||
|
||||
|
||||
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
obj_project = self.pool.get('project.project')
|
||||
for domain in args:
|
||||
if domain[0] == 'project_id' and (not isinstance(domain[2], str)):
|
||||
id = isinstance(domain[2], list) and int(domain[2][0]) or int(domain[2])
|
||||
if id:
|
||||
if self.pool.get('project.project').read(cr, user, id, ['state'])['state'] == 'template':
|
||||
args.append(['active', '=', False])
|
||||
id = isinstance(domain[2], list) and domain[2][0] or domain[2]
|
||||
if id and isinstance(id, (long, int)):
|
||||
if obj_project.read(cr, user, id, ['state'])['state'] == 'template':
|
||||
args.append(('active', '=', False))
|
||||
return super(task, self).search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
|
||||
|
||||
def _str_get(self, task, level=0, border='***', context=None):
|
||||
return border+' '+(task.user_id and task.user_id.name.upper() or '')+(level and (': L'+str(level)) or '')+(' - %.1fh / %.1fh'%(task.effective_hours or 0.0,task.planned_hours))+' '+border+'\n'+ \
|
||||
border[0]+' '+(task.name or '')+'\n'+ \
|
||||
(task.description or '')+'\n\n'
|
||||
|
||||
|
||||
# Compute: effective_hours, total_hours, progress
|
||||
def _hours_get(self, cr, uid, ids, field_names, args, context=None):
|
||||
project_obj = self.pool.get('project.project')
|
||||
res = {}
|
||||
cr.execute("SELECT task_id, COALESCE(SUM(hours),0) FROM project_task_work WHERE task_id IN %s GROUP BY task_id",(tuple(ids),))
|
||||
hours = dict(cr.fetchall())
|
||||
|
||||
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
|
||||
if user_uom != default_uom:
|
||||
@@ -364,7 +358,7 @@ class task(osv.osv):
|
||||
if hours.get(task.id, False):
|
||||
dur_in_user_uom = uom_obj._compute_qty(cr, uid, default_uom, hours.get(task.id, 0.0), user_uom)
|
||||
hours[task.id] = dur_in_user_uom
|
||||
|
||||
|
||||
for task in self.browse(cr, uid, ids, context=context):
|
||||
res[task.id] = {'effective_hours': hours.get(task.id, 0.0), 'total_hours': task.remaining_hours + hours.get(task.id, 0.0)}
|
||||
res[task.id]['delay_hours'] = res[task.id]['total_hours'] - task.planned_hours
|
||||
@@ -412,7 +406,7 @@ class task(osv.osv):
|
||||
if task.project_id.active == False or task.project_id.state == 'template':
|
||||
res[task.id] = False
|
||||
return res
|
||||
|
||||
|
||||
_columns = {
|
||||
'active': fields.function(_is_template, method=True, store=True, string='Not a Template Task', type='boolean', help="This field is computed automatically and have the same behavior than the boolean 'active' field: if the task is linked to a template or unactivated project, it will be hidden unless specifically asked."),
|
||||
'name': fields.char('Task Summary', size=128, required=True),
|
||||
@@ -460,7 +454,7 @@ class task(osv.osv):
|
||||
_order = "sequence, priority, date_start, id"
|
||||
|
||||
_constraints = [
|
||||
(_check_dates, 'Error! task start-date must be lower then task end-date.', ['date_start', 'date_end'])
|
||||
(_check_dates, 'Error! Task start-date must be lower then task end-date.', ['date_start', 'date_end'])
|
||||
]
|
||||
#
|
||||
# Override view according to the company definition
|
||||
@@ -492,7 +486,6 @@ class task(osv.osv):
|
||||
for f in res['fields']:
|
||||
if 'Hours' in res['fields'][f]['string']:
|
||||
res['fields'][f]['string'] = res['fields'][f]['string'].replace('Hours',tm)
|
||||
|
||||
return res
|
||||
|
||||
def do_close(self, cr, uid, ids, *args):
|
||||
@@ -601,7 +594,6 @@ class task(osv.osv):
|
||||
self.write(cr, uid, ids, {'state': 'draft'})
|
||||
return True
|
||||
|
||||
|
||||
def do_pending(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {'state': 'pending'})
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
@@ -635,7 +627,7 @@ task()
|
||||
|
||||
class project_work(osv.osv):
|
||||
_name = "project.task.work"
|
||||
_description = "Task Work"
|
||||
_description = "Project Task Work"
|
||||
_columns = {
|
||||
'name': fields.char('Work summary', size=128),
|
||||
'date': fields.datetime('Date'),
|
||||
@@ -651,34 +643,36 @@ class project_work(osv.osv):
|
||||
}
|
||||
|
||||
_order = "date desc"
|
||||
|
||||
|
||||
def create(self, cr, uid, vals, *args, **kwargs):
|
||||
if (not 'task_id' in vals) or (not 'hours' in vals):
|
||||
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
|
||||
if not vals['hours']:
|
||||
vals['hours'] = 0.00
|
||||
|
||||
project_obj = self.pool.get('project.project')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
|
||||
if (not 'task_id' in vals) or (not 'hours' in vals):
|
||||
return super(project_work, self).create(cr, uid, vals, *args, **kwargs)
|
||||
if not vals['hours']:
|
||||
vals['hours'] = 0.00
|
||||
|
||||
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
|
||||
duration = vals['hours']
|
||||
|
||||
|
||||
if user_uom != default_uom:
|
||||
duration = uom_obj._compute_qty(cr, uid, default_uom, duration, user_uom)
|
||||
cr.execute('update project_task set remaining_hours=remaining_hours - %s where id=%s', (duration, vals['task_id']))
|
||||
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
project_obj = self.pool.get('project.project')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
if not vals['hours']:
|
||||
vals['hours'] = 0.00
|
||||
|
||||
project_obj = self.pool.get('project.project')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
|
||||
vals['hours'] = 0.00
|
||||
|
||||
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
|
||||
duration = vals['hours']
|
||||
|
||||
|
||||
if user_uom == default_uom:
|
||||
for work in self.browse(cr, uid, ids, context):
|
||||
cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (duration, work.hours, work.task_id.id))
|
||||
@@ -687,14 +681,14 @@ class project_work(osv.osv):
|
||||
duration = uom_obj._compute_qty(cr, uid, default_uom, duration, user_uom)
|
||||
del_work = uom_obj._compute_qty(cr, uid, default_uom, work.hours, user_uom)
|
||||
cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (duration, del_work, work.task_id.id))
|
||||
|
||||
|
||||
return super(project_work,self).write(cr, uid, ids, vals, context)
|
||||
|
||||
def unlink(self, cr, uid, ids, *args, **kwargs):
|
||||
context = kwargs.get('context', {})
|
||||
project_obj = self.pool.get('project.project')
|
||||
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
|
||||
|
||||
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
|
||||
|
||||
if user_uom == default_uom:
|
||||
for work in self.browse(cr, uid, ids, context):
|
||||
cr.execute('update project_task set remaining_hours=remaining_hours + %s where id=%s', (work.hours, work.task_id.id))
|
||||
@@ -709,64 +703,54 @@ project_work()
|
||||
class config_compute_remaining(osv.osv_memory):
|
||||
_name='config.compute.remaining'
|
||||
|
||||
def _get_remaining(self,cr, uid, ctx):
|
||||
task_obj = self.pool.get('project.task')
|
||||
if 'active_id' in ctx:
|
||||
return task_obj.browse(cr, uid, ctx['active_id'], context=ctx).remaining_hours
|
||||
def _get_remaining(self,cr, uid, context=None):
|
||||
if context and 'active_id' in context:
|
||||
return self.pool.get('project.task').browse(cr, uid, context['active_id'], context=context).remaining_hours
|
||||
return False
|
||||
|
||||
_columns = {
|
||||
'remaining_hours' : fields.float('Remaining Hours', digits=(16,2), help="Put here the remaining hours required to close the task."),
|
||||
}
|
||||
|
||||
def _get_analytic_account(self, cr, uid, context={}):
|
||||
if context.get('account_id', False):
|
||||
return context.get('account_id')
|
||||
return False
|
||||
|
||||
_defaults = {
|
||||
'account_id' : _get_analytic_account,
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'remaining_hours': _get_remaining
|
||||
}
|
||||
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
users_obj = self.pool.get('res.users')
|
||||
obj_tm = users_obj.browse(cr, uid, uid, context).company_id.project_time_mode_id
|
||||
tm = obj_tm and obj_tm.name or 'Hours'
|
||||
|
||||
|
||||
res = super(config_compute_remaining, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu=submenu)
|
||||
|
||||
|
||||
if tm in ['Hours','Hour']:
|
||||
return res
|
||||
|
||||
|
||||
eview = etree.fromstring(res['arch'])
|
||||
|
||||
|
||||
def _check_rec(eview):
|
||||
if eview.attrib.get('widget','') == 'float_time':
|
||||
eview.set('widget','float')
|
||||
for child in eview:
|
||||
_check_rec(child)
|
||||
return True
|
||||
|
||||
|
||||
_check_rec(eview)
|
||||
|
||||
|
||||
res['arch'] = etree.tostring(eview)
|
||||
|
||||
|
||||
for f in res['fields']:
|
||||
if 'Hours' in res['fields'][f]['string']:
|
||||
res['fields'][f]['string'] = res['fields'][f]['string'].replace('Hours',tm)
|
||||
|
||||
return res
|
||||
|
||||
def compute_hours(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
task_obj = self.pool.get('project.task')
|
||||
request = self.pool.get('res.request')
|
||||
if 'active_id' in context:
|
||||
remaining_hrs=self.browse(cr,uid,ids)[0].remaining_hours
|
||||
remaining_hrs = self.browse(cr,uid,ids)[0].remaining_hours
|
||||
task_obj.write(cr,uid,context['active_id'],{'remaining_hours':remaining_hrs})
|
||||
if context.get('button_reactivate', False):
|
||||
tasks = task_obj.browse(cr, uid, [context['active_id']], context=context)
|
||||
@@ -786,7 +770,7 @@ class config_compute_remaining(osv.osv_memory):
|
||||
return {
|
||||
'type': 'ir.actions.act_window_close',
|
||||
}
|
||||
|
||||
|
||||
config_compute_remaining()
|
||||
|
||||
class message(osv.osv):
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: pt_BR\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-03 17:09+0000\n"
|
||||
"PO-Revision-Date: 2010-08-04 20:16+0000\n"
|
||||
"Last-Translator: Renato Lima - http://www.akretion.com "
|
||||
"<renatonlima@gmail.com>\n"
|
||||
"Language-Team: <pt@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:37+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: purchase
|
||||
@@ -26,7 +26,7 @@ msgstr "Faturamento & Pago"
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_invoiceafterpacking0
|
||||
msgid "Supplier Invoice pre-generated on receptions for control"
|
||||
msgstr ""
|
||||
msgstr "Fatura do fornecedor pré-gerada nos recebimentos para controle"
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,location_id:0
|
||||
@@ -207,7 +207,7 @@ msgstr ""
|
||||
#. module: purchase
|
||||
#: field:purchase.order,origin:0
|
||||
msgid "Origin"
|
||||
msgstr ""
|
||||
msgstr "Origem"
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,name:purchase.process_node_packinglist0
|
||||
@@ -265,6 +265,12 @@ msgid ""
|
||||
"Manual: no invoice will be pre-generated. The accountant will have to encode "
|
||||
"manually."
|
||||
msgstr ""
|
||||
"Da Ordem: Uma fatura provisória será gerada com base na ordem de compra. O "
|
||||
"contador só precisa validar esta fatura para controle.\n"
|
||||
"Da Seleção da Recepção: Uma fatura provisória será gerada baseada nas "
|
||||
"recepções validadas.\n"
|
||||
"Manual: Nenhuma fatura será gerada. O contador deverá codificá-la "
|
||||
"manualmente."
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_packinginvoice0
|
||||
@@ -331,6 +337,7 @@ msgstr "Order Lines"
|
||||
#: model:process.transition,note:purchase.process_transition_confirmingpurchaseorder1
|
||||
msgid "Confirm Purchase order from Request for quotation without origin"
|
||||
msgstr ""
|
||||
"Confirmar Ordem de Compra a partir da Requisição de Cotação sem origem"
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.quotation:0
|
||||
@@ -401,7 +408,7 @@ msgstr "Lista de Preços"
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_purchaseorder0
|
||||
msgid "When controlling invoice from orders"
|
||||
msgstr ""
|
||||
msgstr "Quando controlada notas fiscais pelas ordens"
|
||||
|
||||
#. module: purchase
|
||||
#: constraint:ir.ui.view:0
|
||||
@@ -411,7 +418,7 @@ msgstr "Invalid XML for View Architecture!"
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_invoicecontrol0
|
||||
msgid "Pre-generated supplier invoice to control based on order"
|
||||
msgstr ""
|
||||
msgstr "Notas fiscais de entredas pré-geradas em controle baseado na ordem"
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_invoicefrompurchase0
|
||||
@@ -561,7 +568,7 @@ msgstr "Requisição de Cotação é proposta pelo sistema."
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_packinginvoice0
|
||||
msgid "Packing Invoice"
|
||||
msgstr ""
|
||||
msgstr "Faturar embalagem"
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_invoicefrompackinglist0
|
||||
@@ -765,6 +772,9 @@ msgid ""
|
||||
"Module for purchase management\n"
|
||||
" Request for quotation, Create Supplier Invoice, Print Order..."
|
||||
msgstr ""
|
||||
"Módulo para gerenciamento de compra\n"
|
||||
" Pedido de Cotação, Criação de Fatura de Fornecedor, Impressão de "
|
||||
"Ordem..."
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,product_id:0
|
||||
|
||||
@@ -535,7 +535,6 @@ class purchase_order(osv.osv):
|
||||
'fiscal_position': porder.fiscal_position and porder.fiscal_position.id or False,
|
||||
})
|
||||
else:
|
||||
#order_infos['name'] += ', %s' % porder.name
|
||||
if porder.notes:
|
||||
order_infos['notes'] = (order_infos['notes'] or '') + ('\n%s' % (porder.notes,))
|
||||
if porder.origin:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
# 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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -23,8 +23,6 @@
|
||||
import time
|
||||
|
||||
from osv import fields,osv
|
||||
from osv import orm
|
||||
import netsvc
|
||||
from tools.translate import _
|
||||
|
||||
class purchase_requisition(osv.osv):
|
||||
|
||||
@@ -23,9 +23,6 @@ import time
|
||||
from mx import DateTime
|
||||
|
||||
from osv import fields, osv
|
||||
from service import web_services
|
||||
import netsvc
|
||||
import pooler
|
||||
from osv.orm import browse_record, browse_null
|
||||
|
||||
class purchase_requisition_partner(osv.osv_memory):
|
||||
|
||||
+10
-9
@@ -328,7 +328,7 @@ class sale_order(osv.osv):
|
||||
cr.execute('select id from sale_order_line where order_id IN %s and state=%s',(tuple(ids),'cancel'))
|
||||
line_ids = map(lambda x: x[0], cr.fetchall())
|
||||
self.write(cr, uid, ids, {'state': 'draft', 'invoice_ids': [], 'shipped': 0})
|
||||
self.pool.get('sale.order.line').write(cr, uid, line_ids, {'invoiced': False, 'state': 'draft', 'line_invoice_id': False})
|
||||
self.pool.get('sale.order.line').write(cr, uid, line_ids, {'invoiced': False, 'state': 'draft', 'invoice_lines': [(6, 0, [])]})
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for inv_id in ids:
|
||||
# Deleting the existing instance of workflow for SO
|
||||
@@ -512,10 +512,11 @@ class sale_order(osv.osv):
|
||||
for sale in self.browse(cr, uid, ids, context=context):
|
||||
for line in sale.order_line:
|
||||
invoiced = False
|
||||
if line.line_invoice_id and line.line_invoice_id.invoice_id.state == 'cancel':
|
||||
continue
|
||||
else:
|
||||
invoiced = True
|
||||
for iline in line.invoice_lines:
|
||||
if iline.invoice_id and iline.invoice_id.state == 'cancel':
|
||||
continue
|
||||
else:
|
||||
invoiced = True
|
||||
self.pool.get('sale.order.line').write(cr, uid, [line.id], {'invoiced': invoiced})
|
||||
self.write(cr, uid, ids, {'state': 'invoice_except', 'invoice_ids': False})
|
||||
return True
|
||||
@@ -805,8 +806,7 @@ class sale_order_line(osv.osv):
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sale order lines."),
|
||||
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer", readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),
|
||||
# 'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
|
||||
'line_invoice_id': fields.many2one('account.invoice.line','Invoice Line',readonly=True),
|
||||
'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
|
||||
'invoiced': fields.boolean('Invoiced', readonly=True),
|
||||
'procurement_id': fields.many2one('procurement.order', 'Procurement'),
|
||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, states={'draft':[('readonly',False)]}),
|
||||
@@ -918,7 +918,8 @@ class sale_order_line(osv.osv):
|
||||
'note': line.notes,
|
||||
'account_analytic_id': line.order_id.project_id and line.order_id.project_id.id or False,
|
||||
})
|
||||
self.write(cr, uid, [line.id], {'invoiced': True, 'line_invoice_id':inv_id})
|
||||
cr.execute('insert into sale_order_line_invoice_rel (order_line_id,invoice_id) values (%s,%s)', (line.id, inv_id))
|
||||
self.write(cr, uid, [line.id], {'invoiced': True})
|
||||
sales[line.order_id.id] = True
|
||||
create_ids.append(inv_id)
|
||||
# Trigger workflow events
|
||||
@@ -981,7 +982,7 @@ class sale_order_line(osv.osv):
|
||||
context = {}
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({'state': 'draft', 'move_ids': [], 'invoiced': False, 'line_invoice_id': False})
|
||||
default.update({'state': 'draft', 'move_ids': [], 'invoiced': False, 'invoice_lines': []})
|
||||
return super(sale_order_line, self).copy_data(cr, uid, id, default, context=context)
|
||||
|
||||
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
|
||||
|
||||
@@ -175,8 +175,8 @@
|
||||
<field colspan="4" name="notes" nolabel="1"/>
|
||||
</page>
|
||||
<page string="History" groups="base.group_extended">
|
||||
<separator colspan="4" string="Invoice"/>
|
||||
<field colspan="2" name="line_invoice_id" nolabel="1"/>
|
||||
<separator colspan="4" string="Invoice Lines"/>
|
||||
<field colspan="4" name="invoice_lines" nolabel="1"/>
|
||||
<separator colspan="4" string="Stock Moves"/>
|
||||
<field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
|
||||
</page>
|
||||
@@ -414,8 +414,8 @@
|
||||
<!-- <page string="Properties" groups="base.group_extended">-->
|
||||
<!-- <field name="property_ids" nolabel="1"/>-->
|
||||
<!-- </page>-->
|
||||
<page string="Invoice" groups="base.group_extended">
|
||||
<field colspan="2" name="line_invoice_id" nolabel="1"/>
|
||||
<page string="Invoice Lines" groups="base.group_extended">
|
||||
<field colspan="4" name="invoice_lines" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="notes" nolabel="1"/>
|
||||
|
||||
@@ -96,7 +96,7 @@ class stock_picking(osv.osv):
|
||||
sale_line_obj = self.pool.get('sale.order.line')
|
||||
if move_line.sale_line_id:
|
||||
sale_line_obj.write(cursor, user, [move_line.sale_line_id.id], {'invoiced':True,
|
||||
'line_invoice_id': invoice_line_id,
|
||||
'invoice_lines': [(4, invoice_line_id)],
|
||||
})
|
||||
return super(stock_picking, self)._invoice_line_hook(cursor, user,
|
||||
move_line, invoice_line_id)
|
||||
@@ -185,7 +185,7 @@ class stock_picking(osv.osv):
|
||||
'account_analytic_id': account_analytic_id,
|
||||
}, context=context)
|
||||
self.pool.get('sale.order.line').write(cursor, user, [sale_line.id], {'invoiced':True,
|
||||
'line_invoice_id': invoice_line_id,
|
||||
'invoice_lines': [(6, 0, [invoice_line_id])],
|
||||
})
|
||||
|
||||
return result
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</page>
|
||||
<page string="History" groups="base.group_extended">
|
||||
<separator colspan="4" string="Invoice Lines"/>
|
||||
<field colspan="4" name="line_invoice_id" nolabel="1"/>
|
||||
<field colspan="4" name="invoice_lines" nolabel="1"/>
|
||||
<separator colspan="4" string="Stock Moves"/>
|
||||
<field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
|
||||
</page>
|
||||
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: stock
|
||||
|
||||
@@ -276,12 +276,11 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_5cm_Above_Space">[[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Bold_9">Non Assigned Products: [[ ( move_lines.state == 'assigned' or move_lines.state == 'done' or move_lines.state == 'confirmed' ) and removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_1cm_above_space">[[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]]</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]]</para>
|
||||
|
||||
<para style="terp_default_Bold_9">[[ ([line for line in picking.move_lines if (line.state == 'draft' )]) and 'Non Assigned Products:' or removeParentNode('para') ]]</para>
|
||||
<section>
|
||||
<blockTable colWidths="197.0,68.0,61.0,57,46.0,26.0,74.0" style="Move_Line_Content_Other_State">
|
||||
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]]</para>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']]</para>
|
||||
|
||||
@@ -24,9 +24,6 @@ from tools.translate import _
|
||||
import tools
|
||||
from tools.sql import drop_view_if_exists
|
||||
|
||||
#
|
||||
# Check if it works with UoM ???
|
||||
#
|
||||
class stock_report_prodlots(osv.osv):
|
||||
_name = "stock.report.prodlots"
|
||||
_description = "Stock report by production lots"
|
||||
|
||||
@@ -24,7 +24,7 @@ import time
|
||||
from report.misc import choice_colors
|
||||
|
||||
#
|
||||
# dRAw a graph for stocks
|
||||
# Draw a graph for stocks
|
||||
#
|
||||
class stock_graph(object):
|
||||
def __init__(self, io):
|
||||
|
||||
@@ -20,13 +20,7 @@
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from service import web_services
|
||||
from tools.misc import UpdateableStr, UpdateableDict
|
||||
from tools.translate import _
|
||||
import netsvc
|
||||
import pooler
|
||||
import time
|
||||
import wizard
|
||||
|
||||
class stock_inventory_merge(osv.osv_memory):
|
||||
_name = "stock.inventory.merge"
|
||||
|
||||
@@ -186,8 +186,7 @@ class stock_partial_move(osv.osv_memory):
|
||||
res['move%s_product_qty'%(m.id)] = m.product_qty
|
||||
if 'move%s_product_uom'%(m.id) in fields:
|
||||
res['move%s_product_uom'%(m.id)] = m.product_uom.id
|
||||
|
||||
if (m.picking_id.type == 'out') and (m.product_id.cost_method == 'average'):
|
||||
if (m.picking_id.type == 'out') and (m.product_id.cost_method == 'average') and 'sale_id' in m.picking_id._columns.keys():
|
||||
price = 0
|
||||
if hasattr(m, 'sale_line_id') and m.sale_line_id:
|
||||
price = m.sale_line_id.price_unit
|
||||
@@ -201,7 +200,7 @@ class stock_partial_move(osv.osv_memory):
|
||||
if 'move%s_product_currency'%(m.id) in fields:
|
||||
res['move%s_product_currency'%(m.id)] = currency
|
||||
|
||||
if (m.picking_id.type == 'in') and (m.product_id.cost_method == 'average'):
|
||||
if (m.picking_id.type == 'in') and (m.product_id.cost_method == 'average') and 'purchase_id' in m.picking_id._columns.keys():
|
||||
price = 0
|
||||
if hasattr(m, 'purchase_line_id') and m.purchase_line_id:
|
||||
price = m.purchase_line_id.price_unit
|
||||
@@ -227,11 +226,6 @@ class stock_partial_move(osv.osv_memory):
|
||||
"""
|
||||
|
||||
rec_id = context and context.get('active_id', False)
|
||||
#tracking_lot = context.get('tracking_lot', False)
|
||||
#if tracking_lot:
|
||||
# tracking = self.pool.get('stock.tracking')
|
||||
# tracking_lot = tracking.get_create_tracking_lot(cr, uid,[rec_id], tracking_lot)
|
||||
# context ['tracking_lot'] = tracking_lot
|
||||
move_obj = self.pool.get('stock.move')
|
||||
move_ids = context.get('active_ids', False)
|
||||
partial = self.browse(cr, uid, ids[0], context)
|
||||
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:46+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: stock_location
|
||||
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: subscription
|
||||
|
||||
Reference in New Issue
Block a user