commit
026e8069fc
File diff suppressed because it is too large
Load Diff
|
@ -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 12:26+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-06 16:49+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <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:40+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
@ -4458,6 +4458,9 @@ msgid ""
|
|||
"to the higher ones. The order is important if you have a tax with several "
|
||||
"tax children. In this case, the evaluation order is important."
|
||||
msgstr ""
|
||||
"Pole numeracji jest stosowane do ustalania kolejności pozycji podatkowych "
|
||||
"od najniższej do najwyższej. Kolejność jest istotna, jeśli masz podatki z "
|
||||
"podatkami podrzędnymi."
|
||||
|
||||
#. module: account
|
||||
#: view:account.tax:0
|
||||
|
|
|
@ -59,11 +59,11 @@
|
|||
'report/report_auction_view.xml',
|
||||
'auction_wizard.xml',
|
||||
'board_auction_view.xml',
|
||||
'board_auction_manager_view.xml',
|
||||
# 'board_auction_manager_view.xml',
|
||||
|
||||
],
|
||||
'demo_xml': ['auction_demo.xml','board_auction_demo.xml'],
|
||||
'test': ['test/auction.yml', 'test/auction_wizard.yml'],
|
||||
'test': ['test/auction.yml'],
|
||||
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
|
|
@ -293,7 +293,16 @@ class auction_lots(osv.osv):
|
|||
elif name == "net_revenue":
|
||||
if lot.auction_id:
|
||||
result = lot.buyer_price - lot.seller_price - lot.costs
|
||||
|
||||
|
||||
elif name == "gross_margin":
|
||||
if ((lot.obj_price==0) and (lot.state=='draft')):
|
||||
amount = lot.lot_est1
|
||||
else:
|
||||
amount = lot.obj_price
|
||||
if amount > 0:
|
||||
result = (lot.gross_revenue * 100) / amount
|
||||
result = round(result,2)
|
||||
|
||||
elif name == "net_margin":
|
||||
if ((lot.obj_price==0) and (lot.state=='draft')):
|
||||
amount = lot.lot_est1
|
||||
|
@ -301,9 +310,11 @@ class auction_lots(osv.osv):
|
|||
amount = lot.obj_price
|
||||
if amount > 0:
|
||||
result = (lot.net_revenue * 100) / amount
|
||||
result = round(result,2)
|
||||
elif name == "costs":
|
||||
# costs: Total credit of analytic account
|
||||
# objects sold during this auction (excluding analytic lines that are in the analytic journal of the auction date)
|
||||
#TOCHECK: Calculation OF Indirect Cost
|
||||
som = 0.0
|
||||
if lot.auction_id:
|
||||
auct_id = lot.auction_id.id
|
||||
|
@ -344,15 +355,15 @@ class auction_lots(osv.osv):
|
|||
|
||||
_columns = {
|
||||
'bid_lines':fields.one2many('auction.bid_line', 'lot_id', 'Bids'),
|
||||
'auction_id': fields.many2one('auction.dates', 'Auctions', select=1, help="Auction For Objects"),
|
||||
'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True, help="Auction Deposit For Deposit Inventory"),
|
||||
'name': fields.char('Title', size=64, required=True, help='Auction Objects Name'),
|
||||
'auction_id': fields.many2one('auction.dates', 'Auction', select=1, help="Auction For Object"),
|
||||
'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True, help="Provide Deposit Information: seller, Withdrawned Method, Object, Deposit Costs"),
|
||||
'name': fields.char('Title', size=64, required=True, help='Auction Object Name'),
|
||||
'name2': fields.char('Short Description (2)', size=64),
|
||||
'lot_type': fields.selection(_type_get, 'Object category', size=64),
|
||||
'author_right': fields.many2one('account.tax', 'Author rights', help="Account Tax For Author Commission"),
|
||||
'lot_est1': fields.float('Minimum Estimation', help="Minimum Estimate Price Of Objects"),
|
||||
'lot_est2': fields.float('Maximum Estimation', help="Maximum Estimate Price Of Objects"),
|
||||
'lot_num': fields.integer('List Number', required=True, select=1, help="List Number For selected Object in Deposit"),
|
||||
'lot_est1': fields.float('Minimum Estimation', help="Minimum Estimate Price"),
|
||||
'lot_est2': fields.float('Maximum Estimation', help="Maximum Estimate Price"),
|
||||
'lot_num': fields.integer('List Number', required=True, select=1, help="List Number In Depositer Inventory"),
|
||||
'create_uid': fields.many2one('res.users', 'Created by', readonly=True),
|
||||
'history_ids':fields.one2many('auction.lot.history', 'lot_id', 'Auction history'),
|
||||
'lot_local':fields.char('Location', size=64, help="Auction Location"),
|
||||
|
@ -362,15 +373,15 @@ class auction_lots(osv.osv):
|
|||
'product_id':fields.many2one('product.product', 'Product', required=True),
|
||||
'obj_desc': fields.text('Object Description'),
|
||||
'obj_num': fields.integer('Catalog Number'),
|
||||
'obj_ret': fields.float('Price retired', help="Objects Ret"),
|
||||
'obj_ret': fields.float('Price retired', help="Object Ret"),
|
||||
'obj_comm': fields.boolean('Commission'),
|
||||
'obj_price': fields.float('Adjudication price', help="Objects Price"),
|
||||
'obj_price': fields.float('Adjudication price', help="Object Price"),
|
||||
'ach_avance': fields.float('Buyer Advance'),
|
||||
'ach_login': fields.char('Buyer Username', size=64),
|
||||
'ach_uid': fields.many2one('res.partner', 'Buyer'),
|
||||
'seller_id': fields.related('bord_vnd_id','partner_id', type='many2one', relation='res.partner', string='Seller', readonly=True, help="Seller who is related to depositor Inventory"),
|
||||
'ach_emp': fields.boolean('Taken Away', readonly=True, help="When This Field is True means, Objects is taken away by Buyer"),
|
||||
'is_ok': fields.boolean('Buyer\'s payment', help="When Buyer Pay For Account Bank statement', This field is selected as True.", readonly=True),
|
||||
'seller_id': fields.related('bord_vnd_id','partner_id', type='many2one', relation='res.partner', string='Seller', readonly=True),
|
||||
'ach_emp': fields.boolean('Taken Away', readonly=True, help="When state is Taken Away, This field is Marked as True"),
|
||||
'is_ok': fields.boolean('Buyer\'s payment', help="When Buyer Pay For Bank statement', This field is Marked"),
|
||||
'ach_inv_id': fields.many2one('account.invoice', 'Buyer Invoice', readonly=True, states={'draft':[('readonly', False)]}),
|
||||
'sel_inv_id': fields.many2one('account.invoice', 'Seller Invoice', readonly=True, states={'draft':[('readonly', False)]}),
|
||||
'vnd_lim': fields.float('Seller limit'),
|
||||
|
@ -388,14 +399,14 @@ class auction_lots(osv.osv):
|
|||
\n* The \'Unsold\' state is used when object does not sold for long time, user can also set it as draft state after unsold. \
|
||||
\n* The \'Paid\' state is used when user pay for the object \
|
||||
\n* The \'Sold\' state is used when user buy the object.'),
|
||||
'buyer_price': fields.function(_getprice, method=True, string='Buyer price', store=True, multi="buyer_price", help="Objects Price which Buyer Given For Objects"),
|
||||
'buyer_price': fields.function(_getprice, method=True, string='Buyer price', store=True, multi="buyer_price", help="Buyer Price"),
|
||||
'seller_price': fields.function(_getprice, method=True, string='Seller price', store=True, multi="seller_price", help="Seller Price"),
|
||||
'gross_revenue':fields.function(_getprice, method=True, string='Gross revenue', store=True, multi="gross_revenue", help="Revenue Minus Cost Of Objects Sold."),
|
||||
'gross_margin':fields.function(_getprice, method=True, string='Gross Margin (%)', store=True, multi="gross_margin", help="Gross Income Divided by Net Sales"),
|
||||
'costs':fields.function(_getprice, method=True, string='Indirect costs', store=True, multi="costs", help="Total credit of analytic account"),
|
||||
'statement_id': fields.many2many('account.bank.statement.line', 'auction_statement_line_rel', 'auction_id', 'statement', 'Payment', help="Account Bank statement Line For Given Buyer"),
|
||||
'net_revenue':fields.function(_getprice, method=True, string='Net revenue', store=True, multi="net_revenue", help="Total Revenue Minus Returns"),
|
||||
'net_margin':fields.function(_getprice, method=True, string='Net Margin (%)', store=True, multi="net_margin", help="The ratio of net profits to revenues"),
|
||||
'gross_revenue':fields.function(_getprice, method=True, string='Gross revenue', store=True, multi="gross_revenue", help="Buyer Price - Seller Price"),
|
||||
'gross_margin':fields.function(_getprice, method=True, string='Gross Margin (%)', store=True, multi="gross_margin", help="(Gross Revenue*100.0)/ Object Price"),
|
||||
'costs':fields.function(_getprice, method=True, string='Indirect costs', store=True, multi="costs", help="Deposit cost"),
|
||||
'statement_id': fields.many2many('account.bank.statement.line', 'auction_statement_line_rel', 'auction_id', 'statement', 'Payment', help="Bank statement Line For Given Buyer"),
|
||||
'net_revenue':fields.function(_getprice, method=True, string='Net revenue', store=True, multi="net_revenue", help="Buyer Price - Seller Price - Indirect Cost"),
|
||||
'net_margin':fields.function(_getprice, method=True, string='Net Margin (%)', store=True, multi="net_margin", help="(Net Revenue * 100)/ Object Price"),
|
||||
}
|
||||
_defaults = {
|
||||
'state':lambda *a: 'draft',
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<data>
|
||||
<!--<delete model="ir.actions.report.xml" search="[('model','like','auction.')]"/>-->
|
||||
|
||||
<report string="Listing Huissiers"
|
||||
<report string="Bailiffs Listing"
|
||||
model="auction.lots"
|
||||
name="flagey.huissier"
|
||||
xsl="auction/report/huissier.xsl"
|
||||
|
@ -12,7 +12,6 @@
|
|||
multi="1"
|
||||
/>
|
||||
|
||||
|
||||
<report string="Artists Biography"
|
||||
model="auction.artists"
|
||||
name="report.auction.artists"
|
||||
|
@ -45,7 +44,7 @@
|
|||
|
||||
|
||||
<report
|
||||
string="Code barres du lot"
|
||||
string="Barcode batch"
|
||||
model="auction.lots"
|
||||
name="auction.code_bar_lot"
|
||||
rml="auction/report/report_lot_bar_code.rml"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_auction_artist_tree"/>
|
||||
</record>
|
||||
<menuitem name="Define Artists" parent="auction_config_menu" action="action_auction_artist" id="menu_auction_artist"/>
|
||||
<menuitem name="Artists" parent="auction_config_menu" action="action_auction_artist" id="menu_auction_artist"/>
|
||||
|
||||
|
||||
<!-- Auction Management/Configuration/objectcategories -->
|
||||
|
@ -50,7 +50,7 @@
|
|||
<field name="model">auction.lot.category</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Lot Category">
|
||||
<tree string="Object Categories">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -61,7 +61,7 @@
|
|||
<field name="model">auction.lot.category</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Lot Category">
|
||||
<form string="Object Categories">
|
||||
<field name="name" colspan="4" select="1"/>
|
||||
<newline/>
|
||||
<field name="aie_categ" colspan="4"/>
|
||||
|
@ -262,13 +262,13 @@
|
|||
</group>
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<group colspan="2" col="1">
|
||||
<separator string="Authors" colspan="2"/>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Authors" colspan="4"/>
|
||||
<field name="artist_id"/>
|
||||
<field name="artist2_id"/>
|
||||
<field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False),('type_tax_use','<>','sale')]"/>
|
||||
</group>
|
||||
<group colspan="2" col="1">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Price" colspan="4"/>
|
||||
<field name="lot_est1"/>
|
||||
<field name="lot_est2"/>
|
||||
|
@ -277,7 +277,7 @@
|
|||
<field name="buyer_price"/>
|
||||
<field name="obj_comm"/>
|
||||
</group>
|
||||
<group colspan="2" col="1">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Statistical" colspan="4"/>
|
||||
<field name="gross_revenue"/>
|
||||
<field name="net_revenue"/>
|
||||
|
@ -369,7 +369,6 @@
|
|||
</field>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -1,12 +1,62 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="board.note.type" id="note_auction_type">
|
||||
<field name="name">Auction</field>
|
||||
<data>
|
||||
<record model="board.note.type" id="note_auction_type1">
|
||||
<field name="name">Auction DashBoard</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="board_auction_manager_form">
|
||||
<field name="name">board.auction.manager.form</field>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_latest_objects_tree">
|
||||
<field name="res_model">auction.lots</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_latest_doposit_tree">
|
||||
<field name="res_model">auction.deposit</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_auction_estimation_adj_category_tree">
|
||||
<field name="name">report.auction.estimation.adj.category.tree</field>
|
||||
<field name="model">auction.lots</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Min est/Adj/Max est">
|
||||
<!--field name="date" select="1"/-->
|
||||
<field name="create_uid" select="1"/>
|
||||
<field name="lot_type" select="1"/>
|
||||
<field name="lot_est1" select="1"/>
|
||||
<field name="lot_est2" select="1"/>
|
||||
<field name="obj_price" select="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_auction_lots_estimation_adj_category_graph">
|
||||
<field name="name">report.auction.lots.estimation.adj.category.graph</field>
|
||||
<field name="model">auction.lots</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Min est/Adj/Max est" orientation="vertical" type="bar">
|
||||
<field name="lot_type" select="1"/>
|
||||
<field name="lot_est1" operator="+"/>
|
||||
<field name="obj_price" operator="+"/>
|
||||
<field name="lot_est2" operator="+"/>
|
||||
<field name="create_uid" group="True"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_auction_lots_estimation_adj_category_tree">
|
||||
<field name="name">Min est/Adj/Max est</field>
|
||||
<field name="res_model">auction.lots</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="board_auction_form1">
|
||||
<field name="name">board.auction.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
|
@ -14,36 +64,31 @@
|
|||
<hpaned position="100">
|
||||
<child1>
|
||||
<action
|
||||
string="My Latest Objects"
|
||||
string="Latest objects"
|
||||
name="%(auction.action_report_latest_objects_tree)d"
|
||||
height="200"
|
||||
width="510"/>
|
||||
<action string="My Latest Deposits"
|
||||
name="%(auction.action_report_latest_doposit_manager_tree)d"
|
||||
domain="[('create_uid','=',uid)]"
|
||||
/>
|
||||
width="510" />
|
||||
<action string="Latest deposits"
|
||||
name="%(auction.action_report_latest_doposit_tree)d"/>
|
||||
<action string="Objects statistics"
|
||||
name="%(auction.action_report_object_encoded_member_tree)d"
|
||||
name="%(auction.action_report_object_encoded_tree)d"
|
||||
/>
|
||||
</child1>
|
||||
</child1>
|
||||
|
||||
<child2>
|
||||
<button
|
||||
string="Menu"
|
||||
name="%(base.action_menu_admin)d"
|
||||
icon="gtk-justify-fill"
|
||||
type="action"
|
||||
colspan="4"/>
|
||||
|
||||
<action
|
||||
string="My Objects By Day"
|
||||
string="Total Adjudications"
|
||||
name="%(auction.action_report_auction_adjudication_tree)d"
|
||||
view_mode="graph,tree"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="Min/Adj/Max"
|
||||
name="%(auction.action_report_auction_lots_estimation_adj_category_tree)d"
|
||||
view_mode="graph,tree" colspan="4" />
|
||||
<action
|
||||
string="Objects by day"
|
||||
name="%(auction.action_report_auction_object_date_tree)d"
|
||||
view_mode="graph,tree" colspan="4"
|
||||
domain="[('user_id','=',uid),('month','=',time.strftime('%%Y-%%m-01'))]"/>
|
||||
<action
|
||||
string="Estimations/Adjudication"
|
||||
name="%(auction.action_report_auction_estimation_adj_category_member_tree)d"
|
||||
view_mode="graph,tree" colspan="4"/>
|
||||
view_mode="graph,tree" colspan="4" />
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
|
@ -51,20 +96,21 @@
|
|||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="open_board_auction">
|
||||
<field name="name">Auction member board</field>
|
||||
<field name="name">Auction board</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_auction_manager_form"/>
|
||||
<field name="view_id" ref="board_auction_form1"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Dashboard" id="menu_board_auction" parent="auction.auction_report_menu" sequence="0"/>
|
||||
|
||||
<menuitem
|
||||
name="Auction Member"
|
||||
name="Auction DashBoard"
|
||||
action="open_board_auction"
|
||||
sequence="2"
|
||||
id="board_menu_auction_member" icon="terp-graph" parent="menu_board_auction" />
|
||||
sequence="1"
|
||||
id="menu_board_auction_open" icon="terp-graph" parent="menu_board_auction"/>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<!-- TOFIX: Path Problem
|
||||
<xsl:import href="../../base/report/corporate_defaults.xsl" /> -->
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"/>
|
||||
|
||||
<xsl:import href="corporate_defaults.xsl" />
|
||||
<xsl:template match="/">
|
||||
<xsl:call-template name="rml" />
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="rml" match="/">
|
||||
<document filename="example.pdf">
|
||||
<template>
|
||||
|
@ -62,3 +61,4 @@
|
|||
</story>
|
||||
</document>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
|
||||
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
|
||||
<xsl:import href="../../base/report/rml_template.xsl"/>
|
||||
<xsl:import href="corporate_defaults.xsl"/>
|
||||
<xsl:import href="rml_template.xsl"/>
|
||||
<xsl:variable name="page_format">a4_normal</xsl:variable>
|
||||
|
||||
<xsl:template match="/">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
|
||||
<xsl:import href="corporate_defaults.xsl"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="lots"/>
|
||||
</xsl:template>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
|
||||
<xsl:import href="corporate_defaults.xsl"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="lots"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
|
||||
<xsl:import href="../../base/report/rml_template.xsl"/>
|
||||
<xsl:import href="corporate_defaults.xsl"/>
|
||||
<xsl:import href="rml_template.xsl"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:call-template name="rml"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
|
||||
<xsl:import href="corporate_defaults.xsl"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="lots"/>
|
||||
</xsl:template>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
|
||||
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
|
||||
<xsl:import href="../../base/report/rml_template.xsl"/>
|
||||
<xsl:import href="corporate_defaults.xsl"/>
|
||||
<xsl:import href="rml_template.xsl"/>
|
||||
<xsl:variable name="page_format">a4_normal</xsl:variable>
|
||||
|
||||
<xsl:template name="stylesheet">
|
||||
|
|
|
@ -53,9 +53,9 @@ class report_auction(osv.osv):
|
|||
'buyer':fields.many2one('res.partner', 'Buyer', readonly=True, select=2),
|
||||
'seller': fields.many2one('res.partner', 'Seller', readonly=True, select=1),
|
||||
'object':fields.integer('No of objects', readonly=True, select=1),
|
||||
'total_price':fields.float('Total Adj.', digits=(16, 2), readonly=True, select=2),
|
||||
'total_price':fields.float('Total Price', digits=(16, 2), readonly=True, select=2),
|
||||
'lot_type': fields.selection(_type_get, 'Object category', size=64),
|
||||
'avg_price':fields.float('Avg Adj.', digits=(16, 2), readonly=True, select=2),
|
||||
'avg_price':fields.float('Avg Price.', digits=(16, 2), readonly=True, select=2),
|
||||
'date': fields.date('Create Date', select=1),
|
||||
'auction': fields.many2one('auction.dates', 'Auction date', readonly=True, select=1),
|
||||
'gross_revenue':fields.float('Gross Revenue', readonly=True),
|
||||
|
@ -112,7 +112,7 @@ report_auction()
|
|||
|
||||
|
||||
#==========================
|
||||
#Others Report for Dashboard (Employee & Manager)
|
||||
#Dashboard Report
|
||||
#==========================
|
||||
|
||||
class report_auction_object_date(osv.osv):
|
||||
|
@ -145,42 +145,6 @@ class report_auction_object_date(osv.osv):
|
|||
""")
|
||||
report_auction_object_date()
|
||||
|
||||
class report_auction_estimation_adj_category(osv.osv):
|
||||
_name = "report.auction.estimation.adj.category"
|
||||
_description = "comparaison estimate/adjudication "
|
||||
_auto = False
|
||||
_rec_name='date'
|
||||
_columns = {
|
||||
'lot_est1': fields.float('Minimum Estimation',select=2),
|
||||
'lot_est2': fields.float('Maximum Estimation',select=2),
|
||||
# 'obj_price': fields.float('Adjudication price'),
|
||||
'date': fields.date('Date', readonly=True,select=1),
|
||||
'lot_type': fields.selection(_type_get, 'Object Type', size=64),
|
||||
'adj_total': fields.float('Total Adjudication',select=2),
|
||||
'user_id':fields.many2one('res.users', 'User', select=1)
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_auction_estimation_adj_category as (
|
||||
select
|
||||
min(l.id) as id,
|
||||
to_char(l.create_date, 'YYYY-MM-01') as date,
|
||||
l.lot_type as lot_type,
|
||||
sum(l.lot_est1) as lot_est1,
|
||||
sum(l.lot_est2) as lot_est2,
|
||||
sum(l.obj_price) as adj_total,
|
||||
l.create_uid as user_id
|
||||
from
|
||||
auction_lots l,auction_dates m
|
||||
where
|
||||
l.auction_id=m.id and l.obj_price >0
|
||||
group by
|
||||
to_char(l.create_date, 'YYYY-MM-01'),lot_type,l.create_uid
|
||||
)
|
||||
""")
|
||||
report_auction_estimation_adj_category()
|
||||
|
||||
class report_auction_adjudication(osv.osv):
|
||||
_name = "report.auction.adjudication"
|
||||
_description = "report_auction_adjudication"
|
||||
|
@ -194,7 +158,6 @@ class report_auction_adjudication(osv.osv):
|
|||
|
||||
}
|
||||
|
||||
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_auction_adjudication as (
|
||||
|
@ -216,114 +179,10 @@ class report_auction_adjudication(osv.osv):
|
|||
""")
|
||||
report_auction_adjudication()
|
||||
|
||||
class report_attendance(osv.osv):
|
||||
_name="report.attendance"
|
||||
_description = "Report Sign In/Out"
|
||||
_auto = False
|
||||
#_rec_name='date'
|
||||
_columns = {
|
||||
'name': fields.date('Date', readonly=True,select=1),
|
||||
'employee_id' : fields.many2one('hr.employee', 'Employee', select=1, readonly=True),
|
||||
'total_attendance': fields.float('Total', readonly=True),
|
||||
}
|
||||
def init(self, cr):
|
||||
cr.execute("""CREATE OR REPLACE VIEW report_attendance AS
|
||||
SELECT
|
||||
id,
|
||||
name,
|
||||
employee_id,
|
||||
CASE WHEN SUM(total_attendance) < 0
|
||||
THEN (SUM(total_attendance) +
|
||||
CASE WHEN current_date <> name
|
||||
THEN 1440
|
||||
ELSE (EXTRACT(hour FROM current_time) * 60) + EXTRACT(minute FROM current_time)
|
||||
END
|
||||
)
|
||||
ELSE SUM(total_attendance)
|
||||
END /60 as total_attendance
|
||||
FROM (
|
||||
SELECT
|
||||
max(a.id) as id,
|
||||
a.name::date as name,
|
||||
a.employee_id,
|
||||
SUM(((EXTRACT(hour FROM a.name) * 60) + EXTRACT(minute FROM a.name)) * (CASE WHEN a.action = 'sign_in' THEN -1 ELSE 1 END)) as total_attendance
|
||||
FROM hr_attendance a
|
||||
where name > current_date + interval '-1 day'
|
||||
GROUP BY a.name::date, a.employee_id
|
||||
) AS fs
|
||||
GROUP BY name,fs.id,employee_id
|
||||
""")
|
||||
|
||||
report_attendance()
|
||||
|
||||
|
||||
class report_deposit_border(osv.osv):
|
||||
_name="report.deposit.border"
|
||||
_description = "Report deposit border"
|
||||
_auto = False
|
||||
_rec_name='bord'
|
||||
_columns = {
|
||||
'bord': fields.char('Depositer Inventory', size=64, required=True),
|
||||
'seller': fields.many2one('res.partner','Seller',select=1),
|
||||
'moy_est' : fields.float('Avg. Est', select=1, readonly=True),
|
||||
'total_marge': fields.float('Total margin', readonly=True),
|
||||
'nb_obj':fields.float('# of objects', readonly=True),
|
||||
}
|
||||
def init(self, cr):
|
||||
cr.execute("""CREATE OR REPLACE VIEW report_deposit_border AS
|
||||
SELECT
|
||||
min(al.id) as id,
|
||||
ab.partner_id as seller,
|
||||
ab.name as bord,
|
||||
COUNT(al.id) as nb_obj,
|
||||
SUM((al.lot_est1 + al.lot_est2)/2) as moy_est,
|
||||
SUM(al.net_revenue)/(count(ad.id)) as total_marge
|
||||
|
||||
FROM
|
||||
auction_lots al,auction_deposit ab,auction_dates ad
|
||||
WHERE
|
||||
ad.id=al.auction_id
|
||||
and al.bord_vnd_id=ab.id
|
||||
GROUP BY
|
||||
ab.name,ab.partner_id""")
|
||||
report_deposit_border()
|
||||
|
||||
class report_object_encoded(osv.osv):
|
||||
_name = "report.object.encoded"
|
||||
_description = "Object encoded"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('invoiced','Invoiced')),'Status', required=True,select=1),
|
||||
'user_id':fields.many2one('res.users', 'User', select=1),
|
||||
'estimation': fields.float('Estimation',select=2),
|
||||
'date': fields.date('Create Date', required=True),
|
||||
# 'gross_revenue':fields.float('Gross revenue',readonly=True, select=2),
|
||||
# 'net_revenue':fields.float('Net revenue',readonly=True, select=2),
|
||||
# 'obj_margin':fields.float('Net margin', readonly=True, select=2),
|
||||
'obj_ret':fields.integer('# obj ret', readonly=True, select=2),
|
||||
# 'adj':fields.integer('Adj.', readonly=True, select=2),
|
||||
'obj_num':fields.integer('# of Encoded obj.', readonly=True, select=2),
|
||||
}
|
||||
def init(self, cr):
|
||||
cr.execute('''create or replace view report_object_encoded as
|
||||
(select min(al.id) as id,
|
||||
to_char(al.create_date, 'YYYY-MM-DD') as date,
|
||||
al.state as state,
|
||||
al.create_uid as user_id,
|
||||
(SELECT count(1) FROM auction_lots WHERE obj_ret>0) as obj_ret,
|
||||
sum((100* al.lot_est1)/al.obj_price) as estimation,
|
||||
COUNT(al.product_id) as obj_num
|
||||
from auction_lots al
|
||||
where al.obj_price>0 and state='draft'
|
||||
group by to_char(al.create_date, 'YYYY-MM-DD'), al.state, al.create_uid)
|
||||
''')
|
||||
report_object_encoded()
|
||||
|
||||
|
||||
class report_object_encoded_manager(osv.osv):
|
||||
_name = "report.object.encoded.manager"
|
||||
_description = "Object encoded"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'user_id':fields.many2one('res.users', 'User', select=True),
|
||||
'estimation': fields.float('Estimation',select=True),
|
||||
|
@ -334,12 +193,14 @@ class report_object_encoded_manager(osv.osv):
|
|||
'obj_ret':fields.integer('# obj ret', readonly=True, select=True),
|
||||
'adj':fields.integer('Adj.', readonly=True, select=True),
|
||||
'obj_num':fields.integer('# of Encoded obj.', readonly=True, select=True),
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('invoiced','Invoiced')),'Status', required=True,select=1),
|
||||
}
|
||||
def init(self, cr):
|
||||
cr.execute('''create or replace view report_object_encoded_manager as
|
||||
cr.execute('''create or replace view report_object_encoded as
|
||||
(select
|
||||
min(al.id) as id,
|
||||
to_char(al.create_date, 'YYYY-MM-DD') as date,
|
||||
al.state as state,
|
||||
al.create_uid as user_id,
|
||||
sum((100*lot_est1)/obj_price) as estimation,
|
||||
(SELECT count(1) FROM auction_lots WHERE obj_ret>0) as obj_ret,
|
||||
|
@ -350,46 +211,8 @@ class report_object_encoded_manager(osv.osv):
|
|||
SUM(al.obj_price) as "adj"
|
||||
from auction_lots al
|
||||
where al.obj_price>0
|
||||
group by to_char(al.create_date, 'YYYY-MM-DD'), al.create_uid)
|
||||
group by to_char(al.create_date, 'YYYY-MM-DD'), al.state, al.create_uid)
|
||||
''')
|
||||
report_object_encoded_manager()
|
||||
|
||||
report_object_encoded()
|
||||
|
||||
class report_unclassified_objects(osv.osv):
|
||||
_name = "report.unclassified.objects"
|
||||
_description = "Unclassified objects "
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.char('Short Description',size=64, required=True),
|
||||
'obj_num': fields.integer('Catalog Number'),
|
||||
'obj_price': fields.float('Adjudication price'),
|
||||
'lot_num': fields.integer('List Number', required=True, select=1 ),
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold')),'Status', required=True, readonly=True),
|
||||
'obj_comm': fields.boolean('Commission'),
|
||||
'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True),
|
||||
'ach_login': fields.char('Buyer Username',size=64),
|
||||
'lot_est1': fields.float('Minimum Estimation'),
|
||||
'lot_est2': fields.float('Maximum Estimation'),
|
||||
'lot_type': fields.selection(_type_get, 'Object category', size=64),
|
||||
'auction': fields.many2one('auction.dates', 'Auction date',readonly=True, select=1),
|
||||
}
|
||||
def init(self, cr):
|
||||
cr.execute("""create or replace view report_unclassified_objects as
|
||||
(select
|
||||
min(al.id) as id,
|
||||
al.name as name,
|
||||
al.obj_price as obj_price,
|
||||
al.obj_num as obj_num,
|
||||
al.lot_num as lot_num,
|
||||
al.state as state,
|
||||
al.obj_comm as obj_comm,
|
||||
al.bord_vnd_id as bord_vnd_id,
|
||||
al.ach_login as ach_login,
|
||||
al.lot_est1 as lot_est1,
|
||||
al.lot_est2 as lot_est2,
|
||||
al.lot_type as lot_type,
|
||||
al.auction_id as auction
|
||||
from auction_lots al,auction_lot_category ac
|
||||
where (al.lot_type=ac.name) AND (ac.aie_categ='41') AND (al.auction_id is null)
|
||||
group by al.obj_price,al.obj_num, al.lot_num, al.state, al.obj_comm,al.bord_vnd_id,al.ach_login,al.lot_est1,al.lot_est2,al.lot_type,al.auction_id,al.name)
|
||||
""")
|
||||
report_unclassified_objects()
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<field name="object" select="1" invisible="1"/>
|
||||
<field name="state" select="1" invisible="1"/>
|
||||
<field name="lot_type" select="1" invisible="1"/>
|
||||
<field name="avg_estimation" />
|
||||
<field name="avg_price" select="1"/>
|
||||
<field name="gross_revenue" />
|
||||
<field name="net_revenue" />
|
||||
|
@ -107,7 +108,7 @@
|
|||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_auction">
|
||||
<field name="name">Auction's Summary</field>
|
||||
<field name="name">Auction Analysis</field>
|
||||
<field name="res_model">report.auction</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
|
@ -116,250 +117,12 @@
|
|||
<field name="context">{'search_default_month':1}</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Auction" id="auction_report_auction_menu" parent="auction.auction_report_menu"/>
|
||||
<menuitem name="Auction's Summary" action="action_report_auction" id="menu_report_auction" parent="auction_report_auction_menu"/>
|
||||
<!-- <menuitem name="Auction" id="auction_report_auction_menu" parent="auction.auction_report_menu"/>-->
|
||||
<menuitem name="Auction Analysis" action="action_report_auction" id="menu_report_auction" parent="auction.auction_report_menu"/>
|
||||
|
||||
<!--end : creating buyer Reporting menu for the buyer by pmo-->
|
||||
|
||||
<!-- Employee and Manager Report -->
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_report_unplanned_object_tree">
|
||||
<field name="name">Unplanned objects</field>
|
||||
<field name="model">report.unplanned.object</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Unplanned Objects">
|
||||
<field name="depos" select="1"/>
|
||||
<field name="lot" select="1"/>
|
||||
<field name="product_l" select="1"/>
|
||||
<field name="lot_est1_l" select="2"/>
|
||||
<field name="lot_est2_l" select="1"/>
|
||||
<field name="artist_id_l" select="1"/>
|
||||
<field name="name_l" select="1"/>
|
||||
<field name="obj_desc_l" select="2"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_report_unplanned_object_form">
|
||||
<field name="name">Unplanned objects</field>
|
||||
<field name="model">report.unplanned.object</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Unplanned Objects">
|
||||
<field name="depos" select="1"/>
|
||||
<field name="lot" select="1"/>
|
||||
<field name="product_l" select="1"/>
|
||||
<field name="lot_est1_l" select="1"/>
|
||||
<field name="lot_est2_l" select="1"/>
|
||||
<field name="artist_id_l" select="1"/>
|
||||
<field name="obj_desc_l" select="1"/>
|
||||
<field name="name_l" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
=============================
|
||||
estimation.adj.category
|
||||
==============================
|
||||
<record model="ir.ui.view" id="view_report_auction_estimation_adj_category_form">
|
||||
<field name="name">report.auction.estimation.adj.category.form</field>
|
||||
<field name="model">report.auction.estimation.adj.category</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Min est/Adj/Max est">
|
||||
<!--field name="date" select="1"/-->
|
||||
<field name="lot_type" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="lot_est1" select="2"/>
|
||||
<field name="lot_est2" select="2"/>
|
||||
<field name="adj_total" select="2"/>
|
||||
<field name="date" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_report_auction_estimation_adj_category_tree">
|
||||
<field name="name">report.auction.estimation.adj.category.tree</field>
|
||||
<field name="model">report.auction.estimation.adj.category</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Min est/Adj/Max est">
|
||||
<!--field name="date" select="1"/-->
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="lot_type" select="1"/>
|
||||
<field name="lot_est1" select="1"/>
|
||||
<field name="lot_est2" select="1"/>
|
||||
<field name="adj_total" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_auction_estimation_adj_category_graph">
|
||||
<field name="name">report.auction.estimation.adj.category.graph</field>
|
||||
<field name="model">report.auction.estimation.adj.category</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Min est/Adj/Max est" orientation="vertical" type="bar">
|
||||
<!--field name="date" operator="+"/-->
|
||||
<field name="lot_type" select="1"/>
|
||||
<field name="lot_est1" operator="+"/>
|
||||
<field name="adj_total" operator="+"/>
|
||||
<field name="lot_est2" operator="+"/>
|
||||
<field name="user_id" group="True"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_report_auction_estimation_adj_category_manager_tree">
|
||||
<field name="name">Min est/Adj/Max est</field>
|
||||
<field name="res_model">report.auction.estimation.adj.category</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('date','like',time.strftime('%Y-%m'))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_auction_estimation_adj_category_member_tree">
|
||||
<field name="name">Min est/Adj/Max est</field>
|
||||
<field name="res_model">report.auction.estimation.adj.category</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('date','like',time.strftime('%Y-%m')),('user_id','=',uid)]</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Employees" id="auction_report_employees_menu" parent="auction_report_menu"/>
|
||||
<menuitem name="Comparison of estimations" action="action_report_auction_estimation_adj_category_member_tree" id="menu_report_auction_estimation_adj_category_member" parent="auction_report_employees_menu"/>
|
||||
<menuitem name="Manager" id="auction_report_manager_menu" parent="auction_report_menu"/>
|
||||
<menuitem name="Comparison of estimations" action="action_report_auction_estimation_adj_category_manager_tree" id="menu_report_auction_estimation_adj_category_manager" parent="auction_report_manager_menu"/>
|
||||
|
||||
|
||||
<!--=============================
|
||||
sign in sign out report by user
|
||||
==============================
|
||||
|
||||
<record model="ir.ui.view" id="view_report_auction_sign_in_out_tree">
|
||||
<field name="name">report.auction.user.pointing.tree</field>
|
||||
<field name="model">report.auction.user.pointing</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Summary pointing by user ">
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="total_timesheet" widget="float_time"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_auction_sign_in_out_graph">
|
||||
<field name="name">report.auction.user.pointing.graph</field>
|
||||
<field name="model">report.auction.user.pointing</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<graph string="Summary pointing by user " orientation="vertical" type="bar">
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="total_timesheet" />
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_auction_sign_in_out_member_tree">
|
||||
<field name="res_model">report.auction.user.pointing</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_report_auction_sign_in_out_manager_tree">
|
||||
<field name="res_model">report.auction.user.pointing</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
</record>
|
||||
<menuitem name="Summury of Sign_in Sign_out" action="action_report_auction_sign_in_out_member_tree" id="menu_report_auction_sign_in_out_member_tree" parent="auction_report_manager_menu"/>
|
||||
<menuitem name="Summury of Sign_in Sign_out" action="action_report_auction_sign_in_out_manager_tree" id="menu_report_auction_sign_in_out_manager_tree" parent="auction_report_manager_menu"/>
|
||||
|
||||
-->
|
||||
<record model="ir.ui.view" id="view_report_auction_sign_in_out_tree1">
|
||||
<field name="name">report attendance</field>
|
||||
<field name="model">report.attendance</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="User's pointing">
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="total_attendance" select="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_auction_sign_in_out_graph1">
|
||||
<field name="name">Graph attendance</field>
|
||||
<field name="model">report.attendance</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="User's pointing" orientation="vertical" type="bar">
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="total_attendance" operator="+"/>
|
||||
<field name="name" select="1"/>
|
||||
</graph>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_auction_sign_in_out_member_tree1">
|
||||
<field name="res_model">report.attendance</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain"> [('name','=',time.strftime('%Y-%m-%d')),('employee_id','=',uid)]</field>
|
||||
<!--<field name="domain"> [('name','ilike',time.strftime('%Y-%m'))]</field>-->
|
||||
</record>
|
||||
<menuitem name="Attendance" action="action_report_auction_sign_in_out_member_tree1" id="menu_report_auction_sign_in_out_member_tree1" parent="auction_report_employees_menu"/>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_auction_sign_in_out_manager_tree1">
|
||||
<field name="res_model">report.attendance</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain"> [('name','=',time.strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Attendance" action="action_report_auction_sign_in_out_manager_tree1" id="menu_report_auction_sign_in_out_manager_tree1" parent="auction_report_manager_menu"/>
|
||||
|
||||
==============================
|
||||
My Latest Objects
|
||||
==============================
|
||||
<record model="ir.actions.act_window" id="action_report_latest_objects_tree">
|
||||
<field name="res_model">auction.lots</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('create_uid','=',uid)]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_latest_objects_manager_tree">
|
||||
<field name="res_model">auction.lots</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="limit" eval="80"/>
|
||||
</record>
|
||||
|
||||
|
||||
=============================
|
||||
My Latest Deposit
|
||||
==============================
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_latest_doposit_tree">
|
||||
<field name="res_model">auction.deposit</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('create_uid','=',uid)]</field>
|
||||
</record>
|
||||
<menuitem name="My Latest Deposits" action="action_report_latest_doposit_tree" id="menu_report_latest_doposit_tree" parent="auction_report_employees_menu"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_latest_doposit_manager_tree">
|
||||
<field name="res_model">auction.deposit</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Latest Deposits" action="action_report_latest_doposit_manager_tree" id="menu_report_latest_doposit_tree_manager" parent="auction_report_manager_menu"/>
|
||||
=============================
|
||||
Objects per Day
|
||||
==============================
|
||||
|
@ -417,59 +180,7 @@ Objects per Day
|
|||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('month','=',time.strftime('%Y-%m-01'))]</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Encoded Objects Per Day"
|
||||
action="action_report_auction_object_date_tree"
|
||||
id="menu_report_auction_object_date_tree"
|
||||
parent="auction_report_manager_menu"/>
|
||||
<menuitem
|
||||
name="My Encoded Objects Per Day"
|
||||
action="action_report_auction_object_date_tree_my"
|
||||
id="menu_report_auction_object_date_tree1_my"
|
||||
parent="auction_report_employees_menu"/>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="view_report_object_by_auction">
|
||||
<field name="name">Detailed lots</field>
|
||||
<field name="res_model">auction.lots</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('auction_id','=', active_id)]</field>
|
||||
<field name="limit" eval="2000"/>
|
||||
</record>
|
||||
<record model="ir.values" id="ir_open_auction_lots">
|
||||
<field name="key2">tree_but_open</field>
|
||||
<field name="model">auction.dates</field>
|
||||
<field name="name">Open auction</field>
|
||||
<field name="value" eval="'ir.actions.act_window,%d'%view_report_object_by_auction"/>
|
||||
<field name="object" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="auction_lots_open">
|
||||
<field name="name">Simplified lots for adjudication</field>
|
||||
<field name="res_model">auction.lots</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('auction_id','=',active_id)]</field>
|
||||
<field name="limit" eval="2000"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="ir_open_auction_lots_adj">
|
||||
<field name="key2">tree_but_action</field>
|
||||
<field name="model">auction.dates</field>
|
||||
<field name="name">Open lots for adjudication</field>
|
||||
<field name="value" eval="'ir.actions.act_window,%d'%auction_lots_open"/>
|
||||
<field name="object" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_object_by_auction">
|
||||
<field name="name">Auction dates</field>
|
||||
<field name="res_model">auction.dates</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('state','=', 'draft')]</field>
|
||||
</record>
|
||||
<menuitem name="Objects by Auction"
|
||||
parent="auction_objects_menu"
|
||||
id="menu_auction_dates_next_by_auction"
|
||||
action="action_report_object_by_auction" sequence="11"/>
|
||||
=============================
|
||||
Auction adjudication
|
||||
==============================
|
||||
|
@ -505,48 +216,10 @@ Auction adjudication
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
</record>
|
||||
<menuitem name="Adjudication by Auction" action="action_report_auction_adjudication_tree" id="menu_report_auction_adjudication_tree" parent="auction_report_manager_menu"/>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_auction_deposit_tree">
|
||||
<field name="name">Depositer's statistics</field>
|
||||
<field name="model">report.deposit.border</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Depositer's statistics">
|
||||
<field name="bord" select="1"/>
|
||||
<field name="seller" select="1"/>
|
||||
<field name="moy_est" select="1"/>
|
||||
<field name="total_marge" select="1"/>
|
||||
<field name="nb_obj" select="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="menu_view_auction_deposit_tree">
|
||||
<field name="res_model">report.deposit.border</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<menuitem name="Depositer's Statistics" action="menu_view_auction_deposit_tree" id="menu_report_deposit_tree_m" parent="auction_report_manager_menu"/>
|
||||
<menuitem name="Depositer's Statistics" action="menu_view_auction_deposit_tree" id="menu_report_deposit_tree_member" parent="auction_report_employees_menu"/>
|
||||
=============================
|
||||
Object encoded
|
||||
==============================
|
||||
<record model="ir.ui.view" id="view_report_object_encoded_form">
|
||||
<field name="name">report.object.encoded.form</field>
|
||||
<field name="model">report.object.encoded</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Objects statistics">
|
||||
<field name="date" select="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="estimation" select="2"/>
|
||||
<field name="obj_ret" select="2"/>
|
||||
<field name="obj_num" select="2" sum="# objects"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_object_encoded_tree">
|
||||
<field name="name">report.object.encoded.tree</field>
|
||||
|
@ -554,59 +227,8 @@ Object encoded
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Objects statistics">
|
||||
<field name="date" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="estimation"/>
|
||||
<field name="obj_ret"/>
|
||||
<field name="obj_num"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- <record model="ir.ui.view" id="view_report_object_encoded_tree">
|
||||
<field name="name">report.object.encoded.tree</field>
|
||||
<field name="model">report.object.encoded</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Objects statistics" >
|
||||
<field name="date" select="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="estimation" />
|
||||
<field name="obj_ret" />
|
||||
<field name="obj_num" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
<record model="ir.ui.view" id="view_report_object_encoded_graph">
|
||||
<field name="name">report.object.encoded.graph</field>
|
||||
<field name="model">report.object.encoded</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Objects statistics" type="bar">
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="estimation" operator="+" />
|
||||
<field name="obj_ret" operator="+" />
|
||||
<field name="obj_num" operator="+" />
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_object_encoded_member_tree">
|
||||
<field name="res_model">report.object.encoded</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain"> [('user_id','=',uid),('date','ilike',time.strftime('%Y-%m'))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_object_encoded_manager_tree">
|
||||
<field name="name">report.object.encoded.tree</field>
|
||||
<field name="model">report.object.encoded.manager</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Objects statistics">
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="estimation" />
|
||||
<field name="obj_ret" />
|
||||
<field name="obj_num" sum="# objects" select="1"/>
|
||||
|
@ -619,9 +241,9 @@ Object encoded
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_object_encoded_manager_graph">
|
||||
<record model="ir.ui.view" id="view_report_object_encoded_graph">
|
||||
<field name="name">report.object.encoded.graph</field>
|
||||
<field name="model">report.object.encoded.manager</field>
|
||||
<field name="model">report.object.encoded</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Object statistic" type="bar">
|
||||
|
@ -635,34 +257,13 @@ Object encoded
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_object_encoded_manager_tree">
|
||||
<field name="res_model">report.object.encoded.manager</field>
|
||||
<record model="ir.actions.act_window" id="action_report_object_encoded_tree">
|
||||
<field name="name">Object statistics</field>
|
||||
<field name="res_model">report.object.encoded</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain">[('date','ilike',time.strftime('%Y-%m'))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_unclassified_objects">
|
||||
<field name="name">report.unclassified.objects</field>
|
||||
<field name="model">report.unclassified.objects</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Unclassified objects">
|
||||
<field name="obj_num" string="Ref" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="ach_login"/>
|
||||
<field name="obj_price"/>
|
||||
<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"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
|
||||
<xsl:import href="../../base/report/rml_template.xsl"/>
|
||||
<xsl:import href="corporate_defaults.xsl"/>
|
||||
<xsl:import href="rml_template.xsl"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:call-template name="rml"/>
|
||||
|
|
|
@ -10,11 +10,6 @@
|
|||
"access_auction_lot_history","auction.lot.history","model_auction_lot_history","base.group_user",1,1,1,1
|
||||
"access_report_auction","report.auction","model_report_auction","base.group_user",1,0,0,0
|
||||
"access_report_auction_object_date","report.auction.object.date","model_report_auction_object_date","base.group_user",1,0,0,0
|
||||
"access_report_auction_estimation_adj_category","report.auction.estimation.adj.category","model_report_auction_estimation_adj_category","base.group_user",1,0,0,0
|
||||
"access_report_auction_adjudication","report.auction.adjudication","model_report_auction_adjudication","base.group_user",1,0,0,0
|
||||
"access_report_attendance","report.attendance","model_report_attendance","base.group_user",1,0,0,0
|
||||
"access_report_deposit_border","report.deposit.border","model_report_deposit_border","base.group_user",1,0,0,0
|
||||
"access_report_object_encoded","report.object.encoded","model_report_object_encoded","base.group_user",1,0,0,0
|
||||
"access_report_object_encoded_manager","report.object.encoded.manager","model_report_object_encoded_manager","base.group_user",1,0,0,0
|
||||
"access_report_unclassified_objects","report.unclassified.objects","model_report_unclassified_objects","base.group_user",1,0,0,0
|
||||
"access_aie_category","aie.category","model_aie_category","base.group_user",1,0,0,0
|
||||
|
|
|
|
@ -38,45 +38,121 @@
|
|||
analytic_journal_id: account.cose_journal_sale
|
||||
|
||||
-
|
||||
I'm creating new partner "Mark Johnson" with him email "info@mycustomer.com".
|
||||
I'm creating new Seller "Mr. Pinakin" with him email "info@mycustomer.com".
|
||||
-
|
||||
!record {model: res.partner, id: res_partner_markjohnson0}:
|
||||
!record {model: res.partner, id: res_partner_mrpinakin0}:
|
||||
address:
|
||||
- city: Namur
|
||||
country_id: base.be
|
||||
phone: (+32).10.45.18.77
|
||||
street: 23, street ways
|
||||
type: default
|
||||
zip: '2324324'
|
||||
email: 'info@mycustomer.com'
|
||||
name: Mr. Pinakin
|
||||
|
||||
-
|
||||
I'm creating new Buyer "Mr. Patel" with him email "info@myinfobid.com".
|
||||
-
|
||||
!record {model: res.partner, id: res_partner_mrpatel0}:
|
||||
address:
|
||||
- city: Bruxelles
|
||||
country_id: base.be
|
||||
street: Rue des Palais 51, bte 33
|
||||
type: default
|
||||
zip: '1000'
|
||||
email: 'info@mycustomer.com'
|
||||
name: Mark Johnson
|
||||
email: 'info@myinfobid.com'
|
||||
name: Mr. Patel
|
||||
|
||||
-
|
||||
I'm creating new Buyer "Mr. Johnson" with him email "info@mrkjohnson.com".
|
||||
-
|
||||
!record {model: res.partner, id: res_partner_mrkjohnson0}:
|
||||
address:
|
||||
- city: paris
|
||||
country_id: base.fr
|
||||
name: Mark Johnson
|
||||
street: 1 rue Rockfeller
|
||||
type: invoice
|
||||
zip: '75016'
|
||||
email: 'info@mrkjohnson.com'
|
||||
name: Mr. Mark Johnson
|
||||
|
||||
-
|
||||
I'm creating new Buyer "Mr. Rahi" with him email "info@poalrahi.com".
|
||||
-
|
||||
!record {model: res.partner, id: res_partner_poalrahi0}:
|
||||
address:
|
||||
- city: Bruxelles
|
||||
country_id: base.be
|
||||
street: Rue des Palais 51, bte 33
|
||||
type: default
|
||||
zip: '1000'
|
||||
email: 'info@poalrahi.com'
|
||||
name: Mr. Rahi
|
||||
|
||||
|
||||
-
|
||||
Now I want to associate an object with the auction so for that I create an auction "Antique furniture exhibition"
|
||||
I create Account tax with 0.03 amount to give Buyer "3%" Commision.
|
||||
-
|
||||
!record {model: account.tax, id: account_tax_buyer0}:
|
||||
amount: 0.029999999999999999
|
||||
applicable_type: 'true'
|
||||
company_id: base.main_company
|
||||
domain: auction
|
||||
name: Buyer Costs(%3)
|
||||
sequence: 1
|
||||
type: percent
|
||||
type_tax_use: all
|
||||
-
|
||||
I create Account tax with 0.04 amount to give seller "4%" commision.
|
||||
-
|
||||
!record {model: account.tax, id: account_tax_sellercosts0}:
|
||||
amount: 0.040000000000000001
|
||||
applicable_type: 'true'
|
||||
company_id: base.main_company
|
||||
domain: auction
|
||||
name: Seller Costs(%4)
|
||||
sequence: 1
|
||||
type: percent
|
||||
type_tax_use: all
|
||||
|
||||
-
|
||||
Now I want to associate an object with the auction so for that I create an auction "Antique furniture exhibition" which
|
||||
start from 1 Aug to 31 Aug with Seller Commition 4%, buyer commition 3%.
|
||||
-
|
||||
!record {model: auction.dates, id: auction_dates_antiquefurnitureexhibition0}:
|
||||
acc_expense: account.a_pay
|
||||
acc_income: account.a_recv
|
||||
account_analytic_id: account.analytic_root
|
||||
auction1: '2010-05-20'
|
||||
auction2: '2010-05-21'
|
||||
expo1: '2010-05-18'
|
||||
expo2: '2010-05-19'
|
||||
auction1: '2010-08-01'
|
||||
auction2: '2010-08-31'
|
||||
expo1: '2010-08-01'
|
||||
expo2: '2010-08-31'
|
||||
journal_id: account.expenses_journal
|
||||
journal_seller_id: account.sales_journal
|
||||
name: Antique furniture exhibition
|
||||
|
||||
seller_costs:
|
||||
- auction.account_tax_sellercosts0
|
||||
buyer_costs:
|
||||
- auction.account_tax_buyer0
|
||||
-
|
||||
An object is being deposited for an auction,I create a seller's deposit record.
|
||||
An object is being deposited for an auction,I create a seller's deposit record with deposit cost.
|
||||
-
|
||||
!record {model: auction.deposit, id: auction_deposit_ad0}:
|
||||
date_dep: '2010-05-18'
|
||||
date_dep: '2010-08-01'
|
||||
method: keep
|
||||
name: AD/006
|
||||
partner_id: base.res_partner_9
|
||||
partner_id: res_partner_mrpinakin0
|
||||
specific_cost_ids:
|
||||
- account: auction.auction_expense
|
||||
amount: 200.0
|
||||
name: Transfer Cost
|
||||
-
|
||||
I create a new object wooden-chair which is to be auctioned.
|
||||
-
|
||||
!record {model: auction.lots, id: auction_lots_woodenchair0}:
|
||||
ach_uid: res_partner_markjohnson0
|
||||
ach_uid: res_partner_mrkjohnson0
|
||||
artist_id: auction_artists_vincentvangogh0
|
||||
auction_id: auction_dates_antiquefurnitureexhibition0
|
||||
bord_vnd_id: auction_deposit_ad0
|
||||
|
@ -87,18 +163,18 @@
|
|||
name2: antique wooden chair
|
||||
obj_num: 1
|
||||
obj_price: 4000.0
|
||||
obj_ret: 5000.0
|
||||
obj_ret: 0.0
|
||||
product_id: 'product_product_furniture0'
|
||||
state: draft
|
||||
vnd_lim: 5000.0
|
||||
-
|
||||
I create a bid for an object "wooden-chair" which is to be auctioned in Antique furniture exhibition.
|
||||
I create a bid for an object "wooden-chair" which is to be auctioned in Antique furniture exhibition bided by Mr.Patel.
|
||||
-
|
||||
!record {model: auction.bid, id: auction_bid_bid0}:
|
||||
auction_id: auction_dates_antiquefurnitureexhibition0
|
||||
contact_tel: (+32)2 211 34 83
|
||||
name: bid/001
|
||||
partner_id: res_partner_markjohnson0
|
||||
partner_id: res_partner_mrpatel0
|
||||
-
|
||||
I create a bid line.
|
||||
-
|
||||
|
@ -106,14 +182,15 @@
|
|||
auction: Antique furniture exhibition
|
||||
bid_id: auction_bid_bid0
|
||||
lot_id: auction.auction_lots_woodenchair0
|
||||
price: 3500.0
|
||||
price: 3100.0
|
||||
|
||||
-
|
||||
I create another bid for an object "wooden-chair" bided by a different partner
|
||||
I create another bid for an object "wooden-chair" bided by a Mr.poalrahi
|
||||
-
|
||||
!record {model: auction.bid, id: auction_bid_bid1}:
|
||||
auction_id: auction_dates_antiquefurnitureexhibition0
|
||||
name: bid/002
|
||||
partner_id: res_partner_markjohnson0
|
||||
partner_id: res_partner_poalrahi0
|
||||
-
|
||||
I create a bid line.
|
||||
-
|
||||
|
@ -122,7 +199,26 @@
|
|||
bid_id: 'auction_bid_bid1'
|
||||
call: 1
|
||||
lot_id: auction.auction_lots_woodenchair0
|
||||
price: 3200.0
|
||||
|
||||
-
|
||||
I create another bid for an object "wooden-chair" bided by a Mr.Johnson
|
||||
-
|
||||
!record {model: auction.bid, id: auction_bid_bid2}:
|
||||
auction_id: auction_dates_antiquefurnitureexhibition0
|
||||
name: bid/003
|
||||
partner_id: res_partner_mrkjohnson0
|
||||
-
|
||||
I create a bid line.
|
||||
-
|
||||
!record {model: auction.bid_line, id: auction_bid_line_2}:
|
||||
auction: Antique furniture exhibition
|
||||
bid_id: 'auction_bid_bid2'
|
||||
call: 1
|
||||
lot_id: auction.auction_lots_woodenchair0
|
||||
price: 4000.0
|
||||
-
|
||||
Mr. MarkJohnson bid are selected as Finallist Bid with 4000 Euro
|
||||
-
|
||||
I check that buyer price and seller price gets bind with the value
|
||||
-
|
||||
|
@ -130,23 +226,94 @@
|
|||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.buyer_price,auc_id.seller_price), _('Buyer price and seller price are not available!')
|
||||
|
||||
|
||||
-
|
||||
I check that a record gets created in the Auction's Summary.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id2=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
rep_auc_obj1 = self.pool.get('report.auction')
|
||||
ids2=rep_auc_obj1.search(cr, uid, [('auction', '=', auc_id2.auction_id.id)])
|
||||
assert ids2, _('No record found!')
|
||||
-
|
||||
An object has been sold,so I click on the "Sold" button.
|
||||
Now, An object has been sold,so I click on the "Sold" button.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
self.button_bought(cr, uid, [ref("auction_lots_woodenchair0")], {"lang": "en_US", "tz":
|
||||
False, "active_model": "ir.ui.menu", "active_ids": [ref("auction.auction_lots_woodenchair0")],
|
||||
"active_id": ref("auction.auction_lots_woodenchair0")})
|
||||
-
|
||||
I click on the "Create all invoices" button for all Objects in this Auction.
|
||||
-
|
||||
!python {model: auction.dates}: |
|
||||
self.close(cr, uid, [ref("auction.auction_dates_antiquefurnitureexhibition0")],
|
||||
{"active_model": "ir.ui.menu", "active_ids":
|
||||
[ref("auction.menu_auction_dates_next1")], "active_id": ref("auction.menu_auction_dates_next1")})
|
||||
-
|
||||
I check that a record gets created in the "Supplier Invoices".
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.sel_inv_id), _('Seller Invoice has not been created!')
|
||||
|
||||
-
|
||||
I create a buyer's invoice by using the "Invoice Buyer objects" wizard.
|
||||
-
|
||||
!record {model: auction.lots.make.invoice.buyer, id: auction_lots_make_invoice_buyer_0}:
|
||||
amount: 3090.0
|
||||
buyer_id: res_partner_mrkjohnson0
|
||||
number: 2010/003
|
||||
objects: 1
|
||||
-
|
||||
Then I click on the "Create Invoices" button.
|
||||
-
|
||||
!python {model: auction.lots.make.invoice.buyer}: |
|
||||
self.makeInvoices(cr, uid, [ref("auction_lots_make_invoice_buyer_0")], {"active_model": "auction.lots", "active_ids": [ref("auction_lots_woodenchair0")],
|
||||
"active_id": ref("auction_lots_woodenchair0"), })
|
||||
-
|
||||
I check that a "Buyer Invoice" field gets bind with the value.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.ach_inv_id), _('Buyer Invoice has not been created!')
|
||||
-
|
||||
Buyer Create a Invoice payment record by Click on "Pay Invoice" Button of Account invoice.
|
||||
-
|
||||
!record {model: account.invoice.pay, id: account_invoice_pay_furniture0}:
|
||||
amount: 4120.0
|
||||
date: '2010-08-06'
|
||||
journal_id: account.cash_journal
|
||||
name: Furniture
|
||||
period_id: account.period_8
|
||||
-
|
||||
Now Buyer want to make Full payment by click on "Full Payment" button of Account Invoice wizard.
|
||||
-
|
||||
!python {model: account.invoice.pay}: |
|
||||
obj_invoice = self.pool.get('account.invoice')
|
||||
obj_lots = self.pool.get('auction.lots')
|
||||
lots_id = obj_lots.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
invoice_ids = obj_invoice.search(cr, uid, [('id', '=', lots_id.ach_inv_id.id)])
|
||||
self.wo_check(cr, uid, [ref("account_invoice_pay_furniture0")], {"active_model": "account.invoice", "department_id": False,
|
||||
"record_id": 7, "search_default_draft": "1", "active_ids": invoice_ids,
|
||||
"active_id": invoice_ids[0]})
|
||||
-
|
||||
After Click on Full Payment Button, Creating a account invoice pay writeoff record.
|
||||
-
|
||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
||||
comment: Write-Off
|
||||
writeoff_acc_id: auction.auction_income_costs
|
||||
writeoff_journal_id: account.sales_journal
|
||||
-
|
||||
And click on "pay_and_reconcile_writeoff" button.
|
||||
-
|
||||
!python {model: account.invoice.pay.writeoff}: |
|
||||
obj_invoice = self.pool.get('account.invoice')
|
||||
obj_lots = self.pool.get('auction.lots')
|
||||
lots_id = obj_lots.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
invoice_ids = obj_invoice.search(cr, uid, [('id', '=', lots_id.ach_inv_id.id)])
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"active_model": "account.invoice", "department_id":
|
||||
False, "record_id": 7, "search_default_draft": "1", "active_ids": invoice_ids ,
|
||||
"active_id": invoice_ids[0], })
|
||||
-
|
||||
I check that "Buyer Invoice Reconciled" field is marked.
|
||||
-
|
||||
!assert {model: auction.lots, id: auction_lots_woodenchair0}:
|
||||
- paid_ach == True, 'Buyer Invoice should be Reconciled.'
|
||||
-
|
||||
I check that the order which was initially in the draft state has transit to sold state.
|
||||
-
|
||||
|
@ -154,7 +321,6 @@
|
|||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.state == 'sold'), _('State not changed!')
|
||||
|
||||
-
|
||||
Then I click on the Taken Away button.
|
||||
-
|
||||
|
@ -164,23 +330,28 @@
|
|||
"active_id": ref("auction.auction_all_objects_menu")})
|
||||
-
|
||||
I check that the order which was initially in the sold state has transit to taken away state.
|
||||
-
|
||||
!assert {model: auction.lots, id: auction_lots_woodenchair0}:
|
||||
- state == 'taken_away', "state is not taken Away"
|
||||
-
|
||||
In order to change the auction for an object I use the "Change auction date" wizard.
|
||||
This will Erase The Object Adjudication Price and Its Buyer!
|
||||
-
|
||||
!record {model: auction.lots.auction.move, id: auction_lots_auction_move_0}:
|
||||
auction_id: auction.auction_date_2
|
||||
-
|
||||
Then I click on the "Move to Auction date" button.
|
||||
-
|
||||
!python {model: auction.lots.auction.move}: |
|
||||
self.auction_move_set(cr, uid, [ref("auction_lots_auction_move_0")], {"lang":
|
||||
"en_US", "tz": False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_woodenchair0")],
|
||||
"active_id": ref("auction_lots_woodenchair0"), })
|
||||
-
|
||||
I check that a record gets created in the lot history.
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.state == 'taken_away'), _('State not changed!')
|
||||
-
|
||||
I click on the "Create all invoices" button
|
||||
-
|
||||
!python {model: auction.dates}: |
|
||||
self.close(cr, uid, [ref("auction.auction_dates_antiquefurnitureexhibition0")],
|
||||
{"lang": "en_US", "tz": False, "active_model": "ir.ui.menu", "active_ids":
|
||||
[ref("auction.menu_auction_dates_next1")], "active_id": ref("auction.menu_auction_dates_next1")})
|
||||
-
|
||||
I check that a record gets created in the "Supplier Invoices".
|
||||
-
|
||||
!python {model: auction.lots}: |
|
||||
from tools.translate import _
|
||||
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||
assert(auc_id.sel_inv_id), _('Seller Invoice has not been created!')
|
||||
|
||||
auc_lot_his=self.pool.get('auction.lot.history')
|
||||
ids=auc_lot_his.search(cr, uid, [('lot_id', '=', auc_id.id)])
|
||||
assert ids, _('Auction history does not exists!')
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Change Auction Date">
|
||||
<label string ="Warning, This will Erase The Object Adjudication Price and Its Buyer!" colspan="4"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string ="Warning, Erase The Object Adjudication Price and Its Buyer!" colspan="4"/>
|
||||
<separator string="Change Auction Date" colspan="4"/>
|
||||
<field name="auction_id"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4" col="4">
|
||||
|
|
|
@ -1500,6 +1500,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
|||
@param context: A standard dictionary for contextual values
|
||||
@return: List of Dictionary of form [{‘name_of_the_field’: value, ...}, ...]
|
||||
"""
|
||||
# FIXME This whole id mangling has to go!
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
|
|
|
@ -20,25 +20,8 @@
|
|||
##############################################################################
|
||||
|
||||
from document_webdav import webdav
|
||||
import tools
|
||||
from DAV.propfind import PROPFIND
|
||||
import urlparse
|
||||
urlparse.uses_netloc.append('caldav')
|
||||
urlparse.uses_netloc.append('caldavs')
|
||||
super_mk_prop_response = webdav.mk_prop_response
|
||||
def mk_prop_response(self,uri,good_props,bad_props,doc):
|
||||
res = super_mk_prop_response(self, uri,good_props,bad_props,doc)
|
||||
uris = uri.split('/')
|
||||
calendar = False
|
||||
if 'http://calendarserver.org/ns/' in good_props or 'http://calendarserver.org/ns/' in bad_props:
|
||||
calendar = True
|
||||
if calendar:
|
||||
ad = doc.createElement('calendar')
|
||||
ad.setAttribute('xmlns', 'urn:ietf:params:xml:ns:caldav')
|
||||
cols = res.getElementsByTagName('D:collection')
|
||||
if cols:
|
||||
cols[0].parentNode.appendChild(ad)
|
||||
#cols[0].parentNode.appendChild(vc)
|
||||
return res
|
||||
|
||||
PROPFIND.mk_prop_response = mk_prop_response
|
||||
#EOF
|
||||
|
|
|
@ -1,385 +1,390 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data noupdate="1">
|
||||
|
||||
<record model="document.directory" id="document.dir_calendars">
|
||||
<field name="name">Calendars</field>
|
||||
<field name="calendar_collection">True</field>
|
||||
</record>
|
||||
|
||||
<!-- Event attributes-->
|
||||
<!-- Event attributes-->
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_comment">
|
||||
<field name="name">comment</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
<record model="basic.calendar.attributes" id="field_event_comment">
|
||||
<field name="name">comment</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_organizer">
|
||||
<field name="name">organizer</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_uid">
|
||||
<field name="name">uid</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_seq">
|
||||
<field name="name">seq</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_recurrence-id">
|
||||
<field name="name">recurrence-id</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_transp">
|
||||
<field name="name">transp</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_attendee">
|
||||
<field name="name">attendee</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_related">
|
||||
<field name="name">related</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_rrule">
|
||||
<field name="name">rrule</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_dtend">
|
||||
<field name="name">dtend</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_valarm">
|
||||
<field name="name">valarm</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_vtimezone">
|
||||
<field name="name">vtimezone</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_priority">
|
||||
<field name="name">priority</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_location">
|
||||
<field name="name">location</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_exrule">
|
||||
<field name="name">exrule</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_resources">
|
||||
<field name="name">resources</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_rstatus">
|
||||
<field name="name">rstatus</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_status">
|
||||
<field name="name">status</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_exdate">
|
||||
<field name="name">exdate</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_dtstamp">
|
||||
<field name="name">dtstamp</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_description">
|
||||
<field name="name">description</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_rdate">
|
||||
<field name="name">rdate</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_dtstart">
|
||||
<field name="name">dtstart</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_class">
|
||||
<field name="name">class</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_x-openobject-model">
|
||||
<field name="name">x-openobject-model</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_created">
|
||||
<field name="name">created</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_url">
|
||||
<field name="name">url</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_summary">
|
||||
<field name="name">summary</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_contact">
|
||||
<field name="name">contact</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Todo attributes-->
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_status">
|
||||
<field name="name">status</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_comment">
|
||||
<field name="name">comment</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_attendee">
|
||||
<field name="name">attendee</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_valarm">
|
||||
<field name="name">valarm</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_description">
|
||||
<field name="name">description</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_seq">
|
||||
<field name="name">seq</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_vtimezone">
|
||||
<field name="name">vtimezone</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_url">
|
||||
<field name="name">url</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_completed">
|
||||
<field name="name">completed</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_percent">
|
||||
<field name="name">percent</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_due">
|
||||
<field name="name">due</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_summary">
|
||||
<field name="name">summary</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_priority">
|
||||
<field name="name">priority</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_exdate">
|
||||
<field name="name">exdate</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_location">
|
||||
<field name="name">location</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_exrule">
|
||||
<field name="name">exrule</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_duration">
|
||||
<field name="name">duration</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_organizer">
|
||||
<field name="name">organizer</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_dtstart">
|
||||
<field name="name">dtstart</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_rrule">
|
||||
<field name="name">rrule</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_class">
|
||||
<field name="name">class</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_uid">
|
||||
<field name="name">uid</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<!-- Attendee's attributes-->
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_cn">
|
||||
<field name="name">cn</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_sent-by">
|
||||
<field name="name">sent-by</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_language">
|
||||
<field name="name">language</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_delegated-from">
|
||||
<field name="name">delegated-from</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_member">
|
||||
<field name="name">member</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_cutype">
|
||||
<field name="name">cutype</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_role">
|
||||
<field name="name">role</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_partstat">
|
||||
<field name="name">partstat</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_delegated-to">
|
||||
<field name="name">delegated-to</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_dir">
|
||||
<field name="name">dir</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_rsvp">
|
||||
<field name="name">rsvp</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<!-- Alarm attributes-->
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_attendee">
|
||||
<field name="name">attendee</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_trigger_duration">
|
||||
<field name="name">trigger_duration</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_description">
|
||||
<field name="name">description</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_attach">
|
||||
<field name="name">attach</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_trigger_occurs">
|
||||
<field name="name">trigger_occurs</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_trigger_interval">
|
||||
<field name="name">trigger_interval</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_summary">
|
||||
<field name="name">summary</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_duration">
|
||||
<field name="name">duration</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_repeat">
|
||||
<field name="name">repeat</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_action">
|
||||
<field name="name">action</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_trigger_related">
|
||||
<field name="name">trigger_related</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
<field name="name">organizer</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_uid">
|
||||
<field name="name">uid</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_seq">
|
||||
<field name="name">seq</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_recurrence-id">
|
||||
<field name="name">recurrence-id</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_transp">
|
||||
<field name="name">transp</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_attendee">
|
||||
<field name="name">attendee</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_related">
|
||||
<field name="name">related</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_rrule">
|
||||
<field name="name">rrule</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_dtend">
|
||||
<field name="name">dtend</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_duration">
|
||||
<field name="name">duration</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_valarm">
|
||||
<field name="name">valarm</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_vtimezone">
|
||||
<field name="name">vtimezone</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_priority">
|
||||
<field name="name">priority</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_location">
|
||||
<field name="name">location</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_exrule">
|
||||
<field name="name">exrule</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_resources">
|
||||
<field name="name">resources</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_rstatus">
|
||||
<field name="name">rstatus</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_status">
|
||||
<field name="name">status</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_exdate">
|
||||
<field name="name">exdate</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_dtstamp">
|
||||
<field name="name">dtstamp</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_description">
|
||||
<field name="name">description</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_rdate">
|
||||
<field name="name">rdate</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_dtstart">
|
||||
<field name="name">dtstart</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_class">
|
||||
<field name="name">class</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_x-openobject-model">
|
||||
<field name="name">x-openobject-model</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_created">
|
||||
<field name="name">created</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_url">
|
||||
<field name="name">url</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_summary">
|
||||
<field name="name">summary</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_contact">
|
||||
<field name="name">contact</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Todo attributes-->
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_status">
|
||||
<field name="name">status</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_comment">
|
||||
<field name="name">comment</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_attendee">
|
||||
<field name="name">attendee</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_valarm">
|
||||
<field name="name">valarm</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_description">
|
||||
<field name="name">description</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_seq">
|
||||
<field name="name">sequence</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_vtimezone">
|
||||
<field name="name">vtimezone</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_url">
|
||||
<field name="name">url</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_completed">
|
||||
<field name="name">completed</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_percent">
|
||||
<field name="name">percent-complete</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_due">
|
||||
<field name="name">due</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_summary">
|
||||
<field name="name">summary</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_priority">
|
||||
<field name="name">priority</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_exdate">
|
||||
<field name="name">exdate</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_location">
|
||||
<field name="name">location</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_exrule">
|
||||
<field name="name">exrule</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_duration">
|
||||
<field name="name">duration</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_organizer">
|
||||
<field name="name">organizer</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_dtstart">
|
||||
<field name="name">dtstart</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_rrule">
|
||||
<field name="name">rrule</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_class">
|
||||
<field name="name">class</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_uid">
|
||||
<field name="name">uid</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
<!-- Attendee's attributes-->
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_cn">
|
||||
<field name="name">cn</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_sent-by">
|
||||
<field name="name">sent-by</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_language">
|
||||
<field name="name">language</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_delegated-from">
|
||||
<field name="name">delegated-from</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_member">
|
||||
<field name="name">member</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_cutype">
|
||||
<field name="name">cutype</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_role">
|
||||
<field name="name">role</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_partstat">
|
||||
<field name="name">partstat</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_delegated-to">
|
||||
<field name="name">delegated-to</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_dir">
|
||||
<field name="name">dir</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_attendee_rsvp">
|
||||
<field name="name">rsvp</field>
|
||||
<field name="type">attendee</field>
|
||||
</record>
|
||||
|
||||
<!-- Alarm attributes-->
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_attendee">
|
||||
<field name="name">attendee</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_trigger_duration">
|
||||
<field name="name">trigger_duration</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_description">
|
||||
<field name="name">description</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_attach">
|
||||
<field name="name">attach</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_trigger_occurs">
|
||||
<field name="name">trigger_occurs</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_trigger_interval">
|
||||
<field name="name">trigger_interval</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_summary">
|
||||
<field name="name">summary</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_duration">
|
||||
<field name="name">duration</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_repeat">
|
||||
<field name="name">repeat</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_action">
|
||||
<field name="name">action</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_alarm_trigger_related">
|
||||
<field name="name">trigger_related</field>
|
||||
<field name="type">alarm</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -24,7 +24,6 @@ from tools.translate import _
|
|||
import pooler
|
||||
import tools
|
||||
import time
|
||||
import base64
|
||||
from document import nodes
|
||||
import StringIO
|
||||
|
||||
|
@ -38,78 +37,48 @@ class node_database(nodes.node_database):
|
|||
domain = []
|
||||
domain2 = domain + [('calendar_collection','=', False)]
|
||||
res = super(node_database, self)._child_get(cr, name=name, parent_id=parent_id, domain=domain2)
|
||||
where = [('parent_id','=',parent_id)]
|
||||
domain2 = domain + [('calendar_collection','=', True)]
|
||||
where = [('parent_id','=',parent_id)]
|
||||
domain2 = domain + [('calendar_collection','=', True)]
|
||||
if name:
|
||||
where.append(('name','=',name))
|
||||
if domain2:
|
||||
where += domain2
|
||||
|
||||
where2 = where + [('type', '=', 'directory')]
|
||||
ids = dirobj.search(cr, uid, where2, context=ctx)
|
||||
for dirr in dirobj.browse(cr,uid,ids,context=ctx):
|
||||
ids = dirobj.search(cr, uid, where2, context=ctx)
|
||||
for dirr in dirobj.browse(cr,uid,ids,context=ctx):
|
||||
res.append(node_calendar_collection(dirr.name,self,self.context,dirr))
|
||||
return res
|
||||
|
||||
class node_calendar_collection(nodes.node_dir):
|
||||
PROPS = {
|
||||
"http://calendarserver.org/ns/" : ('getctag'),
|
||||
}
|
||||
M_NS = {
|
||||
class node_calendar_collection(nodes.node_dir):
|
||||
DAV_PROPS = {
|
||||
"http://calendarserver.org/ns/" : ('getctag',),
|
||||
}
|
||||
DAV_M_NS = {
|
||||
"http://calendarserver.org/ns/" : '_get_dav',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def get_dav_props(self, cr):
|
||||
return self.PROPS
|
||||
|
||||
|
||||
|
||||
def get_dav_eprop(self,cr, ns, propname):
|
||||
if self.M_NS.has_key(ns):
|
||||
prefix = self.M_NS[ns]
|
||||
else:
|
||||
print "No namespace:",ns, "( for prop:", propname,")"
|
||||
return None
|
||||
|
||||
mname = prefix + "_" + propname
|
||||
|
||||
if not hasattr(self, mname):
|
||||
return None
|
||||
|
||||
try:
|
||||
m = getattr(self, mname)
|
||||
r = m(cr)
|
||||
return r
|
||||
except AttributeError, e:
|
||||
print 'Property %s not supported' % propname
|
||||
print "Exception:", e
|
||||
return None
|
||||
http_options = { 'DAV': ['calendar-access'] }
|
||||
|
||||
def _file_get(self,cr, nodename=False):
|
||||
return []
|
||||
|
||||
|
||||
|
||||
|
||||
def _child_get(self, cr, name=False, parent_id=False, domain=None):
|
||||
def _child_get(self, cr, name=False, parent_id=False, domain=None):
|
||||
dirobj = self.context._dirobj
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
where = [('collection_id','=',self.dir_id)]
|
||||
ext = False
|
||||
if name:
|
||||
res = name.split('.ics')
|
||||
if len(res) > 1:
|
||||
name = res[0]
|
||||
ext = '.ics'
|
||||
if name:
|
||||
where = [('collection_id','=',self.dir_id)]
|
||||
ext = False
|
||||
if name and name.endswith('.ics'):
|
||||
name = name[-4]
|
||||
ext = '.ics'
|
||||
if name:
|
||||
where.append(('name','=',name))
|
||||
if not domain:
|
||||
domain = []
|
||||
domain = []
|
||||
where = where + domain
|
||||
fil_obj = dirobj.pool.get('basic.calendar')
|
||||
fil_obj = dirobj.pool.get('basic.calendar')
|
||||
ids = fil_obj.search(cr,uid,where,context=ctx)
|
||||
res = []
|
||||
for calender in fil_obj.browse(cr, uid, ids, context=ctx):
|
||||
|
@ -120,34 +89,21 @@ class node_calendar_collection(nodes.node_dir):
|
|||
return res
|
||||
|
||||
def _get_dav_owner(self, cr):
|
||||
# Todo?
|
||||
return False
|
||||
|
||||
|
||||
def get_etag(self, cr):
|
||||
""" Get a tag, unique per object + modification.
|
||||
|
||||
see. http://tools.ietf.org/html/rfc2616#section-13.3.3 """
|
||||
return self._get_ttag(cr) + ':' + self._get_wtag(cr)
|
||||
|
||||
def _get_wtag(self, cr):
|
||||
""" Return the modification time as a unique, compact string """
|
||||
if self.write_date:
|
||||
wtime = time.mktime(time.strptime(self.write_date, '%Y-%m-%d %H:%M:%S'))
|
||||
else: wtime = time.time()
|
||||
return str(wtime)
|
||||
|
||||
def _get_ttag(self, cr):
|
||||
return 'calendar collection-%d' % self.dir_id
|
||||
return 'calen-dir-%d' % self.dir_id
|
||||
|
||||
def _get_dav_getctag(self, cr):
|
||||
result = self.get_etag(cr)
|
||||
return str(result)
|
||||
|
||||
result = self.get_etag(cr)
|
||||
return str(result)
|
||||
|
||||
class node_calendar(nodes.node_class):
|
||||
our_type = 'collection'
|
||||
PROPS = {
|
||||
"http://calendarserver.org/ns/" : ('getctag'),
|
||||
class node_calendar(nodes.node_class):
|
||||
our_type = 'collection'
|
||||
DAV_PROPS = {
|
||||
"http://calendarserver.org/ns/" : ('getctag',),
|
||||
'http://groupdav.org/': ('resourcetype',),
|
||||
"urn:ietf:params:xml:ns:caldav" : (
|
||||
'calendar-description',
|
||||
'calendar-data',
|
||||
|
@ -155,10 +111,13 @@ class node_calendar(nodes.node_class):
|
|||
'calendar-user-address-set',
|
||||
'schedule-inbox-URL',
|
||||
'schedule-outbox-URL',)}
|
||||
M_NS = {
|
||||
"DAV:" : '_get_dav',
|
||||
DAV_M_NS = {
|
||||
"DAV:" : '_get_dav',
|
||||
'http://groupdav.org/': '_get_gdav',
|
||||
"http://calendarserver.org/ns/" : '_get_dav',
|
||||
"urn:ietf:params:xml:ns:caldav" : '_get_caldav'}
|
||||
"urn:ietf:params:xml:ns:caldav" : '_get_caldav'}
|
||||
|
||||
http_options = { 'DAV': ['calendar-access'] }
|
||||
|
||||
def __init__(self,path, parent, context, calendar):
|
||||
super(node_calendar,self).__init__(path, parent,context)
|
||||
|
@ -170,45 +129,34 @@ class node_calendar(nodes.node_class):
|
|||
self.displayname = calendar.name
|
||||
self.cal_type = calendar.type
|
||||
|
||||
def _get_dav_getctag(self, cr):
|
||||
def _get_dav_getctag(self, cr):
|
||||
result = self._get_ttag(cr) + ':' + str(time.time())
|
||||
return str(result)
|
||||
return str(result)
|
||||
|
||||
def match_dav_eprop(self, cr, match, ns, prop):
|
||||
if ns == "DAV:" and prop == "getetag":
|
||||
dirobj = self.context._dirobj
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
tem, dav_time = tuple(match.split(':'))
|
||||
model, res_id = tuple(tem.split('_'))
|
||||
model_obj = dirobj.pool.get(model)
|
||||
model = model_obj.browse(cr, uid, res_id, context=ctx)
|
||||
write_time = model.write_date or model.create_date
|
||||
wtime = time.mktime(time.strptime(write_time,'%Y-%m-%d %H:%M:%S'))
|
||||
if float(dav_time) == float(wtime):
|
||||
return True
|
||||
return False
|
||||
res = super(node_calendar, self).match_dav_eprop(cr, match, ns, prop)
|
||||
return res
|
||||
|
||||
|
||||
def get_domain(self, cr, filters):
|
||||
def get_dav_resourcetype(self, cr):
|
||||
res = [ ('collection', 'DAV:'),
|
||||
(str(self.cal_type + '-collection'), 'http://groupdav.org/'),
|
||||
('calendar', 'urn:ietf:params:xml:ns:caldav') ]
|
||||
return res
|
||||
|
||||
def get_domain(self, cr, filters):
|
||||
# TODO: doc.
|
||||
res = []
|
||||
dirobj = self.context._dirobj
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
calendar_obj = dirobj.pool.get('basic.calendar')
|
||||
# dirobj = self.context._dirobj
|
||||
#uid = self.context.uid
|
||||
#ctx = self.context.context.copy()
|
||||
#ctx.update(self.dctx)
|
||||
# calendar_obj = dirobj.pool.get('basic.calendar')
|
||||
if not filters:
|
||||
return res
|
||||
if filters.localName == 'calendar-query':
|
||||
if filters.localName == 'calendar-query':
|
||||
res = []
|
||||
for filter_child in filters.childNodes:
|
||||
if filter_child.nodeType == filter_child.TEXT_NODE:
|
||||
continue
|
||||
if filter_child.localName == 'filter':
|
||||
continue
|
||||
if filter_child.localName == 'filter':
|
||||
for vcalendar_filter in filter_child.childNodes:
|
||||
if vcalendar_filter.nodeType == vcalendar_filter.TEXT_NODE:
|
||||
if vcalendar_filter.nodeType == vcalendar_filter.TEXT_NODE:
|
||||
continue
|
||||
if vcalendar_filter.localName == 'comp-filter':
|
||||
if vcalendar_filter.getAttribute('name') == 'VCALENDAR':
|
||||
|
@ -216,10 +164,10 @@ class node_calendar(nodes.node_class):
|
|||
if vevent_filter.nodeType == vevent_filter.TEXT_NODE:
|
||||
continue
|
||||
if vevent_filter.localName == 'comp-filter':
|
||||
if vevent_filter.getAttribute('name') == 'VEVENT':
|
||||
if vevent_filter.getAttribute('name') == 'VEVENT':
|
||||
res = [('type','=','vevent')]
|
||||
if vevent_filter.getAttribute('name') == 'VTODO':
|
||||
res = [('type','=','vtodo')]
|
||||
res = [('type','=','vtodo')]
|
||||
return res
|
||||
elif filters.localName == 'calendar-multiget':
|
||||
names = []
|
||||
|
@ -229,105 +177,70 @@ class node_calendar(nodes.node_class):
|
|||
if filter_child.localName == 'href':
|
||||
if not filter_child.firstChild:
|
||||
continue
|
||||
uri = filter_child.firstChild.data
|
||||
uri = filter_child.firstChild.data
|
||||
caluri = uri.split('/')
|
||||
if len(caluri):
|
||||
caluri = caluri[-2]
|
||||
if caluri not in names : names.append(caluri)
|
||||
res = [('name','in',names)]
|
||||
return res
|
||||
return res
|
||||
return res
|
||||
|
||||
def children(self, cr, domain=None):
|
||||
def children(self, cr, domain=None):
|
||||
return self._child_get(cr, domain=domain)
|
||||
|
||||
def child(self,cr, name, domain=None):
|
||||
res = self._child_get(cr, name, domain=domain)
|
||||
def child(self,cr, name, domain=None):
|
||||
res = self._child_get(cr, name, domain=domain)
|
||||
if res:
|
||||
return res[0]
|
||||
return None
|
||||
return None
|
||||
|
||||
|
||||
def _child_get(self, cr, name=False, parent_id=False, domain=None):
|
||||
dirobj = self.context._dirobj
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
where = []
|
||||
if name:
|
||||
where.append(('id','=',int(name)))
|
||||
ctx.update(self.dctx)
|
||||
where = []
|
||||
if name:
|
||||
if name.endswith('.ics'):
|
||||
name = name[:-4]
|
||||
where.append(('id','=',int(name)))
|
||||
if not domain:
|
||||
domain = []
|
||||
#for opr1, opt, opr2 in domain:
|
||||
# if opr1 == 'type' and opr2 != self.cal_type:
|
||||
# return []
|
||||
|
||||
fil_obj = dirobj.pool.get('basic.calendar')
|
||||
fil_obj = dirobj.pool.get('basic.calendar')
|
||||
ids = fil_obj.search(cr, uid, domain)
|
||||
res = []
|
||||
if self.calendar_id in ids:
|
||||
res = fil_obj.get_calendar_objects(cr, uid, [self.calendar_id], self, domain=where, context=ctx)
|
||||
return res
|
||||
res = fil_obj.get_calendar_objects(cr, uid, [self.calendar_id], self, domain=where, context=ctx)
|
||||
return res
|
||||
|
||||
|
||||
|
||||
def get_dav_props(self, cr):
|
||||
return self.PROPS
|
||||
|
||||
def get_dav_eprop(self,cr, ns, propname):
|
||||
if self.M_NS.has_key(ns):
|
||||
prefix = self.M_NS[ns]
|
||||
else:
|
||||
print "No namespace:",ns, "( for prop:", propname,")"
|
||||
return None
|
||||
propname = propname.replace('-','_')
|
||||
mname = prefix + "_" + propname
|
||||
if not hasattr(self, mname):
|
||||
return None
|
||||
|
||||
try:
|
||||
m = getattr(self, mname)
|
||||
r = m(cr)
|
||||
return r
|
||||
except AttributeError, e:
|
||||
print 'Property %s not supported' % propname
|
||||
print "Exception:", e
|
||||
return None
|
||||
|
||||
|
||||
def create_child(self,cr,path,data):
|
||||
def create_child(self, cr, path, data):
|
||||
""" API function to create a child file object and node
|
||||
Return the node_* created
|
||||
"""
|
||||
return self.set_data(cr, data)
|
||||
# we ignore the path, it will be re-generated automatically
|
||||
res = self.set_data(cr, data)
|
||||
|
||||
# TODO: use the res to create at least one node
|
||||
return None
|
||||
|
||||
|
||||
def set_data(self, cr, data, fil_obj = None):
|
||||
uid = self.context.uid
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
return calendar_obj.import_cal(cr, uid, base64.encodestring(data), self.calendar_id)
|
||||
res = calendar_obj.import_cal(cr, uid, data, self.calendar_id)
|
||||
return res
|
||||
|
||||
def get_data_len(self, cr, fil_obj = None):
|
||||
def get_data_len(self, cr, fil_obj = None):
|
||||
return self.content_length
|
||||
|
||||
|
||||
def _get_ttag(self,cr):
|
||||
return 'calendar-%d' % (self.calendar_id,)
|
||||
|
||||
|
||||
|
||||
def get_etag(self, cr):
|
||||
""" Get a tag, unique per object + modification.
|
||||
|
||||
see. http://tools.ietf.org/html/rfc2616#section-13.3.3 """
|
||||
return self._get_ttag(cr) + ':' + self._get_wtag(cr)
|
||||
|
||||
def _get_wtag(self, cr):
|
||||
""" Return the modification time as a unique, compact string """
|
||||
if self.write_date:
|
||||
wtime = time.mktime(time.strptime(self.write_date, '%Y-%m-%d %H:%M:%S'))
|
||||
else: wtime = time.time()
|
||||
return str(wtime)
|
||||
return 'calendar-%d' % (self.calendar_id,)
|
||||
|
||||
def rmcol(self, cr):
|
||||
return False
|
||||
|
@ -335,7 +248,7 @@ class node_calendar(nodes.node_class):
|
|||
|
||||
class res_node_calendar(nodes.node_class):
|
||||
our_type = 'file'
|
||||
PROPS = {
|
||||
DAV_PROPS = {
|
||||
"http://calendarserver.org/ns/" : ('getctag'),
|
||||
"urn:ietf:params:xml:ns:caldav" : (
|
||||
'calendar-description',
|
||||
|
@ -344,76 +257,54 @@ class res_node_calendar(nodes.node_class):
|
|||
'calendar-user-address-set',
|
||||
'schedule-inbox-URL',
|
||||
'schedule-outbox-URL',)}
|
||||
M_NS = {
|
||||
DAV_M_NS = {
|
||||
"http://calendarserver.org/ns/" : '_get_dav',
|
||||
"urn:ietf:params:xml:ns:caldav" : '_get_caldav'}
|
||||
"urn:ietf:params:xml:ns:caldav" : '_get_caldav'}
|
||||
|
||||
http_options = { 'DAV': ['calendar-access'] }
|
||||
|
||||
def __init__(self,path, parent, context, res_obj, res_model=None, res_id=None):
|
||||
super(res_node_calendar,self).__init__(path, parent, context)
|
||||
super(res_node_calendar,self).__init__(path, parent, context)
|
||||
self.mimetype = 'text/calendar'
|
||||
self.create_date = parent.create_date
|
||||
self.write_date = parent.write_date or parent.create_date
|
||||
self.calendar_id = hasattr(parent, 'calendar_id') and parent.calendar_id or False
|
||||
if res_obj:
|
||||
if not self.calendar_id: self.calendar_id = res_obj.id
|
||||
self.create_date = res_obj.create_date
|
||||
self.write_date = res_obj.write_date or res_obj.create_date
|
||||
pr = res_obj.perm_read()[0]
|
||||
self.create_date = pr.get('create_date')
|
||||
self.write_date = pr.get('write_date') or pr.get('create_date')
|
||||
self.displayname = res_obj.name
|
||||
|
||||
self.content_length = 0
|
||||
|
||||
|
||||
self.model = res_model
|
||||
self.res_id = res_id
|
||||
|
||||
|
||||
def open(self, cr, mode=False):
|
||||
uid = self.context.uid
|
||||
uid = self.context.uid
|
||||
if self.type in ('collection','database'):
|
||||
return False
|
||||
s = StringIO.StringIO(self.get_data(cr))
|
||||
return False
|
||||
s = StringIO.StringIO(self.get_data(cr))
|
||||
s.name = self
|
||||
return s
|
||||
return s
|
||||
|
||||
|
||||
|
||||
def get_dav_props(self, cr):
|
||||
return self.PROPS
|
||||
|
||||
def get_dav_eprop(self,cr, ns, propname):
|
||||
if self.M_NS.has_key(ns):
|
||||
prefix = self.M_NS[ns]
|
||||
else:
|
||||
print "No namespace:",ns, "( for prop:", propname,")"
|
||||
return None
|
||||
propname = propname.replace('-','_')
|
||||
mname = prefix + "_" + propname
|
||||
if not hasattr(self, mname):
|
||||
return None
|
||||
|
||||
try:
|
||||
m = getattr(self, mname)
|
||||
r = m(cr)
|
||||
return r
|
||||
except AttributeError, e:
|
||||
print 'Property %s not supported' % propname
|
||||
print "Exception:", e
|
||||
return None
|
||||
|
||||
|
||||
def get_data(self, cr, fil_obj = None):
|
||||
def get_data(self, cr, fil_obj = None):
|
||||
uid = self.context.uid
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
context = self.context.context.copy()
|
||||
context.update({'model': self.model, 'res_id':self.res_id})
|
||||
res = calendar_obj.export_cal(cr, uid, [self.calendar_id], context=context)
|
||||
context = self.context.context.copy()
|
||||
context.update({'model': self.model, 'res_id':self.res_id})
|
||||
res = calendar_obj.export_cal(cr, uid, [self.calendar_id], context=context)
|
||||
return res
|
||||
|
||||
def get_data_len(self, cr, fil_obj = None):
|
||||
def get_data_len(self, cr, fil_obj = None):
|
||||
return self.content_length
|
||||
|
||||
def set_data(self, cr, data, fil_obj = None):
|
||||
uid = self.context.uid
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
return calendar_obj.import_cal(cr, uid, base64.encodestring(data), self.calendar_id)
|
||||
res = calendar_obj.import_cal(cr, uid, data, self.calendar_id)
|
||||
return res
|
||||
|
||||
def _get_ttag(self,cr):
|
||||
res = False
|
||||
|
@ -423,30 +314,28 @@ class res_node_calendar(nodes.node_class):
|
|||
res = '%d' % (self.calendar_id)
|
||||
return res
|
||||
|
||||
|
||||
|
||||
def _get_caldav_calendar_data(self, cr):
|
||||
def _get_caldav_calendar_data(self, cr):
|
||||
return self.get_data(cr)
|
||||
|
||||
|
||||
|
||||
def _get_caldav_calendar_description(self, cr):
|
||||
uid = self.context.uid
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
ctx.update(self.dctx)
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
return calendar.description
|
||||
|
||||
|
||||
|
||||
def _get_caldav_calendar_home_set(self, cr):
|
||||
import xml.dom.minidom
|
||||
import urllib
|
||||
import urllib
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
huri = doc.createTextNode(urllib.quote('/%s/%s' % (cr.dbname, calendar.collection_id.name)))
|
||||
href = doc.documentElement
|
||||
|
@ -461,7 +350,7 @@ class res_node_calendar(nodes.node_class):
|
|||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
user_obj = self.context._dirobj.pool.get('res.users')
|
||||
user = user_obj.browse(cr, uid, uid, context=ctx)
|
||||
user = user_obj.browse(cr, uid, uid, context=ctx)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
href = doc.documentElement
|
||||
href.tagName = 'D:href'
|
||||
|
@ -472,11 +361,11 @@ class res_node_calendar(nodes.node_class):
|
|||
|
||||
def _get_caldav_schedule_inbox_URL(self, cr):
|
||||
import xml.dom.minidom
|
||||
import urllib
|
||||
import urllib
|
||||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar_obj = self.context._dirobj.pool.get('basic.calendar')
|
||||
calendar = calendar_obj.browse(cr, uid, self.calendar_id, context=ctx)
|
||||
res = '%s/%s' %(calendar.name, calendar.collection_id.name)
|
||||
doc = xml.dom.minidom.getDOMImplementation().createDocument(None, 'href', None)
|
||||
|
@ -491,31 +380,15 @@ class res_node_calendar(nodes.node_class):
|
|||
uid = self.context.uid
|
||||
res = False
|
||||
if self.type in ('collection','database'):
|
||||
return False
|
||||
if self.model and self.res_id:
|
||||
return False
|
||||
if self.model and self.res_id:
|
||||
document_obj = self.context._dirobj.pool.get(self.model)
|
||||
if document_obj:
|
||||
res = False
|
||||
#res = document_obj.unlink(cr, uid, [self.res_id]) #TOFIX
|
||||
|
||||
return res
|
||||
|
||||
res = document_obj.unlink(cr, uid, [self.res_id])
|
||||
|
||||
return res
|
||||
|
||||
def _get_caldav_schedule_outbox_URL(self, cr):
|
||||
return self._get_caldav_schedule_inbox_URL(cr)
|
||||
|
||||
|
||||
def get_etag(self, cr):
|
||||
""" Get a tag, unique per object + modification.
|
||||
|
||||
see. http://tools.ietf.org/html/rfc2616#section-13.3.3 """
|
||||
return self._get_ttag(cr) + ':' + self._get_wtag(cr)
|
||||
|
||||
def _get_wtag(self, cr):
|
||||
""" Return the modification time as a unique, compact string """
|
||||
if self.write_date:
|
||||
wtime = time.mktime(time.strptime(self.write_date, '%Y-%m-%d %H:%M:%S'))
|
||||
else: wtime = time.time()
|
||||
return str(wtime)
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_calendar_collection_form">
|
||||
<field name="name">Calendar Collections : Form</field>
|
||||
<field name="model">document.directory</field>
|
||||
|
@ -17,10 +17,10 @@
|
|||
<record model="ir.ui.view" id="view_calendar_collection_tree">
|
||||
<field name="name">Calendar Collections : Tree</field>
|
||||
<field name="model">document.directory</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Calendar Collections" toolbar="1">
|
||||
<field name="name"/>
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="create_date"/>
|
||||
<field name="write_date"/>
|
||||
|
@ -73,34 +73,34 @@
|
|||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="user_id"/>
|
||||
<field name="collection_id" required="1"/>
|
||||
<field name="collection_id" required="1"/>
|
||||
<field name="line_ids" mode="form,tree" colspan="4" nolabel="1">
|
||||
<form string="Calendar Lines">
|
||||
<field name="name" required="1" select="1" />
|
||||
<field name="object_id" required="1" select="1" />
|
||||
<field name="domain" select="1" />
|
||||
<field name="mapping_ids" select="1" colspan="4" nolabel="1">
|
||||
<tree string="Attributes Mapping" editable="bottom">
|
||||
<field name="name" required="1" domain="[('type', '=', parent.name)]"/>
|
||||
<field name="fn" select="1" />
|
||||
<field name="field_id" select="1" required="1" domain="[('model_id', '=', parent.object_id)]" />
|
||||
<field name="expr" />
|
||||
</tree>
|
||||
<form string="Attributes Mapping">
|
||||
<field name="name" select="1" required="1" domain="[('type', '=', parent.name)]"/>
|
||||
<field name="field_id" select="1" domain="[('model_id', '=', parent.object_id)]"
|
||||
required="1" />
|
||||
<field name="fn" select="1" required="1" />
|
||||
<field name="expr" />
|
||||
<separator string="Value Mapping" colspan="4" />
|
||||
<field name="mapping" select="1" colspan="4" nolabel="1" />
|
||||
</form>
|
||||
</field>
|
||||
</form>
|
||||
<form string="Calendar Lines">
|
||||
<field name="name" required="1" select="1" />
|
||||
<field name="object_id" required="1" select="1" />
|
||||
<field name="domain" select="1" />
|
||||
<field name="mapping_ids" select="1" colspan="4" nolabel="1">
|
||||
<tree string="Attributes Mapping" editable="bottom">
|
||||
<field name="name" required="1" domain="[('type', '=', parent.name)]"/>
|
||||
<field name="fn" select="1" />
|
||||
<field name="field_id" select="1" required="1" domain="[('model_id', '=', parent.object_id)]" />
|
||||
<field name="expr" />
|
||||
</tree>
|
||||
<form string="Attributes Mapping">
|
||||
<field name="name" select="1" required="1" domain="[('type', '=', parent.name)]"/>
|
||||
<field name="field_id" select="1" domain="[('model_id', '=', parent.object_id)]"
|
||||
required="1" />
|
||||
<field name="fn" select="1" required="1" />
|
||||
<field name="expr" />
|
||||
<separator string="Value Mapping" colspan="4" />
|
||||
<field name="mapping" select="1" colspan="4" nolabel="1" />
|
||||
</form>
|
||||
</field>
|
||||
</form>
|
||||
<tree string="Calendar Lines" editable="bottom">
|
||||
<field name="name" select="1" />
|
||||
<field name="object_id" select="1" />
|
||||
</tree>
|
||||
<field name="name" select="1" />
|
||||
<field name="object_id" select="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -110,11 +110,11 @@
|
|||
<record model="ir.ui.view" id="view_caldav_tree">
|
||||
<field name="name">Calendar : Tree</field>
|
||||
<field name="model">basic.calendar</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Calendars" toolbar="1">
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="user_id"/>
|
||||
<field name="create_date"/>
|
||||
<field name="write_date"/>
|
||||
|
@ -127,8 +127,8 @@
|
|||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">basic.calendar</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record id="action_caldav_view1" model="ir.actions.act_window.view">
|
||||
<field eval="10" name="sequence"/>
|
||||
|
@ -147,5 +147,5 @@
|
|||
action="action_caldav_form"
|
||||
id="menu_caldav_directories"
|
||||
parent="menu_calendar"/>
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -24,7 +24,6 @@ from dateutil import parser
|
|||
from dateutil.rrule import *
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
import base64
|
||||
import math
|
||||
import pooler
|
||||
import pytz
|
||||
|
@ -52,6 +51,8 @@ def uid2openobjectid(cr, uidval, oomodel, rdate):
|
|||
@param rdate: Get Recurrent Date
|
||||
"""
|
||||
__rege = re.compile(r'OpenObject-([\w|\.]+)_([0-9]+)@(\w+)$')
|
||||
if not uidval:
|
||||
return (False, None)
|
||||
wematch = __rege.match(uidval.encode('utf8'))
|
||||
if not wematch:
|
||||
return (False, None)
|
||||
|
@ -133,7 +134,7 @@ def map_data(cr, uid, obj, context=None):
|
|||
continue
|
||||
mapping = obj.__attribute__[map_dict].get('mapping', False)
|
||||
if mapping:
|
||||
map_val = mapping[map_val.lower()]
|
||||
map_val = mapping.get(map_val.lower(), False)
|
||||
else:
|
||||
map_val = map_val.lower()
|
||||
if field_type == 'many2many':
|
||||
|
@ -229,7 +230,8 @@ class CalDAV(object):
|
|||
att_data = []
|
||||
for cal_data in child.getChildren():
|
||||
if cal_data.name.lower() == 'organizer':
|
||||
self.ical_set(cal_data.name.lower(), {'name':cal_data.params['CN']}, 'value')
|
||||
self.ical_set(cal_data.name.lower(), {'name': cal_data.params.get('CN') and cal_data.params.get('CN')[0]}, 'value')
|
||||
continue
|
||||
if cal_data.name.lower() == 'attendee':
|
||||
ctx = context.copy()
|
||||
if cal_children:
|
||||
|
@ -381,7 +383,7 @@ class CalDAV(object):
|
|||
raise osv.except_osv(('Error !'), (str(e)))
|
||||
return ids
|
||||
|
||||
def export_cal(self, cr, uid, datas, vobj=None, context={}):
|
||||
def export_cal(self, cr, uid, datas, vobj=None, context=None):
|
||||
""" Export Calendar
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
|
@ -396,7 +398,7 @@ class CalDAV(object):
|
|||
self.create_ics(cr, uid, datas, vobj, ical, context=context)
|
||||
return ical
|
||||
except Exception, e:
|
||||
raise osv.except_osv(('Error !'), (str(e)))
|
||||
raise # osv.except_osv(('Error !'), (str(e)))
|
||||
|
||||
def import_cal(self, cr, uid, content, data_id=None, context=None):
|
||||
""" Import Calendar
|
||||
|
@ -407,7 +409,7 @@ class CalDAV(object):
|
|||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
|
||||
ical_data = base64.decodestring(content)
|
||||
ical_data = content
|
||||
self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, context)
|
||||
parsedCal = vobject.readOne(ical_data)
|
||||
res = []
|
||||
|
@ -447,8 +449,8 @@ class Calendar(CalDAV, osv.osv):
|
|||
'type': fields.selection([('vevent', 'Event'), ('vtodo', 'TODO')], \
|
||||
string="Type", size=64),
|
||||
'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines'),
|
||||
'create_date': fields.datetime('Created Date'),
|
||||
'write_date': fields.datetime('Modifided Date'),
|
||||
'create_date': fields.datetime('Created Date', readonly=True),
|
||||
'write_date': fields.datetime('Modifided Date', readonly=True),
|
||||
}
|
||||
|
||||
def get_calendar_objects(self, cr, uid, ids, parent=None, domain=None, context=None):
|
||||
|
@ -473,17 +475,16 @@ class Calendar(CalDAV, osv.osv):
|
|||
data_ids = mod_obj.search(cr, uid, line_domain, context=context)
|
||||
for data in mod_obj.browse(cr, uid, data_ids, context):
|
||||
ctx = parent and parent.context or None
|
||||
node = res_node_calendar('%s' %data.id, parent, ctx, data, line.object_id.model, data.id)
|
||||
node = res_node_calendar('%s.ics' %data.id, parent, ctx, data, line.object_id.model, data.id)
|
||||
res.append(node)
|
||||
return res
|
||||
|
||||
def export_cal(self, cr, uid, ids, vobj='vevent', context=None):
|
||||
""" Export Calendar
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of calendar’s IDs
|
||||
@param context: A standard dictionary for contextual values
|
||||
@param vobj: the type of object to export
|
||||
|
||||
@return the ical data.
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
@ -521,7 +522,7 @@ class Calendar(CalDAV, osv.osv):
|
|||
if not context:
|
||||
context = {}
|
||||
vals = []
|
||||
ical_data = base64.decodestring(content)
|
||||
ical_data = content
|
||||
parsedCal = vobject.readOne(ical_data)
|
||||
if not data_id:
|
||||
data_id = self.search(cr, uid, [])[0]
|
||||
|
@ -541,14 +542,19 @@ class Calendar(CalDAV, osv.osv):
|
|||
val = self.parse_ics(cr, uid, child, cal_children=cal_children, context=context)
|
||||
vals.append(val)
|
||||
objs.append(cal_children[child.name.lower()])
|
||||
|
||||
res = []
|
||||
for obj_name in list(set(objs)):
|
||||
obj = self.pool.get(obj_name)
|
||||
if hasattr(obj, 'check_import'):
|
||||
obj.check_import(cr, uid, vals, context=context)
|
||||
r = obj.check_import(cr, uid, vals, context=context)
|
||||
checked = True
|
||||
res.extend(r)
|
||||
|
||||
if not checked:
|
||||
self.check_import(cr, uid, vals, context=context)
|
||||
return {}
|
||||
r = self.check_import(cr, uid, vals, context=context)
|
||||
res.extend(r)
|
||||
return res
|
||||
Calendar()
|
||||
|
||||
|
||||
|
@ -632,6 +638,10 @@ class basic_calendar_fields(osv.osv):
|
|||
'fn': lambda *a: 'field',
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
( 'name_type_uniq', 'UNIQUE(name, type_id)', 'Can not map a field more than once'),
|
||||
]
|
||||
|
||||
def check_line(self, cr, uid, vals, name, context=None):
|
||||
""" check calendar's line
|
||||
@param self: The object pointer
|
||||
|
@ -667,12 +677,6 @@ class basic_calendar_fields(osv.osv):
|
|||
name = name[0]
|
||||
if name in ('valarm', 'attendee'):
|
||||
self.check_line(cr, uid, vals, name, context=context)
|
||||
cr.execute("Select count(id) from basic_calendar_fields \
|
||||
where name=%s and type_id=%s" % (vals.get('name'), vals.get('type_id')))
|
||||
res = cr.fetchone()
|
||||
if res:
|
||||
if res[0] > 0:
|
||||
raise osv.except_osv(_('Warning !'), _('Can not map the field more than once'))
|
||||
return super(basic_calendar_fields, self).create(cr, uid, vals, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
|
@ -691,13 +695,6 @@ class basic_calendar_fields(osv.osv):
|
|||
name = field.name.name
|
||||
if name in ('valarm', 'attendee'):
|
||||
self.check_line(cr, uid, vals, name, context=context)
|
||||
qry = "Select count(id) from basic_calendar_fields \
|
||||
where name=%s and type_id=%s" % (field.name.id, field.type_id.id)
|
||||
cr.execute(qry)
|
||||
res = cr.fetchone()
|
||||
if res:
|
||||
if res[0] > 1:
|
||||
raise osv.except_osv(_('Warning !'), _('Can not map same field more than once'))
|
||||
return super(basic_calendar_fields, self).write(cr, uid, ids, vals, context)
|
||||
|
||||
basic_calendar_fields()
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_calendar_event_export" model="ir.ui.view">
|
||||
<record id="view_calendar_event_export" model="ir.ui.view">
|
||||
<field name="name">calendar.event.export.form</field>
|
||||
<field name="model">calendar.event.export</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Export ICS">
|
||||
<group colspan="4" >
|
||||
<field name="name"/>
|
||||
<field name="file_path" colspan="4" width="300"/>
|
||||
<group colspan="4" >
|
||||
<field name="name"/>
|
||||
<field name="file_path" colspan="4" width="300"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string=""/>
|
||||
<button icon="gtk-close" special="cancel" string="_Close"/>
|
||||
<label string=""/>
|
||||
<button icon="gtk-close" special="cancel" string="_Close"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</record>
|
||||
|
||||
<record id="action_calendar_event_export" model="ir.actions.act_window">
|
||||
<field name="name">Export .ics File</field>
|
||||
<field name="res_model">calendar.event.export</field>
|
||||
|
@ -30,10 +30,10 @@
|
|||
</record>
|
||||
|
||||
|
||||
<act_window id="action_calendar_event_export_values"
|
||||
key2="client_action_multi" name="Export .ics File"
|
||||
res_model="calendar.event.export" src_model="basic.calendar"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
<act_window id="action_calendar_event_export_values"
|
||||
key2="client_action_multi" name="Export .ics File"
|
||||
res_model="calendar.event.export" src_model="basic.calendar"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -51,7 +51,7 @@ class calendar_event_import(osv.osv_memory):
|
|||
id2 = data_obj._get_id(cr, uid, 'caldav', 'view_calendar_event_import_display')
|
||||
if id2:
|
||||
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
vals = model_obj.import_cal(cr, uid, data['file_path'], context['active_id'], context)
|
||||
vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
|
||||
global cnt
|
||||
if vals:
|
||||
cnt = len(vals)
|
||||
|
|
|
@ -1,42 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_calendar_event_import" model="ir.ui.view">
|
||||
<record id="view_calendar_event_import" model="ir.ui.view">
|
||||
<field name="name">calendar.event.import.form</field>
|
||||
<field name="model">calendar.event.import</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Import ICS">
|
||||
<group colspan="4" >
|
||||
<separator string="Select ICS file"/>
|
||||
<field name="file_path" colspan="4" width="300" nolabel="1"/>
|
||||
<group colspan="4" >
|
||||
<separator string="Select ICS file"/>
|
||||
<field name="file_path" colspan="4" width="300" nolabel="1"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-ok" name="process_imp_ics" string="_Import" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-ok" name="process_imp_ics" string="_Import" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_calendar_event_import_display" model="ir.ui.view">
|
||||
</record>
|
||||
|
||||
<record id="view_calendar_event_import_display" model="ir.ui.view">
|
||||
<field name="name">calendar.event.import.form.display</field>
|
||||
<field name="model">calendar.event.import</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Import Message">
|
||||
<group colspan="4" >
|
||||
<field name="msg" colspan="4" width="300" nolabel="1"/>
|
||||
<group colspan="4" >
|
||||
<field name="msg" colspan="4" width="300" nolabel="1"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4">
|
||||
<button icon="gtk-ok" special="cancel" string="Ok"/>
|
||||
<button icon="gtk-ok" special="cancel" string="Ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</record>
|
||||
|
||||
<record id="action_calendar_event_import" model="ir.actions.act_window">
|
||||
<field name="name">Import .ics File</field>
|
||||
<field name="res_model">calendar.event.import</field>
|
||||
|
@ -47,9 +47,9 @@
|
|||
</record>
|
||||
|
||||
<act_window id="action_calendar_event_import_values"
|
||||
key2="client_action_multi" name="Import .ics File"
|
||||
res_model="calendar.event.import" src_model="basic.calendar"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
|
||||
key2="client_action_multi" name="Import .ics File"
|
||||
res_model="calendar.event.import" src_model="basic.calendar"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,42 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_calendar_event_subscribe" model="ir.ui.view">
|
||||
<record id="view_calendar_event_subscribe" model="ir.ui.view">
|
||||
<field name="name">calendar.event.subscribe.form</field>
|
||||
<field name="model">calendar.event.subscribe</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Subscribe to Remote Calendar">
|
||||
<group colspan="4" >
|
||||
<separator string="Provide path for Remote Calendar"/>
|
||||
<field name="url_path" colspan="4" width="300" nolabel="1" widget="url"/>
|
||||
<group colspan="4" >
|
||||
<separator string="Provide path for Remote Calendar"/>
|
||||
<field name="url_path" colspan="4" width="300" nolabel="1" widget="url"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-ok" name="process_imp_ics" string="_Subscribe" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-ok" name="process_imp_ics" string="_Subscribe" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_calendar_event_subscribe_display" model="ir.ui.view">
|
||||
</record>
|
||||
|
||||
<record id="view_calendar_event_subscribe_display" model="ir.ui.view">
|
||||
<field name="name">calendar.event.subscribe.form.display</field>
|
||||
<field name="model">calendar.event.subscribe</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Message...">
|
||||
<group colspan="4" >
|
||||
<field name="msg" colspan="4" width="300" nolabel="1"/>
|
||||
<group colspan="4" >
|
||||
<field name="msg" colspan="4" width="300" nolabel="1"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4">
|
||||
<button icon="gtk-ok" special="cancel" string="Ok"/>
|
||||
<button icon="gtk-ok" special="cancel" string="Ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</record>
|
||||
|
||||
<record id="action_calendar_event_subscribe" model="ir.actions.act_window">
|
||||
<field name="name">Subscribe</field>
|
||||
<field name="res_model">calendar.event.subscribe</field>
|
||||
|
@ -47,9 +47,9 @@
|
|||
</record>
|
||||
|
||||
<act_window id="action_calendar_event_subscribe_values"
|
||||
key2="client_action_multi" name="Subscribe"
|
||||
res_model="calendar.event.subscribe" src_model="basic.calendar"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
key2="client_action_multi" name="Subscribe"
|
||||
res_model="calendar.event.subscribe" src_model="basic.calendar"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -105,6 +105,7 @@ class crm_lead(osv.osv, crm_case):
|
|||
select=True, help="Optional linked partner, usually after conversion of the lead"),
|
||||
|
||||
# From crm.case
|
||||
'id': fields.integer('ID'),
|
||||
'name': fields.char('Name', size=64),
|
||||
'active': fields.boolean('Active', required=False),
|
||||
'date_action_last': fields.datetime('Last Action', readonly=1),
|
||||
|
|
|
@ -35,6 +35,7 @@ class crm_phonecall(osv.osv, crm_case):
|
|||
_inherit = ['mailgate.thread']
|
||||
_columns = {
|
||||
# From crm.case
|
||||
'id': fields.integer('ID'),
|
||||
'name': fields.char('Name', size=64),
|
||||
'active': fields.boolean('Active', required=False),
|
||||
'date_action_last': fields.datetime('Last Action', readonly=1),
|
||||
|
|
|
@ -8,13 +8,13 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2010-01-05 05:59+0000\n"
|
||||
"PO-Revision-Date: 2010-08-03 04:22+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-07 02:19+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: Finnish <fi@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:38+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: crm
|
||||
|
|
|
@ -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: 2010-01-05 05:59+0000\n"
|
||||
"PO-Revision-Date: 2010-08-03 04:35+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-07 03:00+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <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:38+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: crm
|
||||
|
|
|
@ -115,7 +115,6 @@ class crm_claim(osv.osv, crm.crm_case):
|
|||
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
|
||||
data = {'partner_address_id': addr['contact']}
|
||||
data.update(self.onchange_partner_address_id(cr, uid, ids, addr['contact'])['value'])
|
||||
print data
|
||||
return {'value': data}
|
||||
|
||||
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
|
||||
|
|
|
@ -44,6 +44,20 @@ from StringIO import StringIO
|
|||
# root: if we are at the first directory of a ressource
|
||||
#
|
||||
|
||||
def _str2time(cre):
|
||||
""" Convert a string with time representation (from db) into time (float)
|
||||
|
||||
Note: a place to fix if datetime is used in db.
|
||||
"""
|
||||
if not cre:
|
||||
return time.time()
|
||||
frac = 0.0
|
||||
if isinstance(cre, basestring) and '.' in cre:
|
||||
fdot = cre.find('.')
|
||||
frac = float(cre[fdot:])
|
||||
cre = cre[:fdot]
|
||||
return time.mktime(time.strptime(cre,'%Y-%m-%d %H:%M:%S')) + frac
|
||||
|
||||
def get_node_context(cr, uid, context):
|
||||
return node_context(cr, uid, context)
|
||||
|
||||
|
@ -157,6 +171,8 @@ class node_class(object):
|
|||
Nodes have attributes which contain usual file properties
|
||||
"""
|
||||
our_type = 'baseclass'
|
||||
DAV_PROPS = None
|
||||
DAV_M_NS = None
|
||||
|
||||
def __init__(self, path, parent, context):
|
||||
assert isinstance(context,node_context)
|
||||
|
@ -253,24 +269,21 @@ class node_class(object):
|
|||
see. http://tools.ietf.org/html/rfc2616#section-13.3.3 """
|
||||
return self._get_ttag(cr) + ':' + self._get_wtag(cr)
|
||||
|
||||
def _get_wtag(self,cr):
|
||||
def _get_wtag(self, cr):
|
||||
""" Return the modification time as a unique, compact string """
|
||||
if self.write_date:
|
||||
wtime = time.mktime(time.strptime(self.write_date,'%Y-%m-%d %H:%M:%S'))
|
||||
else: wtime = time.time()
|
||||
return str(wtime)
|
||||
return str(_str2time(self.write_date))
|
||||
|
||||
def _get_ttag(self,cr):
|
||||
""" Get a unique tag for this type/id of object.
|
||||
Must be overriden, so that each node is uniquely identified.
|
||||
"""
|
||||
print "node_class.get_ttag()",self
|
||||
raise RuntimeError("get_etag stub()")
|
||||
raise NotImplementedError("get_etag stub()")
|
||||
|
||||
def get_dav_props(self, cr):
|
||||
""" If this class has special behaviour for GroupDAV etc, export
|
||||
its capabilities """
|
||||
return {}
|
||||
return self.DAV_PROPS or {}
|
||||
|
||||
def match_dav_eprop(self, cr, match, ns, prop):
|
||||
res = self.get_dav_eprop(cr, ns, prop)
|
||||
|
@ -279,8 +292,36 @@ class node_class(object):
|
|||
return False
|
||||
|
||||
def get_dav_eprop(self, cr, ns, prop):
|
||||
if not self.DAV_M_NS:
|
||||
return None
|
||||
|
||||
if self.DAV_M_NS.has_key(ns):
|
||||
prefix = self.DAV_M_NS[ns]
|
||||
else:
|
||||
logger.debug('No namespace: %s ("%s")',ns, prop)
|
||||
return None
|
||||
|
||||
mname = prefix + "_" + prop.replace('-','_')
|
||||
|
||||
if not hasattr(self, mname):
|
||||
return None
|
||||
|
||||
try:
|
||||
m = getattr(self, mname)
|
||||
r = m(cr)
|
||||
return r
|
||||
except AttributeError:
|
||||
logger.debug('Property %s not supported' % prop, exc_info=True)
|
||||
return None
|
||||
|
||||
def get_dav_resourcetype(self, cr):
|
||||
""" Get the DAV resource type.
|
||||
|
||||
Is here because some nodes may exhibit special behaviour, like
|
||||
CalDAV/GroupDAV collections
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False):
|
||||
""" Move this node to a new parent directory.
|
||||
@param ndir_node the collection that this node should be moved under
|
||||
|
@ -327,6 +368,7 @@ class node_class(object):
|
|||
raise NotImplementedError(repr(self))
|
||||
|
||||
def get_domain(self, cr, filters):
|
||||
# TODO Document
|
||||
return []
|
||||
|
||||
def check_perms(self, perms):
|
||||
|
@ -422,6 +464,9 @@ class node_database(node_class):
|
|||
def _get_ttag(self,cr):
|
||||
return 'db-%s' % cr.dbname
|
||||
|
||||
def get_dav_resourcetype(self, cr):
|
||||
return ('collection', 'DAV:')
|
||||
|
||||
def mkdosname(company_name, default='noname'):
|
||||
""" convert a string to a dos-like name"""
|
||||
if not company_name:
|
||||
|
@ -573,19 +618,6 @@ class node_dir(node_database):
|
|||
fnode.set_data(cr, data, fil)
|
||||
return fnode
|
||||
|
||||
def get_etag(self, cr):
|
||||
""" Get a tag, unique per object + modification.
|
||||
|
||||
see. http://tools.ietf.org/html/rfc2616#section-13.3.3 """
|
||||
return self._get_ttag(cr) + ':' + self._get_wtag(cr)
|
||||
|
||||
def _get_wtag(self, cr):
|
||||
""" Return the modification time as a unique, compact string """
|
||||
if self.write_date:
|
||||
wtime = time.mktime(time.strptime(self.write_date, '%Y-%m-%d %H:%M:%S'))
|
||||
else: wtime = time.time()
|
||||
return str(wtime)
|
||||
|
||||
def _get_ttag(self,cr):
|
||||
return 'dir-%d' % self.dir_id
|
||||
|
||||
|
@ -757,6 +789,9 @@ class node_res_dir(node_class):
|
|||
def _get_ttag(self,cr):
|
||||
return 'rdir-%d' % self.dir_id
|
||||
|
||||
def get_dav_resourcetype(self, cr):
|
||||
return ('collection', 'DAV:')
|
||||
|
||||
class node_res_obj(node_class):
|
||||
""" A special sibling to node_dir, which does only contain dynamically
|
||||
created folders foreach resource in the foreign model.
|
||||
|
@ -1013,6 +1048,9 @@ class node_res_obj(node_class):
|
|||
def _get_ttag(self,cr):
|
||||
return 'rodir-%d-%d' % (self.dir_id, self.res_id)
|
||||
|
||||
def get_dav_resourcetype(self, cr):
|
||||
return ('collection', 'DAV:')
|
||||
|
||||
class node_file(node_class):
|
||||
our_type = 'file'
|
||||
def __init__(self, path, parent, context, fil):
|
||||
|
@ -1147,6 +1185,9 @@ class node_file(node_class):
|
|||
def _get_ttag(self,cr):
|
||||
return 'file-%d' % self.file_id
|
||||
|
||||
def get_dav_resourcetype(self, cr):
|
||||
return ''
|
||||
|
||||
def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False):
|
||||
if ndir_node.context != self.context:
|
||||
raise NotImplementedError("Cannot move files between contexts")
|
||||
|
@ -1292,6 +1333,8 @@ class node_content(node_class):
|
|||
def _get_ttag(self,cr):
|
||||
return 'cnt-%d%s' % (self.cnt_id,(self.act_id and ('-' + str(self.act_id))) or '')
|
||||
|
||||
def get_dav_resourcetype(self, cr):
|
||||
return ''
|
||||
|
||||
class nodefd_content(StringIO, node_descriptor):
|
||||
""" A descriptor to content nodes
|
||||
|
|
|
@ -46,6 +46,10 @@ CACHE_SIZE=20000
|
|||
urlparse.uses_netloc.append('webdav')
|
||||
urlparse.uses_netloc.append('webdavs')
|
||||
|
||||
day_names = { 0: 'Mon', 1: 'Tue' , 2: 'Wed', 3: 'Thu', 4: 'Fri', 5: 'Sat', 6: 'Sun' }
|
||||
month_names = { 1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun',
|
||||
7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' }
|
||||
|
||||
class DAV_NotFound2(DAV_NotFound):
|
||||
"""404 exception, that accepts our list uris
|
||||
"""
|
||||
|
@ -55,6 +59,19 @@ class DAV_NotFound2(DAV_NotFound):
|
|||
args = (path, )
|
||||
DAV_NotFound.__init__(self, *args)
|
||||
|
||||
|
||||
def _str2time(cre):
|
||||
""" Convert a string with time representation (from db) into time (float)
|
||||
"""
|
||||
if not cre:
|
||||
return time.time()
|
||||
frac = 0.0
|
||||
if isinstance(cre, basestring) and '.' in cre:
|
||||
fdot = cre.find('.')
|
||||
frac = float(cre[fdot:])
|
||||
cre = cre[:fdot]
|
||||
return time.mktime(time.strptime(cre,'%Y-%m-%d %H:%M:%S')) + frac
|
||||
|
||||
class openerp_dav_handler(dav_interface):
|
||||
"""
|
||||
This class models a OpenERP interface for the DAV server
|
||||
|
@ -79,20 +96,21 @@ class openerp_dav_handler(dav_interface):
|
|||
return props
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if node:
|
||||
props = props.copy()
|
||||
props.update(node.get_dav_props(cr))
|
||||
cr.close()
|
||||
return props
|
||||
|
||||
def _try_function(self, funct, args, opname='run function', cr=None,
|
||||
default_exc=DAV_Forbidden):
|
||||
def _try_function(self, funct, args, opname='run function', cr=None,
|
||||
default_exc=DAV_Forbidden):
|
||||
""" Try to run a function, and properly convert exceptions to DAV ones.
|
||||
|
||||
|
||||
@objname the name of the operation being performed
|
||||
@param cr if given, the cursor to close at exceptions
|
||||
"""
|
||||
|
||||
|
||||
try:
|
||||
funct(*args)
|
||||
return funct(*args)
|
||||
except DAV_Error:
|
||||
if cr: cr.close()
|
||||
raise
|
||||
|
@ -111,7 +129,7 @@ class openerp_dav_handler(dav_interface):
|
|||
raise default_exc(err.strerror)
|
||||
except Exception,e:
|
||||
import traceback
|
||||
self.parent.log_error("Cannot create %s: %s", opname, str(e))
|
||||
self.parent.log_error("Cannot %s: %s", opname, str(e))
|
||||
self.parent.log_message("Exc: %s",traceback.format_exc())
|
||||
raise default_exc("Operation failed")
|
||||
|
||||
|
@ -122,6 +140,8 @@ class openerp_dav_handler(dav_interface):
|
|||
raise DAV_NotFound
|
||||
|
||||
def match_prop(self, uri, match, ns, propname):
|
||||
if self.M_NS.has_key(ns):
|
||||
return match == dav_interface.get_prop(self, uri, ns, propname)
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
if cr: cr.close()
|
||||
|
@ -134,6 +154,37 @@ class openerp_dav_handler(dav_interface):
|
|||
cr.close()
|
||||
return res
|
||||
|
||||
def prep_http_options(self, uri, opts):
|
||||
"""see HttpOptions._prep_OPTIONS """
|
||||
self.parent.log_message('get options: %s' % uri)
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri, allow_last=True)
|
||||
|
||||
if not dbname:
|
||||
if cr: cr.close()
|
||||
return opts
|
||||
node = self.uri2object(cr, uid, pool, uri2[:])
|
||||
|
||||
if not node:
|
||||
if cr: cr.close()
|
||||
return opts
|
||||
else:
|
||||
if hasattr(node, 'http_options'):
|
||||
ret = opts.copy()
|
||||
for key, val in node.http_options.items():
|
||||
if isinstance(val, basestring):
|
||||
val = [val, ]
|
||||
if key in ret:
|
||||
ret[key] = ret[key][:] # copy the orig. array
|
||||
else:
|
||||
ret[key] = []
|
||||
ret[key].extend(val)
|
||||
|
||||
self.parent.log_message('options: %s' % ret)
|
||||
else:
|
||||
ret = opts
|
||||
cr.close()
|
||||
return ret
|
||||
|
||||
def get_prop(self, uri, ns, propname):
|
||||
""" return the value of a given property
|
||||
|
||||
|
@ -159,18 +210,18 @@ class openerp_dav_handler(dav_interface):
|
|||
"""Parse the uri and get the dbname and the rest.
|
||||
Db name should be the first component in the unix-like
|
||||
path supplied in uri.
|
||||
|
||||
|
||||
@param rest_ret Instead of the db_name, return (db_name, rest),
|
||||
where rest is the remaining path
|
||||
@param allow_last If the dbname is the last component in the
|
||||
path, allow it to be resolved. The default False value means
|
||||
we will not attempt to use the db, unless there is more
|
||||
path.
|
||||
|
||||
|
||||
@return db_name or (dbname, rest) depending on rest_ret,
|
||||
will return dbname=False when component is not found.
|
||||
"""
|
||||
|
||||
|
||||
uri2 = self.uri2local(uri)
|
||||
if uri2.startswith('/'):
|
||||
uri2 = uri2[1:]
|
||||
|
@ -294,7 +345,7 @@ class openerp_dav_handler(dav_interface):
|
|||
try:
|
||||
if not dbname:
|
||||
raise DAV_Error, 409
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if not node:
|
||||
raise DAV_NotFound2(uri2)
|
||||
try:
|
||||
|
@ -319,19 +370,22 @@ class openerp_dav_handler(dav_interface):
|
|||
if cr: cr.close()
|
||||
|
||||
@memoize(CACHE_SIZE)
|
||||
def _get_dav_resourcetype(self,uri):
|
||||
def _get_dav_resourcetype(self, uri):
|
||||
""" return type of object """
|
||||
self.parent.log_message('get RT: %s' % uri)
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
try:
|
||||
if not dbname:
|
||||
return COLLECTION
|
||||
node = self.uri2object(cr,uid,pool, uri2)
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if not node:
|
||||
raise DAV_NotFound2(uri2)
|
||||
if node.type in ('collection','database'):
|
||||
return COLLECTION
|
||||
return OBJECT
|
||||
try:
|
||||
return node.get_dav_resourcetype(cr)
|
||||
except NotImplementedError:
|
||||
if node.type in ('collection','database'):
|
||||
return ('collection', 'DAV:')
|
||||
return ''
|
||||
finally:
|
||||
if cr: cr.close()
|
||||
|
||||
|
@ -339,11 +393,11 @@ class openerp_dav_handler(dav_interface):
|
|||
self.parent.log_message('get DN: %s' % uri)
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
cr.close()
|
||||
if cr: cr.close()
|
||||
return COLLECTION
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if not node:
|
||||
cr.close()
|
||||
if cr: cr.close()
|
||||
raise DAV_NotFound2(uri2)
|
||||
cr.close()
|
||||
return node.displayname
|
||||
|
@ -359,7 +413,7 @@ class openerp_dav_handler(dav_interface):
|
|||
return str(result)
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if not node:
|
||||
cr.close()
|
||||
if cr: cr.close()
|
||||
raise DAV_NotFound2(uri2)
|
||||
result = node.content_length or 0
|
||||
cr.close()
|
||||
|
@ -372,34 +426,41 @@ class openerp_dav_handler(dav_interface):
|
|||
result = 0
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
cr.close()
|
||||
if cr: cr.close()
|
||||
return '0'
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if not node:
|
||||
cr.close()
|
||||
raise DAV_NotFound2(uri2)
|
||||
result = node.get_etag(cr)
|
||||
result = self._try_function(node.get_etag ,(cr,), "etag %s" %uri, cr=cr)
|
||||
cr.close()
|
||||
return str(result)
|
||||
|
||||
@memoize(CACHE_SIZE)
|
||||
def get_lastmodified(self, uri):
|
||||
""" return the last modified date of the object """
|
||||
today = time.time()
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
return today
|
||||
return time.time()
|
||||
try:
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if not node:
|
||||
raise DAV_NotFound2(uri2)
|
||||
if node.write_date:
|
||||
return time.mktime(time.strptime(node.write_date,'%Y-%m-%d %H:%M:%S'))
|
||||
else:
|
||||
return today
|
||||
return _str2time(node.write_date)
|
||||
finally:
|
||||
if cr: cr.close()
|
||||
|
||||
def _get_dav_getlastmodified(self,uri):
|
||||
""" return the last modified date of a resource
|
||||
"""
|
||||
d=self.get_lastmodified(uri)
|
||||
# format it. Note that we explicitly set the day, month names from
|
||||
# an array, so that strftime() doesn't use its own locale-aware
|
||||
# strings.
|
||||
gmt = time.gmtime(d)
|
||||
return time.strftime("%%s, %d %%s %Y %H:%M:%S GMT", gmt ) % \
|
||||
(day_names[gmt.tm_wday], month_names[gmt.tm_mon])
|
||||
|
||||
@memoize(CACHE_SIZE)
|
||||
def get_creationdate(self, uri):
|
||||
""" return the last modified date of the object """
|
||||
|
@ -410,11 +471,8 @@ class openerp_dav_handler(dav_interface):
|
|||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if not node:
|
||||
raise DAV_NotFound2(uri2)
|
||||
if node.create_date:
|
||||
result = time.mktime(time.strptime(node.create_date,'%Y-%m-%d %H:%M:%S'))
|
||||
else:
|
||||
result = time.time()
|
||||
return result
|
||||
|
||||
return _str2time(node.create_date)
|
||||
finally:
|
||||
if cr: cr.close()
|
||||
|
||||
|
@ -423,6 +481,7 @@ class openerp_dav_handler(dav_interface):
|
|||
self.parent.log_message('get contenttype: %s' % uri)
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
if cr: cr.close()
|
||||
return 'httpd/unix-directory'
|
||||
try:
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
|
@ -441,10 +500,10 @@ class openerp_dav_handler(dav_interface):
|
|||
self.parent.log_message('MKCOL: %s' % uri)
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not uri2[-1]:
|
||||
cr.close()
|
||||
if cr: cr.close()
|
||||
raise DAV_Error(409, "Cannot create nameless collection")
|
||||
if not dbname:
|
||||
cr.close()
|
||||
if cr: cr.close()
|
||||
raise DAV_Error, 409
|
||||
node = self.uri2object(cr,uid,pool, uri2[:-1])
|
||||
if not node:
|
||||
|
@ -466,10 +525,11 @@ class openerp_dav_handler(dav_interface):
|
|||
parent='/'.join(uri.split('/')[:-1])
|
||||
cr, uid, pool,dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
if cr: cr.close()
|
||||
raise DAV_Forbidden
|
||||
try:
|
||||
node = self.uri2object(cr, uid, pool, uri2[:])
|
||||
except:
|
||||
except Exception:
|
||||
node = False
|
||||
|
||||
objname = uri2[-1]
|
||||
|
@ -481,7 +541,7 @@ class openerp_dav_handler(dav_interface):
|
|||
cr.close()
|
||||
raise DAV_NotFound('Parent folder not found')
|
||||
|
||||
self._try_function(dir_node.create_child, (cr, objname, data),
|
||||
self._try_function(dir_node.create_child, (cr, objname, data),
|
||||
"create %s" % objname, cr=cr)
|
||||
else:
|
||||
self._try_function(node.set_data, (cr, data), "save %s" % objname, cr=cr)
|
||||
|
@ -494,9 +554,11 @@ class openerp_dav_handler(dav_interface):
|
|||
""" delete a collection """
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
if cr: cr.close()
|
||||
raise DAV_Error, 409
|
||||
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
node.rmcol(cr)
|
||||
self._try_function(node.rmcol, (cr,), "rmcol %s" % uri, cr=cr)
|
||||
|
||||
cr.commit()
|
||||
cr.close()
|
||||
|
@ -505,11 +567,12 @@ class openerp_dav_handler(dav_interface):
|
|||
def rm(self,uri):
|
||||
cr, uid, pool,dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
cr.close()
|
||||
if cr: cr.close()
|
||||
raise DAV_Error, 409
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
res = node.rm(cr)
|
||||
res = self._try_function(node.rm, (cr,), "rm %s" % uri, cr=cr)
|
||||
if not res:
|
||||
if cr: cr.close()
|
||||
raise OSError(1, 'Operation not permited.')
|
||||
cr.commit()
|
||||
cr.close()
|
||||
|
@ -671,7 +734,7 @@ class openerp_dav_handler(dav_interface):
|
|||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if node:
|
||||
result = True
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
cr.close()
|
||||
return result
|
||||
|
@ -679,6 +742,17 @@ class openerp_dav_handler(dav_interface):
|
|||
@memoize(CACHE_SIZE)
|
||||
def is_collection(self, uri):
|
||||
""" test if the given uri is a collection """
|
||||
return self._get_dav_resourcetype(uri)==COLLECTION
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
try:
|
||||
if not dbname:
|
||||
return True
|
||||
node = self.uri2object(cr,uid,pool, uri2)
|
||||
if not node:
|
||||
raise DAV_NotFound2(uri2)
|
||||
if node.type in ('collection','database'):
|
||||
return True
|
||||
return False
|
||||
finally:
|
||||
if cr: cr.close()
|
||||
|
||||
#eof
|
||||
|
|
|
@ -30,21 +30,88 @@ import tools
|
|||
|
||||
|
||||
super_mk_prop_response = PROPFIND.mk_prop_response
|
||||
def mk_prop_response(self, uri, good_props, bad_props, doc):
|
||||
""" make a new <prop> result element
|
||||
def mk_prop_response(self, uri, good_props, bad_props, doc):
|
||||
""" make a new <prop> result element
|
||||
|
||||
We differ between the good props and the bad ones for
|
||||
each generating an extra <propstat>-Node (for each error
|
||||
one, that means).
|
||||
|
||||
"""
|
||||
|
||||
"""
|
||||
re=doc.createElement("D:response")
|
||||
# append namespaces to response
|
||||
nsnum=0
|
||||
for nsname in self.namespaces:
|
||||
namespaces = self.namespaces
|
||||
if 'DAV:' in namespaces:
|
||||
namespaces.remove('DAV:')
|
||||
for nsname in namespaces:
|
||||
re.setAttribute("xmlns:ns"+str(nsnum),nsname)
|
||||
nsnum=nsnum+1
|
||||
|
||||
|
||||
def _prop_child(xnode, ns, prop, value):
|
||||
"""Append a property xml node to xnode, with <prop>value</prop>
|
||||
|
||||
And a little smarter than that, it will consider namespace and
|
||||
also allow nested properties etc.
|
||||
|
||||
:param ns the namespace of the <prop/> node
|
||||
:param prop the name of the property
|
||||
:param value the value. Can be:
|
||||
string: text node
|
||||
tuple ('elem', 'ns') for empty sub-node <ns:elem />
|
||||
tuple ('elem', 'ns', sub-elems) for sub-node with elements
|
||||
list, of above tuples
|
||||
"""
|
||||
if ns == 'DAV:':
|
||||
ns_prefix = 'D:'
|
||||
else:
|
||||
ns_prefix="ns"+str(namespaces.index(ns))+":"
|
||||
|
||||
pe=doc.createElement(ns_prefix+str(prop))
|
||||
if hasattr(value, '__class__') and value.__class__.__name__ == 'Element':
|
||||
pe.appendChild(value)
|
||||
else:
|
||||
if ns == 'DAV:' and prop=="resourcetype" and isinstance(value, int):
|
||||
# hack, to go..
|
||||
if value == 1:
|
||||
ve=doc.createElement("D:collection")
|
||||
pe.appendChild(ve)
|
||||
else:
|
||||
_prop_elem_child(pe, ns, value, ns_prefix)
|
||||
|
||||
xnode.appendChild(pe)
|
||||
|
||||
def _prop_elem_child(pnode, pns, v, pns_prefix):
|
||||
|
||||
if isinstance(v, list):
|
||||
for vit in v:
|
||||
_prop_elem_child(pnode, pns, vit, pns_prefix)
|
||||
elif isinstance(v,tuple):
|
||||
need_ns = False
|
||||
if v[1] == pns:
|
||||
ns_prefix = pns_prefix
|
||||
elif v[1] == 'DAV:':
|
||||
ns_prefix = 'D:'
|
||||
elif v[1] in namespaces:
|
||||
ns_prefix="ns"+str(namespaces.index(v[1]))+":"
|
||||
else:
|
||||
# namespaces.append(v[1])
|
||||
# nsnum += 1
|
||||
ns_prefix="ns"+str(nsnum)+":"
|
||||
need_ns = True
|
||||
|
||||
ve=doc.createElement(ns_prefix+v[0])
|
||||
if need_ns:
|
||||
ve.setAttribute("xmlns:ns"+str(nsnum), v[1])
|
||||
if len(v) > 2 and isinstance(v[2], list):
|
||||
# support nested elements like:
|
||||
# ( 'elem', 'ns:', [('sub-elem1', 'ns1'), ...]
|
||||
_prop_elem_child(ve, v[1], v[2], ns_prefix)
|
||||
pnode.appendChild(ve)
|
||||
else:
|
||||
ve=doc.createTextNode(tools.ustr(v))
|
||||
pnode.appendChild(ve)
|
||||
|
||||
# write href information
|
||||
uparts=urlparse.urlparse(uri)
|
||||
fileloc=uparts[2]
|
||||
|
@ -64,24 +131,15 @@ def mk_prop_response(self, uri, good_props, bad_props, doc):
|
|||
|
||||
gp=doc.createElement("D:prop")
|
||||
for ns in good_props.keys():
|
||||
ns_prefix="ns"+str(self.namespaces.index(ns))+":"
|
||||
for p,v in good_props[ns].items():
|
||||
if ns == 'DAV:':
|
||||
ns_prefix = 'D:'
|
||||
else:
|
||||
ns_prefix="ns"+str(namespaces.index(ns))+":"
|
||||
for p,v in good_props[ns].items():
|
||||
if not v:
|
||||
pass
|
||||
pe=doc.createElement(ns_prefix+str(p))
|
||||
if hasattr(v, '__class__') and v.__class__.__name__ == 'Element':
|
||||
pe.appendChild(v)
|
||||
else:
|
||||
if p=="resourcetype":
|
||||
if v==1:
|
||||
ve=doc.createElement("D:collection")
|
||||
pe.appendChild(ve)
|
||||
else:
|
||||
ve=doc.createTextNode(tools.ustr(v))
|
||||
pe.appendChild(ve)
|
||||
continue
|
||||
_prop_child(gp, ns, p, v)
|
||||
|
||||
gp.appendChild(pe)
|
||||
|
||||
ps.appendChild(gp)
|
||||
s=doc.createElement("D:status")
|
||||
t=doc.createTextNode("HTTP/1.1 200 OK")
|
||||
|
@ -100,12 +158,15 @@ def mk_prop_response(self, uri, good_props, bad_props, doc):
|
|||
ps.appendChild(bp)
|
||||
|
||||
for ns in bad_props[ecode].keys():
|
||||
ns_prefix="ns"+str(self.namespaces.index(ns))+":"
|
||||
|
||||
if ns == 'DAV:':
|
||||
ns_prefix='D:'
|
||||
else:
|
||||
ns_prefix="ns"+str(self.namespaces.index(ns))+":"
|
||||
|
||||
for p in bad_props[ecode][ns]:
|
||||
pe=doc.createElement(ns_prefix+str(p))
|
||||
bp.appendChild(pe)
|
||||
|
||||
|
||||
s=doc.createElement("D:status")
|
||||
t=doc.createTextNode(utils.gen_estring(ecode))
|
||||
s.appendChild(t)
|
||||
|
@ -114,10 +175,10 @@ def mk_prop_response(self, uri, good_props, bad_props, doc):
|
|||
|
||||
# return the new response element
|
||||
return re
|
||||
|
||||
|
||||
|
||||
def mk_propname_response(self,uri,propnames,doc):
|
||||
""" make a new <prop> result element for a PROPNAME request
|
||||
""" make a new <prop> result element for a PROPNAME request
|
||||
|
||||
This will simply format the propnames list.
|
||||
propnames should have the format {NS1 : [prop1, prop2, ...], NS2: ...}
|
||||
|
@ -143,16 +204,20 @@ def mk_propname_response(self,uri,propnames,doc):
|
|||
for ns,plist in propnames.items():
|
||||
# write prop element
|
||||
pr=doc.createElement("D:prop")
|
||||
nsp="ns"+str(nsnum)
|
||||
pr.setAttribute("xmlns:"+nsp,ns)
|
||||
nsnum=nsnum+1
|
||||
if ns == 'DAV':
|
||||
nsp = 'D'
|
||||
else:
|
||||
nsp="ns"+str(nsnum)
|
||||
ps.setAttribute("xmlns:"+nsp,ns)
|
||||
nsnum=nsnum+1
|
||||
|
||||
# write propertynames
|
||||
for p in plist:
|
||||
pe=doc.createElement(nsp+":"+p)
|
||||
pr.appendChild(pe)
|
||||
# write propertynames
|
||||
for p in plist:
|
||||
pe=doc.createElement(nsp+":"+p)
|
||||
pr.appendChild(pe)
|
||||
|
||||
ps.appendChild(pr)
|
||||
|
||||
ps.appendChild(pr)
|
||||
re.appendChild(ps)
|
||||
|
||||
return re
|
||||
|
|
|
@ -32,12 +32,13 @@ import tools
|
|||
from dav_fs import openerp_dav_handler
|
||||
from tools.config import config
|
||||
from DAV.WebDAVServer import DAVRequestHandler
|
||||
from service.websrv_lib import HTTPDir,FixSendError
|
||||
from service.websrv_lib import HTTPDir, FixSendError, HttpOptions
|
||||
from BaseHTTPServer import BaseHTTPRequestHandler
|
||||
import urlparse
|
||||
import urllib
|
||||
from string import atoi,split
|
||||
from DAV.errors import *
|
||||
# from DAV.constants import DAV_VERSION_1, DAV_VERSION_2
|
||||
|
||||
def OpenDAVConfig(**kw):
|
||||
class OpenDAV:
|
||||
|
@ -53,10 +54,15 @@ def OpenDAVConfig(**kw):
|
|||
return Config()
|
||||
|
||||
|
||||
class DAVHandler(FixSendError,DAVRequestHandler):
|
||||
class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
|
||||
verbose = False
|
||||
protocol_version = 'HTTP/1.1'
|
||||
|
||||
_HTTP_OPTIONS= { 'DAV' : ['1',],
|
||||
'Allow' : [ 'GET', 'HEAD', 'COPY', 'MOVE', 'POST', 'PUT',
|
||||
'PROPFIND', 'PROPPATCH', 'OPTIONS', 'MKCOL',
|
||||
'DELETE', 'TRACE', 'REPORT', ]
|
||||
}
|
||||
|
||||
def get_userinfo(self,user,pw):
|
||||
return False
|
||||
def _log(self, message):
|
||||
|
@ -99,6 +105,21 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
|||
def log_error(self, format, *args):
|
||||
netsvc.Logger().notifyChannel('xmlrpc', netsvc.LOG_WARNING, format % args)
|
||||
|
||||
def _prep_OPTIONS(self, opts):
|
||||
ret = opts
|
||||
dc=self.IFACE_CLASS
|
||||
uri=urlparse.urljoin(self.get_baseuri(dc), self.path)
|
||||
uri=urllib.unquote(uri)
|
||||
try:
|
||||
#location = dc.put(uri,body,ct)
|
||||
ret = dc.prep_http_options(uri, opts)
|
||||
except DAV_Error, (ec,dd):
|
||||
pass
|
||||
except Exception,e:
|
||||
self.log_error("Error at options: %s", str(e))
|
||||
raise
|
||||
return ret
|
||||
|
||||
def send_response(self, code, message=None):
|
||||
# the BufferingHttpServer will send Connection: close , while
|
||||
# the BaseHTTPRequestHandler will only accept int code.
|
||||
|
@ -110,6 +131,22 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
|||
self.close_connection = 1
|
||||
DAVRequestHandler.send_header(self, key, value)
|
||||
|
||||
def send_body(self, DATA, code = None, msg = None, desc = None, ctype='application/octet-stream', headers=None):
|
||||
if headers and 'Connection' in headers:
|
||||
pass
|
||||
elif self.request_version in ('HTTP/1.0', 'HTTP/0.9'):
|
||||
pass
|
||||
elif self.close_connection == 1: # close header already sent
|
||||
pass
|
||||
else:
|
||||
if headers is None:
|
||||
headers = {}
|
||||
if self.headers.get('Connection',False) == 'Keep-Alive':
|
||||
headers['Connection'] = 'keep-alive'
|
||||
|
||||
DAVRequestHandler.send_body(self, DATA, code=code, msg=msg, desc=desc,
|
||||
ctype=ctype, headers=headers)
|
||||
|
||||
def do_PUT(self):
|
||||
dc=self.IFACE_CLASS
|
||||
uri=urlparse.urljoin(self.get_baseuri(dc), self.path)
|
||||
|
@ -120,6 +157,8 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
|||
etag = None
|
||||
|
||||
for match in self.headers['If-Match'].split(','):
|
||||
if match.startswith('"') and match.endswith('"'):
|
||||
match = match[1:-1]
|
||||
if match == '*':
|
||||
if dc.exists(uri):
|
||||
test = True
|
||||
|
@ -129,6 +168,7 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
|||
test = True
|
||||
break
|
||||
if not test:
|
||||
self._get_body()
|
||||
self.send_status(412)
|
||||
return
|
||||
|
||||
|
@ -146,6 +186,7 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
|||
test = False
|
||||
break
|
||||
if not test:
|
||||
self._get_body()
|
||||
self.send_status(412)
|
||||
return
|
||||
|
||||
|
@ -158,10 +199,7 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
|||
self._flush()
|
||||
|
||||
# read the body
|
||||
body=None
|
||||
if self.headers.has_key("Content-Length"):
|
||||
l=self.headers['Content-Length']
|
||||
body=self.rfile.read(atoi(l))
|
||||
body=self._get_body()
|
||||
|
||||
# locked resources are not allowed to be overwritten
|
||||
if self._l_isLocked(uri):
|
||||
|
@ -187,6 +225,13 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
|||
|
||||
self.send_body(None, '201', 'Created', '', headers=headers)
|
||||
|
||||
def _get_body(self):
|
||||
body = None
|
||||
if self.headers.has_key("Content-Length"):
|
||||
l=self.headers['Content-Length']
|
||||
body=self.rfile.read(atoi(l))
|
||||
return body
|
||||
|
||||
def do_DELETE(self):
|
||||
try:
|
||||
DAVRequestHandler.do_DELETE(self)
|
||||
|
|
|
@ -468,18 +468,18 @@ class email_template(osv.osv):
|
|||
data,
|
||||
context)
|
||||
attachment_obj = self.pool.get('ir.attachment')
|
||||
|
||||
fname = tools.ustr(get_value(cursor, user, record_id,
|
||||
template.file_name, template, context)
|
||||
or 'Report')
|
||||
ext = '.' + format
|
||||
if not fname.endswith(ext):
|
||||
fname += ext
|
||||
|
||||
new_att_vals = {
|
||||
'name':mail.subject + ' (Email Attachment)',
|
||||
'datas':base64.b64encode(result),
|
||||
'datas_fname':tools.ustr(
|
||||
get_value(
|
||||
cursor,
|
||||
user,
|
||||
record_id,
|
||||
template.file_name,
|
||||
template,
|
||||
context
|
||||
) or 'Report') + "." + format,
|
||||
'datas_fname': fname,
|
||||
'description':mail.subject or "No Description",
|
||||
'res_model':'email_template.mailbox',
|
||||
'res_id':mail.id
|
||||
|
@ -606,14 +606,12 @@ class email_template(osv.osv):
|
|||
mailbox_values['body_text'] += sign
|
||||
if mailbox_values['body_html']:
|
||||
mailbox_values['body_html'] += sign
|
||||
print 'Creating', mailbox_values
|
||||
mailbox_id = self.pool.get('email_template.mailbox').create(
|
||||
cursor,
|
||||
user,
|
||||
mailbox_values,
|
||||
context)
|
||||
|
||||
print 'Sending', mailbox_id
|
||||
return mailbox_id
|
||||
|
||||
|
||||
|
@ -628,7 +626,6 @@ class email_template(osv.osv):
|
|||
template = self.browse(cursor, user, template_id, context=context)
|
||||
if not template:
|
||||
raise Exception("The requested template could not be loaded")
|
||||
print 'loaded', record_ids
|
||||
result = True
|
||||
for record_id in record_ids:
|
||||
mailbox_id = self._generate_mailbox_item_from_template(
|
||||
|
@ -637,7 +634,6 @@ class email_template(osv.osv):
|
|||
template,
|
||||
record_id,
|
||||
context)
|
||||
print 'loaded'
|
||||
mail = self.pool.get('email_template.mailbox').browse(
|
||||
cursor,
|
||||
user,
|
||||
|
|
|
@ -347,7 +347,6 @@ class email_template_account(osv.osv):
|
|||
logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:MIME Error\nDescription: %s") % (id, error))
|
||||
return {'error_msg': "Server Send Error\nDescription: %s"%error}
|
||||
try:
|
||||
#print msg['From'],toadds
|
||||
serv.sendmail(msg['From'], addresses_l['all'], msg.as_string())
|
||||
except Exception, error:
|
||||
logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:Server Send Error\nDescription: %s") % (id, error))
|
||||
|
@ -367,7 +366,6 @@ class email_template_account(osv.osv):
|
|||
logger = netsvc.Logger()
|
||||
#The standard email dates are of format similar to:
|
||||
#Thu, 8 Oct 2009 09:35:42 +0200
|
||||
#print time_as_string
|
||||
date_as_date = False
|
||||
convertor = {'+':1, '-':-1}
|
||||
try:
|
||||
|
@ -406,7 +404,6 @@ class email_template_account(osv.osv):
|
|||
offset = datetime.timedelta(hours=0)
|
||||
dt = dt + offset
|
||||
date_as_date = dt.strftime('%Y-%m-%d %H:%M:%S')
|
||||
#print date_as_date
|
||||
except Exception, e:
|
||||
logger.notifyChannel(
|
||||
_("Email Template"),
|
||||
|
|
|
@ -31,11 +31,8 @@ class email_template_engines(osv.osv):
|
|||
_name = "email_template.engines"
|
||||
_description = "Email Template Engine"
|
||||
|
||||
# def __init__(self):
|
||||
# print "Started Engine"
|
||||
|
||||
def check(self):
|
||||
print "Start self check"
|
||||
pass
|
||||
|
||||
def strip_html(self,text):
|
||||
#Removes HTML, Have to check if still relevent
|
||||
|
@ -71,7 +68,6 @@ class email_template_engines(osv.osv):
|
|||
#message: the complete text including placeholders
|
||||
#templateid: the template id of the template
|
||||
#context: TODO
|
||||
#print cr,uid,id,message,templateid,context
|
||||
if message:
|
||||
logger = netsvc.Logger()
|
||||
def merge(match):
|
||||
|
@ -79,14 +75,11 @@ class email_template_engines(osv.osv):
|
|||
obj_pool = self.pool.get(template.object_name.model)
|
||||
obj = obj_pool.browse(cr, uid, id, context)
|
||||
exp = str(match.group()[2:-2]).strip()
|
||||
#print "level 1:",exp
|
||||
exp_spl = exp.split('/')
|
||||
#print "level 2:",exp_spl
|
||||
try:
|
||||
result = eval(exp_spl[0], {'object':obj,})
|
||||
except:
|
||||
result = "Rendering Error"
|
||||
#print "result:",result
|
||||
try:
|
||||
if result in (None, False):
|
||||
if len(exp_spl)>1:
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.4\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 03:55+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 01:28+0000\n"
|
||||
"Last-Translator: oguzhan <tazmanyacanawari@hotmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:37+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: event
|
||||
|
|
|
@ -7,67 +7,67 @@ 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: 2009-11-09 17:40+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2010-08-06 17:13+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <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-06-22 04:14+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,name:hr_expense.process_node_confirmedexpenses0
|
||||
msgid "Confirmed Expenses"
|
||||
msgstr ""
|
||||
msgstr "Potwierdzone wydatki"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.model,name:hr_expense.model_hr_expense_line
|
||||
msgid "Expense Line"
|
||||
msgstr ""
|
||||
msgstr "Pozycja wydatków"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,note:hr_expense.process_node_reimbursement0
|
||||
msgid "The accoutant reimburse the expenses"
|
||||
msgstr ""
|
||||
msgstr "Księgowość zwraca wydatki"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.act_window,name:hr_expense.expense_all_confirm
|
||||
#: model:ir.ui.menu,name:hr_expense.menu_expense_all_confirm
|
||||
msgid "Expenses waiting validation"
|
||||
msgstr ""
|
||||
msgstr "Wydatki czekające na zatwierdzenie"
|
||||
|
||||
#. module: hr_expense
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,date_confirm:0
|
||||
msgid "Date Confirmed"
|
||||
msgstr ""
|
||||
msgstr "Data potwierdzenia"
|
||||
|
||||
#. module: hr_expense
|
||||
#: selection:hr.expense.expense,state:0
|
||||
msgid "Waiting confirmation"
|
||||
msgstr ""
|
||||
msgstr "Czeka na zatwierdzenie"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
msgid "Set to Draft"
|
||||
msgstr ""
|
||||
msgstr "Ustaw na projekt"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.act_window,name:hr_expense.expense_my_confirm
|
||||
#: model:ir.ui.menu,name:hr_expense.menu_expense_my_confirm
|
||||
msgid "My expenses waiting validation"
|
||||
msgstr ""
|
||||
msgstr "Moje wydatki czekające na zatwierdzenie"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.act_window,name:hr_expense.expense_all
|
||||
#: model:ir.ui.menu,name:hr_expense.menu_expense_all
|
||||
msgid "All expenses"
|
||||
msgstr ""
|
||||
msgstr "Wszystkie wydatki"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,name:hr_expense.process_node_approved0
|
||||
|
@ -77,7 +77,7 @@ msgstr "Zatwierdzone"
|
|||
#. module: hr_expense
|
||||
#: field:hr.expense.line,uom_id:0
|
||||
msgid "UoM"
|
||||
msgstr ""
|
||||
msgstr "JM"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
|
@ -98,7 +98,7 @@ msgstr "Anulowano"
|
|||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
msgid "Validation"
|
||||
msgstr "Sprawdzanie"
|
||||
msgstr "Zatwierdzenie"
|
||||
|
||||
#. module: hr_expense
|
||||
#: help:product.product,hr_expense_ok:0
|
||||
|
@ -112,7 +112,7 @@ msgstr ""
|
|||
#. module: hr_expense
|
||||
#: selection:hr.expense.expense,state:0
|
||||
msgid "Accepted"
|
||||
msgstr "Zaakceptowany"
|
||||
msgstr "Zaakceptowano"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
|
@ -124,17 +124,17 @@ msgstr "Odnośnik"
|
|||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
msgid "Certified honest and conform,"
|
||||
msgstr ""
|
||||
msgstr "Potwierdzono rzetelność i zgodność z zasadami"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.report.xml,name:hr_expense.hr_expenses
|
||||
msgid "Print HR expenses"
|
||||
msgstr ""
|
||||
msgstr "Drukuj wydatki pracownicze"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,name:hr_expense.process_transition_refuseexpense0
|
||||
msgid "Refuse expense"
|
||||
msgstr ""
|
||||
msgstr "Odmów wydatku"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
|
@ -145,81 +145,81 @@ msgstr "Potwierdź"
|
|||
#. module: hr_expense
|
||||
#: model:process.node,note:hr_expense.process_node_supplierinvoice0
|
||||
msgid "The accoutant validates the sheet"
|
||||
msgstr ""
|
||||
msgstr "Księgowy zatwierdza delegację"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.line,analytic_account:0
|
||||
msgid "Analytic account"
|
||||
msgstr ""
|
||||
msgstr "Konto analityczne"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,name:hr_expense.process_node_supplierinvoice0
|
||||
#: model:process.transition,name:hr_expense.process_transition_approveinvoice0
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
msgstr "Faktura od dostawcy"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,state:0
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
msgstr "Stan"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
#: field:hr.expense.expense,employee_id:0
|
||||
msgid "Employee"
|
||||
msgstr ""
|
||||
msgstr "Pracownik"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
msgid "Qty"
|
||||
msgstr ""
|
||||
msgstr "Il."
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
msgid "Total Price"
|
||||
msgstr ""
|
||||
msgstr "Suma"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,note:hr_expense.process_node_reinvoicing0
|
||||
msgid "Some costs may be reinvoices to the customer"
|
||||
msgstr ""
|
||||
msgstr "Część kosztów może być refakturowana na klienta"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.act_window,name:hr_expense.expense_my
|
||||
#: model:ir.ui.menu,name:hr_expense.menu_expense_my
|
||||
msgid "My Expenses"
|
||||
msgstr ""
|
||||
msgstr "Moje wydatki"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,id:0
|
||||
msgid "Sheet ID"
|
||||
msgstr ""
|
||||
msgstr "Numer rozliczenia"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,name:hr_expense.process_transition_reimburseexpense0
|
||||
msgid "Reimburse expense"
|
||||
msgstr ""
|
||||
msgstr "Zwrot wydatków"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,journal_id:0
|
||||
msgid "Force Journal"
|
||||
msgstr ""
|
||||
msgstr "Wymuś dziennik"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.act_window,name:hr_expense.expense_my_new
|
||||
#: model:ir.ui.menu,name:hr_expense.menu_expense_my_new
|
||||
msgid "New Expenses Sheet"
|
||||
msgstr ""
|
||||
msgstr "Nowe rozliczenie"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,note:hr_expense.process_transition_reimburseexpense0
|
||||
msgid "After creating invoice, reimburse expenses"
|
||||
msgstr ""
|
||||
msgstr "Po utworzeniu faktury zwrot wydatków"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,name:hr_expense.process_node_reimbursement0
|
||||
msgid "Reimbursement"
|
||||
msgstr ""
|
||||
msgstr "Zwrot wydatków"
|
||||
|
||||
#. module: hr_expense
|
||||
#: constraint:ir.ui.view:0
|
||||
|
@ -230,49 +230,49 @@ msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
|
|||
#: field:hr.expense.line,expense_id:0
|
||||
#: model:ir.model,name:hr_expense.model_hr_expense_expense
|
||||
msgid "Expense"
|
||||
msgstr ""
|
||||
msgstr "Wydatek"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
#: field:hr.expense.expense,line_ids:0
|
||||
#: view:hr.expense.line:0
|
||||
msgid "Expense Lines"
|
||||
msgstr ""
|
||||
msgstr "Pozycja wydatków"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,currency_id:0
|
||||
msgid "Currency"
|
||||
msgstr ""
|
||||
msgstr "Waluta"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,note:hr_expense.process_node_draftexpenses0
|
||||
msgid "Employee encode all his expenses"
|
||||
msgstr ""
|
||||
msgstr "Pracownik wprowadza swoje wydatki"
|
||||
|
||||
#. module: hr_expense
|
||||
#: selection:hr.expense.expense,state:0
|
||||
msgid "Invoiced"
|
||||
msgstr ""
|
||||
msgstr "Zafakturowano"
|
||||
|
||||
#. module: hr_expense
|
||||
#: selection:hr.expense.expense,state:0
|
||||
msgid "Reimbursed"
|
||||
msgstr ""
|
||||
msgstr "Zwrócono"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,note:0
|
||||
msgid "Note"
|
||||
msgstr ""
|
||||
msgstr "Notatka"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,note:hr_expense.process_transition_reimbursereinvoice0
|
||||
msgid "Create Customer invoice"
|
||||
msgstr ""
|
||||
msgstr "Utwórz fakturę dla klienta"
|
||||
|
||||
#. module: hr_expense
|
||||
#: selection:hr.expense.expense,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
msgstr "Projekt"
|
||||
|
||||
#. module: hr_expense
|
||||
#: constraint:ir.model:0
|
||||
|
@ -285,246 +285,246 @@ msgstr ""
|
|||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
msgid "Accounting data"
|
||||
msgstr ""
|
||||
msgstr "Dane księgowe"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,note:hr_expense.process_transition_approveexpense0
|
||||
msgid "Expense is approved."
|
||||
msgstr ""
|
||||
msgstr "Wydatek zatwierdzono."
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,amount:0
|
||||
msgid "Total Amount"
|
||||
msgstr ""
|
||||
msgstr "Suma kwot"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,name:hr_expense.process_node_draftexpenses0
|
||||
msgid "Draft Expenses"
|
||||
msgstr ""
|
||||
msgstr "Projekt wydatków"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,user_id:0
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
msgstr "Użytkownik"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
#: field:hr.expense.expense,date:0
|
||||
#: field:hr.expense.line,date_value:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
msgstr "Data"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
msgid "Total:"
|
||||
msgstr ""
|
||||
msgstr "Suma:"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
msgid "HR Expenses"
|
||||
msgstr ""
|
||||
msgstr "Wydatki pracowników"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,date_valid:0
|
||||
msgid "Date Validated"
|
||||
msgstr ""
|
||||
msgstr "Data zatwierdzenia"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,account_move_id:0
|
||||
msgid "Account Move"
|
||||
msgstr ""
|
||||
msgstr "Zapis księgowy"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,note:hr_expense.process_node_confirmedexpenses0
|
||||
msgid "The employee validates his expense sheet"
|
||||
msgstr ""
|
||||
msgstr "Pracownik potwierdza swoje rozliczenie"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,note:hr_expense.process_node_refused0
|
||||
msgid "The direct manager refuses the sheet.Reset as draft."
|
||||
msgstr ""
|
||||
msgstr "Bezpośredni przełożony odrzuca delegację. Ustaw na projekt."
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
msgid "Expenses Sheet"
|
||||
msgstr ""
|
||||
msgstr "Rozliczenie wydatków (Delegacja)"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.act_window,name:hr_expense.expense_all_invoiced
|
||||
#: model:ir.ui.menu,name:hr_expense.menu_expense_all_invoiced
|
||||
msgid "Expenses waiting payment"
|
||||
msgstr ""
|
||||
msgstr "Wydatki oczekujące na zapłacenie"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.act_window,name:hr_expense.expense_my_draft
|
||||
#: model:ir.ui.menu,name:hr_expense.menu_expense_my_draft
|
||||
msgid "My Draft expenses"
|
||||
msgstr ""
|
||||
msgstr "Moje wydatki - projekty"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.module.module,shortdesc:hr_expense.module_meta_information
|
||||
msgid "Human Resources Expenses Tracking"
|
||||
msgstr ""
|
||||
msgstr "Wydatki pracownicze"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
#: field:hr.expense.expense,invoice_id:0
|
||||
#: model:process.transition.action,name:hr_expense.process_transition_action_supplierinvoice0
|
||||
msgid "Invoice"
|
||||
msgstr ""
|
||||
msgstr "Faktura"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Anuluj"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,name:hr_expense.process_transition_reimbursereinvoice0
|
||||
msgid "Reinvoice"
|
||||
msgstr ""
|
||||
msgstr "Refakturuj"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.process,name:hr_expense.process_process_expenseprocess0
|
||||
msgid "Expense Process"
|
||||
msgstr ""
|
||||
msgstr "Proces wydatków"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
msgid "Other Info"
|
||||
msgstr ""
|
||||
msgstr "Inne informacje"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.act_window,name:hr_expense.expense_all_draft
|
||||
#: model:ir.ui.menu,name:hr_expense.menu_expense_all_draft
|
||||
msgid "Draft expenses"
|
||||
msgstr ""
|
||||
msgstr "Projekty wydatków"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,name:hr_expense.process_transition_confirmexpense0
|
||||
msgid "Confirm expense"
|
||||
msgstr ""
|
||||
msgstr "Potwierdź wydatek"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,name:hr_expense.process_transition_approveexpense0
|
||||
msgid "Approve expense"
|
||||
msgstr ""
|
||||
msgstr "Zaaprobuj wydatek"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
#: model:process.transition.action,name:hr_expense.process_transition_action_accept0
|
||||
msgid "Accept"
|
||||
msgstr ""
|
||||
msgstr "Akceptuj"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
msgid "This document must be dated and signed for reimbursement"
|
||||
msgstr ""
|
||||
msgstr "Ten dokument musi być datowany i podpisany do uzyskania zwrotu"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,note:hr_expense.process_transition_refuseexpense0
|
||||
msgid "Expense is refused."
|
||||
msgstr ""
|
||||
msgstr "Wydatek odrzucony"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
#: field:hr.expense.line,unit_amount:0
|
||||
msgid "Unit Price"
|
||||
msgstr ""
|
||||
msgstr "Cena jedn."
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:ir.actions.act_window,name:hr_expense.expense_all_valid
|
||||
#: model:ir.ui.menu,name:hr_expense.menu_expense_all_valid
|
||||
msgid "Expenses waiting invoice"
|
||||
msgstr ""
|
||||
msgstr "Wydatki oczekujące na fakturę"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.line,product_id:0
|
||||
msgid "Product"
|
||||
msgstr ""
|
||||
msgstr "Produkt"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.line,description:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
msgstr "Opis"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
#: field:hr.expense.expense,name:0
|
||||
msgid "Expense Sheet"
|
||||
msgstr ""
|
||||
msgstr "Rozliczenie wydatków"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.line,unit_quantity:0
|
||||
msgid "Quantities"
|
||||
msgstr ""
|
||||
msgstr "Ilości"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,name:hr_expense.process_node_refused0
|
||||
msgid "Refused"
|
||||
msgstr ""
|
||||
msgstr "Odrzucono"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:product.product,hr_expense_ok:0
|
||||
msgid "Can be Expensed"
|
||||
msgstr "Może być wydatkowane"
|
||||
msgstr "Może być wydatkiem"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
msgid "Ref."
|
||||
msgstr ""
|
||||
msgstr "Odn."
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.expense,user_valid:0
|
||||
msgid "Validation User"
|
||||
msgstr ""
|
||||
msgstr "Użytkownik zatwierdzający"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
msgid "(Date and signature)"
|
||||
msgstr ""
|
||||
msgstr "(Data i podpis)"
|
||||
|
||||
#. module: hr_expense
|
||||
#: rml:hr.expense:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
msgstr "Nazwa"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.line,name:0
|
||||
msgid "Short Description"
|
||||
msgstr ""
|
||||
msgstr "Krótki opis"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,note:hr_expense.process_transition_approveinvoice0
|
||||
msgid "Creates supplier invoice."
|
||||
msgstr ""
|
||||
msgstr "Tworzy fakturę od dostawcy"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,note:hr_expense.process_node_approved0
|
||||
msgid "The direct manager approves the sheet"
|
||||
msgstr ""
|
||||
msgstr "Bezpośredni przełożony aprobuje zestawienie"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.line,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr ""
|
||||
msgstr "Numeracja"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.transition,note:hr_expense.process_transition_confirmexpense0
|
||||
msgid "Expense is confirmed."
|
||||
msgstr ""
|
||||
msgstr "Wydatek został potwierdzony"
|
||||
|
||||
#. module: hr_expense
|
||||
#: view:hr.expense.expense:0
|
||||
#: model:ir.ui.menu,name:hr_expense.next_id_49
|
||||
msgid "Expenses"
|
||||
msgstr ""
|
||||
msgstr "Wydatki"
|
||||
|
||||
#. module: hr_expense
|
||||
#: field:hr.expense.line,total_amount:0
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
msgstr "Suma"
|
||||
|
||||
#. module: hr_expense
|
||||
#: model:process.node,name:hr_expense.process_node_reinvoicing0
|
||||
msgid "Reinvoicing"
|
||||
msgstr ""
|
||||
msgstr "Refakturowanie"
|
||||
|
|
|
@ -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 05:45+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 03:06+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:45+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: hr_expense
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-05 19:25+0000\n"
|
||||
"PO-Revision-Date: 2010-08-06 15:55+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <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-06 03:45+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: hr_holidays
|
||||
|
@ -24,7 +24,7 @@ msgstr "Nowy wniosek o urlop"
|
|||
#. module: hr_holidays
|
||||
#: model:ir.ui.menu,name:hr_holidays.menu_action_all_holiday
|
||||
msgid "All Holidays Requests"
|
||||
msgstr "Wszystkie wnioski o urlop"
|
||||
msgstr "Wszystkie wnioski urlopowe"
|
||||
|
||||
#. module: hr_holidays
|
||||
#: constraint:ir.actions.act_window:0
|
||||
|
@ -39,7 +39,7 @@ msgstr "Pozostało dni urlopu"
|
|||
#. module: hr_holidays
|
||||
#: model:ir.actions.act_window,name:hr_holidays.action_holiday_waiting
|
||||
msgid "Requests Awaiting for Validation"
|
||||
msgstr "Wnioski oczekujące na zatwierdzenie"
|
||||
msgstr "Wnioski urlopowe - czekające na zatwierdzenie"
|
||||
|
||||
#. module: hr_holidays
|
||||
#: selection:hr.holidays.status,color_name:0
|
||||
|
@ -137,7 +137,7 @@ msgstr ""
|
|||
#. module: hr_holidays
|
||||
#: model:ir.ui.menu,name:hr_holidays.menu_action_my_holiday
|
||||
msgid "My Holidays Requests"
|
||||
msgstr "Moje wnioski o urlop"
|
||||
msgstr "Moje wnioski urlopowe"
|
||||
|
||||
#. module: hr_holidays
|
||||
#: field:hr.holidays,notes:0
|
||||
|
@ -239,7 +239,7 @@ msgstr "Potwierdź"
|
|||
#: model:ir.actions.act_window,name:hr_holidays.action_my_holiday_waiting
|
||||
#: model:ir.ui.menu,name:hr_holidays.menu_action_my_holiday_waiting
|
||||
msgid "My Awaiting Confirmation Holidays Requests"
|
||||
msgstr "Moje wnioski o urlop oczekujące na potwierdzenie"
|
||||
msgstr "Moje wnioski urlopowe - czekające na zatwierdzenie"
|
||||
|
||||
#. module: hr_holidays
|
||||
#: field:hr.holidays,user_id:0
|
||||
|
@ -286,7 +286,7 @@ msgstr "Liczba wnioskowanych dni urlopu"
|
|||
#. module: hr_holidays
|
||||
#: model:ir.actions.act_window,name:hr_holidays.act_hr_employee_holiday_request
|
||||
msgid "My Holiday Requests"
|
||||
msgstr "Moje wnioski o urlop"
|
||||
msgstr "Moje wnioski urlopowe"
|
||||
|
||||
#. module: hr_holidays
|
||||
#: view:hr.holidays:0
|
||||
|
@ -567,7 +567,7 @@ msgstr "Wnioski urlopowe."
|
|||
#. module: hr_holidays
|
||||
#: model:ir.ui.menu,name:hr_holidays.menu_action_holiday_waiting
|
||||
msgid "Holidays Requests Awaiting for Validation"
|
||||
msgstr "Wnioski urlopowe oczekujące na zatwierdzenie"
|
||||
msgstr "Wnioski urlopowe - czekające na zatwierdzenie"
|
||||
|
||||
#. module: hr_holidays
|
||||
#: view:hr.holidays:0
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.4\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 06:07+0000\n"
|
||||
"PO-Revision-Date: 2010-08-06 23:52+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:45+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: hr_holidays
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.6\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 06:08+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 02:04+0000\n"
|
||||
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:45+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: hr_holidays
|
||||
|
|
|
@ -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 06:28+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-07 03:25+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <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:44+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: hr_timesheet_sheet
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.4\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 07:06+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 02:01+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:39+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: l10n_fr
|
||||
|
|
|
@ -159,11 +159,11 @@ Normal - the campaign runs normally and automatically sends all emails and repor
|
|||
return True
|
||||
|
||||
|
||||
def signal(self, cr, uid, model, res_id, signal, context=None):
|
||||
def signal(self, cr, uid, model, res_id, signal, run_existing=True, context=None):
|
||||
record = self.pool.get(model).browse(cr, uid, res_id, context)
|
||||
return self._signal(cr, uid, record, signal, context)
|
||||
return self._signal(cr, uid, record, signal, run_existing, context)
|
||||
|
||||
def _signal(self, cr, uid, record, signal, context=None):
|
||||
def _signal(self, cr, uid, record, signal, run_existing=True, context=None):
|
||||
if not signal:
|
||||
raise ValueError('signal cannot be False')
|
||||
|
||||
|
@ -182,7 +182,10 @@ Normal - the campaign runs normally and automatically sends all emails and repor
|
|||
wi_domain = [(k, '=', v) for k, v in data.items()]
|
||||
|
||||
wi_ids = Workitems.search(cr, uid, wi_domain, context=context)
|
||||
if not wi_ids:
|
||||
if wi_ids:
|
||||
if not run_existing:
|
||||
continue
|
||||
else:
|
||||
partner = self._get_partner_for(campaign, record)
|
||||
if partner:
|
||||
data['partner_id'] = partner.id
|
||||
|
|
|
@ -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 07:30+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 03:03+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: mrp
|
||||
|
|
|
@ -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-04 08:05+0000\n"
|
||||
"PO-Revision-Date: 2010-08-06 07:47+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-05 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: mrp
|
||||
|
@ -191,12 +191,12 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: view:mrp.workcenter:0
|
||||
msgid "Capacity Information"
|
||||
msgstr ""
|
||||
msgstr "Нормирование рабочего времени"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.production,state:0
|
||||
msgid "Packing Exception"
|
||||
msgstr ""
|
||||
msgstr "Исключение снабжения"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_orderrfq0
|
||||
|
@ -251,7 +251,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: wizard_view:mrp.procurement.compute,init:0
|
||||
msgid "This wizard will schedule procurements."
|
||||
msgstr ""
|
||||
msgstr "Этот мастер планирут снабжение"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom,position:0
|
||||
|
@ -292,6 +292,9 @@ msgid ""
|
|||
"When the virtual stock goes belong the Min Quantity, Open ERP generates a "
|
||||
"procurement to bring the virtual stock to the Max Quantity."
|
||||
msgstr ""
|
||||
"Когда запасы(с учётом неподтверждённых операций) достигают минимального "
|
||||
"значения, Open ERP автоматически планирует снабжения до достижения "
|
||||
"максимального количества."
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.transition,name:mrp.process_transition_stockmts0
|
||||
|
@ -353,12 +356,12 @@ msgstr "Подробности"
|
|||
#. module: mrp
|
||||
#: model:process.process,name:mrp.process_process_procurementprocess0
|
||||
msgid "Procurement Process"
|
||||
msgstr ""
|
||||
msgstr "Процесс снабжения"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.production,date_planned_date:0
|
||||
msgid "Scheduled Date"
|
||||
msgstr ""
|
||||
msgstr "Запланированная дата"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.procurement,priority:0
|
||||
|
@ -375,7 +378,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: rml:mrp.production.order:0
|
||||
msgid "Bill Of Material"
|
||||
msgstr ""
|
||||
msgstr "Спецификация"
|
||||
|
||||
#. module: mrp
|
||||
#: help:mrp.routing,location_id:0
|
||||
|
@ -393,12 +396,12 @@ msgstr "Резервирование"
|
|||
#. module: mrp
|
||||
#: model:ir.actions.act_window,name:mrp.action2
|
||||
msgid "Bill of Materials Structure"
|
||||
msgstr ""
|
||||
msgstr "Древовидная спецификация"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_field:product.product.procurement,init,product_id:0
|
||||
msgid "product"
|
||||
msgstr ""
|
||||
msgstr "изделие"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.property,composition:0
|
||||
|
@ -441,7 +444,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: field:res.company,po_lead:0
|
||||
msgid "Purchase Lead Time"
|
||||
msgstr ""
|
||||
msgstr "Время доставки"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.routing,location_id:0
|
||||
|
@ -451,12 +454,12 @@ msgstr "Расположение производства"
|
|||
#. module: mrp
|
||||
#: view:mrp.production:0
|
||||
msgid "Change Qty"
|
||||
msgstr ""
|
||||
msgstr "Изменить кол-во"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.production:0
|
||||
msgid "Force Reservation"
|
||||
msgstr ""
|
||||
msgstr "Не ждать пополнения расходных"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom.revision,author_id:0
|
||||
|
@ -472,7 +475,7 @@ msgstr ""
|
|||
#: field:mrp.bom,product_uos:0
|
||||
#: field:mrp.production.product.line,product_uos:0
|
||||
msgid "Product UOS"
|
||||
msgstr ""
|
||||
msgstr "Вторая ед. изм."
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.transition,name:mrp.process_transition_productionprocureproducts0
|
||||
|
@ -502,7 +505,7 @@ msgstr "Позиции спецификации"
|
|||
#. module: mrp
|
||||
#: field:mrp.workcenter,time_start:0
|
||||
msgid "Time before prod."
|
||||
msgstr "Время до производства"
|
||||
msgstr "Подготовительное время"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.model,name:mrp.model_mrp_routing_workcenter
|
||||
|
@ -512,7 +515,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: view:mrp.production:0
|
||||
msgid "Consumed Products"
|
||||
msgstr ""
|
||||
msgstr "Расходные материалы или компоненты сборки"
|
||||
|
||||
#. module: mrp
|
||||
#: constraint:mrp.bom:0
|
||||
|
@ -534,12 +537,12 @@ msgstr ""
|
|||
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action4
|
||||
#: model:ir.ui.menu,name:mrp.menu_mrp_procurement_action4
|
||||
msgid "Exceptions Procurements to Fix"
|
||||
msgstr ""
|
||||
msgstr "Исключения снабжения, требующие вмешательства"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.procurement,state:0
|
||||
msgid "Ready"
|
||||
msgstr ""
|
||||
msgstr "Готово"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.routing:0
|
||||
|
@ -550,17 +553,17 @@ msgstr ""
|
|||
#: model:ir.actions.act_window,name:mrp.mrp_production_action2_gantt
|
||||
#: model:ir.ui.menu,name:mrp.menu_production_orders_start_gantt
|
||||
msgid "Production Orders Planning"
|
||||
msgstr ""
|
||||
msgstr "Планирование заказов на производство"
|
||||
|
||||
#. module: mrp
|
||||
#: help:mrp.workcenter,time_efficiency:0
|
||||
msgid "Factor that multiplies all times expressed in the workcenter."
|
||||
msgstr ""
|
||||
msgstr "Коэффициент, а который умножаются все нормы времени"
|
||||
|
||||
#. module: mrp
|
||||
#: help:mrp.workcenter,time_cycle:0
|
||||
msgid "Time in hours for doing one cycle."
|
||||
msgstr ""
|
||||
msgstr "Время в часах на выполнение одного цикла"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.production,date_finnished:0
|
||||
|
@ -573,6 +576,7 @@ msgid ""
|
|||
"This is the internal picking list take bring the raw materials to the "
|
||||
"production plan."
|
||||
msgstr ""
|
||||
"Перечень материалов, доставляемых со склада на производственный участок"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.production,state:0
|
||||
|
@ -596,7 +600,7 @@ msgstr "В ожидании"
|
|||
#: view:mrp.routing:0
|
||||
#: model:process.node,name:mrp.process_node_routing0
|
||||
msgid "Routing"
|
||||
msgstr ""
|
||||
msgstr "Техн. маршрут"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_button:mrp.workcenter.load,init,report:0
|
||||
|
@ -617,7 +621,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: selection:mrp.workcenter.load,init,time_unit:0
|
||||
msgid "Per month"
|
||||
msgstr ""
|
||||
msgstr "В месяц"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.procurement,product_uos_qty:0
|
||||
|
@ -669,7 +673,7 @@ msgstr "Заказы на производство"
|
|||
#: field:mrp.bom,child_complete_ids:0
|
||||
#: field:mrp.bom,child_ids:0
|
||||
msgid "BoM Hyerarchy"
|
||||
msgstr ""
|
||||
msgstr "Структура спецификаций"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.procurement:0
|
||||
|
@ -724,11 +728,13 @@ msgid ""
|
|||
"This wizard will planify the procurement for this product. This procurement "
|
||||
"may generate task, production orders or purchase orders."
|
||||
msgstr ""
|
||||
"Этот мастер планирует снабжение. Он может сгенерировать заказ поставщику, "
|
||||
"заказ на поизводство или задачу."
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_mts0
|
||||
msgid "The system waits for requested products in stock."
|
||||
msgstr ""
|
||||
msgstr "Ожидание требуемого материала/изделия на складе"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.transition,name:mrp.process_transition_servicemto0
|
||||
|
@ -762,7 +768,7 @@ msgstr "Код"
|
|||
#. module: mrp
|
||||
#: rml:mrp.production.order:0
|
||||
msgid "No. Of Hours"
|
||||
msgstr ""
|
||||
msgstr "Количество часов"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.model,name:mrp.model_mrp_property_group
|
||||
|
@ -808,7 +814,7 @@ msgstr "Машина"
|
|||
#. module: mrp
|
||||
#: model:process.node,name:mrp.process_node_servicemts0
|
||||
msgid "Make to stock"
|
||||
msgstr ""
|
||||
msgstr "Изготовление про запас"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.workcenter,name:0
|
||||
|
@ -840,7 +846,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: selection:mrp.workcenter,type:0
|
||||
msgid "Human Resource"
|
||||
msgstr ""
|
||||
msgstr "Штат служащих"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.actions.act_window,name:mrp.mrp_workcenter_action
|
||||
|
@ -868,7 +874,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: field:mrp.production.workcenter.line,cycle:0
|
||||
msgid "Nbr of cycle"
|
||||
msgstr ""
|
||||
msgstr "Кол-во циклов"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom,name:0
|
||||
|
@ -885,7 +891,7 @@ msgstr "Название"
|
|||
#. module: mrp
|
||||
#: field:mrp.routing.workcenter,cycle_nbr:0
|
||||
msgid "Number of Cycle"
|
||||
msgstr ""
|
||||
msgstr "Кол-во циклов"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_field:mrp.workcenter.load,init,measure_unit:0
|
||||
|
@ -908,7 +914,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: field:mrp.workcenter,time_efficiency:0
|
||||
msgid "Time Efficiency"
|
||||
msgstr ""
|
||||
msgstr "Поправочный коэффициент"
|
||||
|
||||
#. module: mrp
|
||||
#: help:res.company,manufacturing_lead:0
|
||||
|
@ -933,12 +939,12 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: field:mrp.production,location_dest_id:0
|
||||
msgid "Finished Products Location"
|
||||
msgstr ""
|
||||
msgstr "Склад для размешения готовых изделий"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_field:product.product.procurement,init,uom_id:0
|
||||
msgid "Unit of Measure"
|
||||
msgstr ""
|
||||
msgstr "Единица измерения"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.procurement,procure_method:0
|
||||
|
@ -953,7 +959,7 @@ msgstr "Книга аналитики"
|
|||
#. module: mrp
|
||||
#: selection:mrp.workcenter.load,init,time_unit:0
|
||||
msgid "Per week"
|
||||
msgstr ""
|
||||
msgstr "В неделю"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_button:mrp.procurement.compute,init,compute:0
|
||||
|
@ -985,7 +991,7 @@ msgstr "Кол-во часов"
|
|||
#. module: mrp
|
||||
#: view:mrp.procurement:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
msgstr "Примечания"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.model,name:mrp.model_mrp_bom
|
||||
|
@ -1002,12 +1008,12 @@ msgstr "Выбрать ед. времени"
|
|||
#. module: mrp
|
||||
#: wizard_field:product_price,init,number:0
|
||||
msgid "Number of products to produce"
|
||||
msgstr ""
|
||||
msgstr "Количество производимых изделий"
|
||||
|
||||
#. module: mrp
|
||||
#: help:mrp.production,location_dest_id:0
|
||||
msgid "Location where the system will stock the finished products."
|
||||
msgstr ""
|
||||
msgstr "Склад для размещения готовых изделий"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.transition,name:mrp.process_transition_billofmaterialrouting0
|
||||
|
@ -1027,7 +1033,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: view:mrp.bom:0
|
||||
msgid "Revisions"
|
||||
msgstr ""
|
||||
msgstr "Ревизии"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom,product_efficiency:0
|
||||
|
@ -1047,7 +1053,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: field:mrp.production,sale_ref:0
|
||||
msgid "Sale Ref"
|
||||
msgstr ""
|
||||
msgstr "Номер заказа"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.procurement,priority:0
|
||||
|
@ -1071,7 +1077,7 @@ msgstr "Новое снабжение"
|
|||
#. module: mrp
|
||||
#: rml:mrp.production.order:0
|
||||
msgid "Production Order N° :"
|
||||
msgstr ""
|
||||
msgstr "Заказ на производство №"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.workcenter,type:0
|
||||
|
@ -1082,18 +1088,18 @@ msgstr "Инструмент"
|
|||
#: help:mrp.production,location_src_id:0
|
||||
msgid ""
|
||||
"Location where the system will look for products used in raw materials."
|
||||
msgstr ""
|
||||
msgstr "Склад, с которого списываются расходные материалы"
|
||||
|
||||
#. module: mrp
|
||||
#: rml:mrp.production.order:0
|
||||
#: wizard_field:product.product.procurement,init,date_planned:0
|
||||
msgid "Planned Date"
|
||||
msgstr ""
|
||||
msgstr "Планируемая дата"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_purchaseprocure0
|
||||
msgid "Procurement orders"
|
||||
msgstr ""
|
||||
msgstr "Заказ на производство"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.node,name:mrp.process_node_mts0
|
||||
|
@ -1124,7 +1130,7 @@ msgstr "Снабжение"
|
|||
#. module: mrp
|
||||
#: model:ir.actions.wizard,name:mrp.product_procurement_wizard
|
||||
msgid "Procurement Request"
|
||||
msgstr ""
|
||||
msgstr "Заявка на снабжение"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.actions.wizard,name:mrp.wizard_price
|
||||
|
@ -1164,14 +1170,14 @@ msgstr "алфавитные указатели"
|
|||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_productionorder0
|
||||
msgid "Procurement for raw materials."
|
||||
msgstr ""
|
||||
msgstr "Снабжение расходными материалами"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.procurement:0
|
||||
#: field:mrp.procurement,note:0
|
||||
#: rml:mrp.production.order:0
|
||||
msgid "Note"
|
||||
msgstr ""
|
||||
msgstr "Примечание"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.transition,name:mrp.process_transition_procurestockableproduct0
|
||||
|
@ -1181,7 +1187,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: field:mrp.bom,method:0
|
||||
msgid "Method"
|
||||
msgstr ""
|
||||
msgstr "Способ"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_view:product_price,init:0
|
||||
|
@ -1191,7 +1197,7 @@ msgstr "Оплачено ?"
|
|||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_routing0
|
||||
msgid "Define a routing to describe the manufacturing steps."
|
||||
msgstr ""
|
||||
msgstr "Задайте маршрут обработки"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom,active:0
|
||||
|
@ -1233,7 +1239,7 @@ msgstr "Доп. информация"
|
|||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_billofmaterial0
|
||||
msgid "Define the product structure, with sub-products and/or components."
|
||||
msgstr ""
|
||||
msgstr "Задайте структуру изделия, с подсборками"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_minimumstockrule0
|
||||
|
@ -1241,6 +1247,7 @@ msgid ""
|
|||
"Procurement is created if the product quantity is lower than the minimum "
|
||||
"limit."
|
||||
msgstr ""
|
||||
"Снабжение начинаетя, если количество продукта ниже минимального предела"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.procurement,date_close:0
|
||||
|
@ -1266,12 +1273,12 @@ msgstr "Продукция в ожидании заказов на произв
|
|||
#. module: mrp
|
||||
#: rml:mrp.production.order:0
|
||||
msgid "SO Number"
|
||||
msgstr ""
|
||||
msgstr "Номер заказа клиента"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.actions.wizard,name:mrp.wizard_change_production_qty
|
||||
msgid "Change Product Qty."
|
||||
msgstr ""
|
||||
msgstr "Изменить кол-во"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.procurement,state:0
|
||||
|
@ -1320,7 +1327,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: field:mrp.workcenter,capacity_per_cycle:0
|
||||
msgid "Capacity per Cycle"
|
||||
msgstr ""
|
||||
msgstr "Количество одновременно изготавливаемых деталей"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom,product_id:0
|
||||
|
@ -1336,17 +1343,17 @@ msgstr "Продукция"
|
|||
#: view:mrp.production:0
|
||||
#: field:mrp.production,hour_total:0
|
||||
msgid "Total Hours"
|
||||
msgstr ""
|
||||
msgstr "Общее время"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.production,location_src_id:0
|
||||
msgid "Raw Materials Location"
|
||||
msgstr ""
|
||||
msgstr "Склад расходных материалов"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.actions.act_window,name:mrp.action_product_bom_structure
|
||||
msgid "Product BoM Structure"
|
||||
msgstr ""
|
||||
msgstr "Структура спецификации изделия"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom,product_uom:0
|
||||
|
@ -1383,7 +1390,7 @@ msgstr ""
|
|||
#: field:mrp.procurement,product_uos:0
|
||||
#: field:mrp.production,product_uos:0
|
||||
msgid "Product UoS"
|
||||
msgstr ""
|
||||
msgstr "Вторая ед изм."
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.procurement,product_uom:0
|
||||
|
@ -1408,12 +1415,12 @@ msgstr "Весьма срочно"
|
|||
#: field:mrp.procurement,purchase_id:0
|
||||
#: field:stock.warehouse.orderpoint,procurement_id:0
|
||||
msgid "Purchase Order"
|
||||
msgstr ""
|
||||
msgstr "Заказ на закупку"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.production:0
|
||||
msgid "Production Workcenters"
|
||||
msgstr ""
|
||||
msgstr "Участки обработки"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.property.group:0
|
||||
|
@ -1456,7 +1463,7 @@ msgstr "численные индексы"
|
|||
#. module: mrp
|
||||
#: model:process.transition,note:mrp.process_transition_servicerfq0
|
||||
msgid "If Procure method is Make to order and supply method is buy"
|
||||
msgstr ""
|
||||
msgstr "Если способ снабжения \"изготовление на заказ\" и изделие закупается"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.transition,note:mrp.process_transition_procurestockableproduct0
|
||||
|
@ -1468,7 +1475,7 @@ msgstr ""
|
|||
#: view:mrp.production:0
|
||||
#: rml:mrp.production.order:0
|
||||
msgid "Work Orders"
|
||||
msgstr ""
|
||||
msgstr "Технологиские операции"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.workcenter,costs_cycle:0
|
||||
|
@ -1478,7 +1485,7 @@ msgstr "Стоимость по циклам"
|
|||
#. module: mrp
|
||||
#: model:ir.model,name:mrp.model_mrp_bom_revision
|
||||
msgid "Bill of material revisions"
|
||||
msgstr ""
|
||||
msgstr "Ревизии спецификации"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.procurement:0
|
||||
|
@ -1505,7 +1512,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: field:mrp.workcenter,time_cycle:0
|
||||
msgid "Time for 1 cycle (hour)"
|
||||
msgstr "Время цикла (часов)"
|
||||
msgstr "Оперативное время"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_view:product.product.procurement,done:0
|
||||
|
@ -1541,7 +1548,7 @@ msgstr "Категории свойств"
|
|||
#: model:ir.actions.wizard,name:mrp.wiz_mrp_proc1
|
||||
#: model:ir.ui.menu,name:mrp.menu_wiz_mrp_proc1
|
||||
msgid "Compute Procurements Only"
|
||||
msgstr ""
|
||||
msgstr "Рассчитать только снабжение"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.production,product_uos_qty:0
|
||||
|
@ -1557,7 +1564,7 @@ msgstr "Структура спецификации"
|
|||
#. module: mrp
|
||||
#: field:mrp.bom,date_stop:0
|
||||
msgid "Valid Until"
|
||||
msgstr ""
|
||||
msgstr "Действителен до"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action11
|
||||
|
@ -1568,7 +1575,7 @@ msgstr "Временные исключения снабжения"
|
|||
#. module: mrp
|
||||
#: field:mrp.bom,date_start:0
|
||||
msgid "Valid From"
|
||||
msgstr ""
|
||||
msgstr "Действителен от"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.bom,type:0
|
||||
|
@ -1607,7 +1614,7 @@ msgstr ""
|
|||
msgid ""
|
||||
"Efficiency on the production. A factor of 0.9 means a loss of 10% in the "
|
||||
"production."
|
||||
msgstr ""
|
||||
msgstr "Коэффициент потерь. Значение 0,9 означает потерю 10% продукции."
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom,product_rounding:0
|
||||
|
@ -1617,7 +1624,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: field:mrp.production.workcenter.line,name:0
|
||||
msgid "Work Order"
|
||||
msgstr ""
|
||||
msgstr "Техн. операция"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.production:0
|
||||
|
@ -1627,7 +1634,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_serviceonorder0
|
||||
msgid "If procurement is make to order"
|
||||
msgstr ""
|
||||
msgstr "Если изделие изготовляется на заказ"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.bom,method:0
|
||||
|
@ -1637,7 +1644,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: model:process.node,name:mrp.process_node_minimumstockrule0
|
||||
msgid "Minimum Stock Rule"
|
||||
msgstr ""
|
||||
msgstr "Правила минимальных запасов"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.actions.act_window,name:mrp.mrp_bom_form_action_new
|
||||
|
@ -1648,7 +1655,7 @@ msgstr "Новая спецификация"
|
|||
#. module: mrp
|
||||
#: field:mrp.workcenter,time_stop:0
|
||||
msgid "Time after prod."
|
||||
msgstr ""
|
||||
msgstr "Заключительное время"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_field:mrp.workcenter.load,init,time_unit:0
|
||||
|
@ -1658,12 +1665,12 @@ msgstr "Тип периода"
|
|||
#. module: mrp
|
||||
#: view:mrp.production:0
|
||||
msgid "Total Qty"
|
||||
msgstr ""
|
||||
msgstr "Итоговое кол-во"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.routing.workcenter,hour_nbr:0
|
||||
msgid "Number of Hours"
|
||||
msgstr ""
|
||||
msgstr "Количество часов"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action
|
||||
|
@ -1684,7 +1691,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: help:mrp.workcenter,time_start:0
|
||||
msgid "Time in hours for the setup."
|
||||
msgstr ""
|
||||
msgstr "Время наладки в часах"
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.production,state:0
|
||||
|
@ -1710,6 +1717,8 @@ msgid ""
|
|||
"operations and to plan futur loads on workcenters based on production "
|
||||
"plannification."
|
||||
msgstr ""
|
||||
"Список операций и участков обработки для производства готового изделия. "
|
||||
"Обычно используется для расчёта и планирования загрузки участков."
|
||||
|
||||
#. module: mrp
|
||||
#: selection:mrp.production,state:0
|
||||
|
@ -1730,7 +1739,7 @@ msgstr "Новый заказ на производство"
|
|||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_rfq0
|
||||
msgid "A Request for Quotation is created and sent to the supplier."
|
||||
msgstr ""
|
||||
msgstr "Заявка выслана поставщику"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom.revision,last_indice:0
|
||||
|
@ -1741,7 +1750,7 @@ msgstr "последний индекс"
|
|||
#: field:mrp.bom,revision_ids:0
|
||||
#: view:mrp.bom.revision:0
|
||||
msgid "BoM Revisions"
|
||||
msgstr ""
|
||||
msgstr "Ревизии спецификации"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.procurement:0
|
||||
|
@ -1769,7 +1778,7 @@ msgstr ""
|
|||
#: model:ir.actions.act_window,name:mrp.mrp_production_action2
|
||||
#: model:ir.ui.menu,name:mrp.menu_production_orders_start
|
||||
msgid "Production Orders To Start"
|
||||
msgstr ""
|
||||
msgstr "Заказы на производство, готовые к запуску"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.procurement:0
|
||||
|
@ -1836,7 +1845,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: model:process.node,note:mrp.process_node_productminimumstockrule0
|
||||
msgid "Create minimum stock rules"
|
||||
msgstr ""
|
||||
msgstr "Создать правила минимальных запасов"
|
||||
|
||||
#. module: mrp
|
||||
#: wizard_field:product.product.procurement,init,warehouse_id:0
|
||||
|
@ -1864,7 +1873,7 @@ msgstr ""
|
|||
#. module: mrp
|
||||
#: wizard_view:change_production_qty,confirm:0
|
||||
msgid "Change Product Qty"
|
||||
msgstr ""
|
||||
msgstr "Изменить кол-о"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.bom.revision,description:0
|
||||
|
@ -1887,7 +1896,7 @@ msgstr "Выполняется"
|
|||
#. module: mrp
|
||||
#: model:ir.ui.menu,name:mrp.menu_mrp_root
|
||||
msgid "Manufacturing"
|
||||
msgstr ""
|
||||
msgstr "Производство"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action3
|
||||
|
@ -1904,12 +1913,12 @@ msgstr "Структура спецификации"
|
|||
#. module: mrp
|
||||
#: model:ir.actions.wizard,name:mrp.wizard_workcenter_load
|
||||
msgid "Workcenter load"
|
||||
msgstr ""
|
||||
msgstr "Загрузка участка"
|
||||
|
||||
#. module: mrp
|
||||
#: help:mrp.workcenter,time_stop:0
|
||||
msgid "Time in hours for the cleaning."
|
||||
msgstr ""
|
||||
msgstr "Время в часах на сбор отходов"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.procurement:0
|
||||
|
@ -1919,7 +1928,7 @@ msgstr "Детали снабжения"
|
|||
#. module: mrp
|
||||
#: model:process.transition,note:mrp.process_transition_bom0
|
||||
msgid "You can see its bill of material which are used to make product"
|
||||
msgstr ""
|
||||
msgstr "Посмотреть спецификацию, по которой изготовляется изделие"
|
||||
|
||||
#. module: mrp
|
||||
#: field:mrp.production,date_planned_end:0
|
||||
|
@ -1996,4 +2005,4 @@ msgstr "Изменения оценки запасов"
|
|||
#. module: mrp
|
||||
#: view:board.board:0
|
||||
msgid "Next production orders"
|
||||
msgstr ""
|
||||
msgstr "Ближайшие заказы на производство"
|
||||
|
|
|
@ -34,15 +34,12 @@ import time
|
|||
# capacity_hour : capacity per hour. default: 1.0.
|
||||
# Eg: If 5 concurrent operations at one time: capacity = 5 (because 5 employees)
|
||||
# unit_per_cycle : how many units are produced for one cycle
|
||||
#
|
||||
# TODO: Work Center may be recursive ?
|
||||
#
|
||||
|
||||
class mrp_workcenter(osv.osv):
|
||||
_name = 'mrp.workcenter'
|
||||
_description = 'Work Center'
|
||||
_inherits = {'resource.resource':"resource_id"}
|
||||
_columns = {
|
||||
# 'name': fields.char('Work Center Name', size=64, required=True),
|
||||
'note': fields.text('Description', help="Description of the workcenter. Explain here what's a cycle according to this workcenter."),
|
||||
'capacity_per_cycle': fields.float('Capacity per Cycle', help="Number of operations this workcenter can do in parallel. If this workcenter represents a team of 5 workers, the capacity per cycle is 5."),
|
||||
'time_cycle': fields.float('Time for 1 cycle (hour)', help="Time in hours for doing one cycle."),
|
||||
|
@ -56,7 +53,6 @@ class mrp_workcenter(osv.osv):
|
|||
help="Complete this only if you want automatic analytic accounting entries on production orders."),
|
||||
'costs_journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'),
|
||||
'costs_general_account_id': fields.many2one('account.account', 'General Account', domain=[('type','<>','view')]),
|
||||
# 'company_id': fields.many2one('res.company','Company',required=True),
|
||||
'resource_id': fields.many2one('resource.resource','Resource',ondelete='cascade'),
|
||||
}
|
||||
_defaults = {
|
||||
|
@ -255,7 +251,6 @@ class mrp_bom(osv.osv):
|
|||
@return: False or BoM id.
|
||||
"""
|
||||
bom_result = False
|
||||
# Why searching on BoM without parent ?
|
||||
cr.execute('select id from mrp_bom where product_id=%s and bom_id is null order by sequence', (product_id,))
|
||||
ids = map(lambda x: x[0], cr.fetchall())
|
||||
max_prop = 0
|
||||
|
@ -607,9 +602,6 @@ class mrp_production(osv.osv):
|
|||
if not bom_id:
|
||||
raise osv.except_osv(_('Error'), _("Couldn't find bill of material for product"))
|
||||
|
||||
#if bom_point.routing_id and bom_point.routing_id.location_id:
|
||||
# self.write(cr, uid, [production.id], {'location_src_id': bom_point.routing_id.location_id.id})
|
||||
|
||||
factor = production.product_qty * production.product_uom.factor / bom_point.product_uom.factor
|
||||
res = bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, properties)
|
||||
results = res[0]
|
||||
|
@ -631,11 +623,9 @@ class mrp_production(osv.osv):
|
|||
if production.move_created_ids:
|
||||
move_obj.action_cancel(cr, uid, [x.id for x in production.move_created_ids])
|
||||
move_obj.action_cancel(cr, uid, [x.id for x in production.move_lines])
|
||||
self.write(cr, uid, ids, {'state': 'cancel'}) #,'move_lines':[(6,0,[])]})
|
||||
self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
return True
|
||||
|
||||
#XXX: may be a bug here; lot_lines are unreserved for a few seconds;
|
||||
# between the end of the picking list and the call to this function
|
||||
def action_ready(self, cr, uid, ids):
|
||||
""" Changes the production state to Ready and location id of stock move.
|
||||
@return: True
|
||||
|
@ -981,3 +971,4 @@ class mrp_production_product_line(osv.osv):
|
|||
}
|
||||
mrp_production_product_line()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<data noupdate="1">
|
||||
|
||||
<!--
|
||||
Resource: mrp.workcenter
|
||||
-->
|
||||
Resource: mrp.workcenter
|
||||
-->
|
||||
|
||||
<record id="mrp_workcenter_0" model="mrp.workcenter">
|
||||
<field name="name">Assembly workshop</field>
|
||||
|
@ -16,8 +16,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Resource: mrp.property.group
|
||||
-->
|
||||
Resource: mrp.property.group
|
||||
-->
|
||||
|
||||
<record id="mrp_property_group_ram" model="mrp.property.group">
|
||||
<field name="name">RAM</field>
|
||||
|
@ -54,8 +54,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Resource: mrp.property
|
||||
-->
|
||||
Resource: mrp.property
|
||||
-->
|
||||
|
||||
<record id="mrp_property_0" model="mrp.property">
|
||||
<field name="group_id" ref="mrp_property_group_ram"/>
|
||||
|
@ -119,8 +119,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Resource: mrp.routing
|
||||
-->
|
||||
Resource: mrp.routing
|
||||
-->
|
||||
|
||||
<record id="mrp_routing_0" model="mrp.routing">
|
||||
<field name="workcenter_lines">[1]</field>
|
||||
|
@ -136,8 +136,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Resource: mrp.routing.workcenter
|
||||
-->
|
||||
Resource: mrp.routing.workcenter
|
||||
-->
|
||||
|
||||
<record id="mrp_routing_workcenter_0" model="mrp.routing.workcenter">
|
||||
<field name="routing_id" ref="mrp_routing_0"/>
|
||||
|
@ -160,8 +160,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Resource: mrp.bom
|
||||
-->
|
||||
Resource: mrp.bom
|
||||
-->
|
||||
|
||||
<record id="mrp_bom_0" model="mrp.bom">
|
||||
<field name="name">Regular processor config</field>
|
||||
|
@ -555,5 +555,164 @@
|
|||
<field model="product.product" name="product_id" ref="product.product_product_24"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: mrp.bom new EVV
|
||||
-->
|
||||
|
||||
<record id="mrp_bom_assemblysection0" model="mrp.bom">
|
||||
<field name="name">Assembly Section</field>
|
||||
<field name="sequence">123</field>
|
||||
<field name="product_id" ref="product.product_product_assemblysection0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">4.0</field>
|
||||
<field model="mrp.bom" name="bom_id" search="[('name', '=', u'Default BOM for Shelf of 100cm')]"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_sidepanel0" model="mrp.bom">
|
||||
<field name="name">Side Panel</field>
|
||||
<field name="sequence">125</field>
|
||||
<field name="product_id" ref="product.product_product_sidepanel0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">2.0</field>
|
||||
<field model="mrp.bom" name="bom_id" search="[('name', '=', u'Default BOM for Shelf of 100cm')]"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_metalcleats0" model="mrp.bom">
|
||||
<field name="name">Metal Cleats</field>
|
||||
<field name="sequence">127</field>
|
||||
<field name="product_id" ref="product.product_product_metalcleats0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">12.0</field>
|
||||
<field model="mrp.bom" name="bom_id" search="[('name', '=', u'Default BOM for Shelf of 100cm')]"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_defaultbomforshelfofcm0" model="mrp.bom">
|
||||
<field name="name">Default BOM for Shelf of 100cm</field>
|
||||
<field name="code">SHE100</field>
|
||||
<field name="sequence">129</field>
|
||||
<field name="product_id" ref="product.product_product_shelfofcm0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_rearpanelarm0" model="mrp.bom">
|
||||
<field name="sequence">131</field>
|
||||
<field name="product_id" ref="product.product_product_rearpanelarm0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field name="name">Rear panel SHE100</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_shelf0" model="mrp.bom">
|
||||
<field name="sequence">133</field>
|
||||
<field name="product_id" ref="product.product_product_shelf0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
|
||||
<field name="product_qty">3.0</field>
|
||||
<field name="name">Shelf 100</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_woodlintelm0" model="mrp.bom">
|
||||
<field name="sequence">135</field>
|
||||
<field name="product_id" ref="product.product_product_woodlintelm0"/>
|
||||
<field name="product_uom" ref="product.product_uom_meter"/>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field model="mrp.bom" name="bom_id" search="[('name', '=', u'Assembly Section')]"/>
|
||||
<field name="name">Wood Lintel 4m</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_defaultbomforshelfofcm1" model="mrp.bom">
|
||||
<field name="name">Default BOM for Shelf of 200cm</field>
|
||||
<field name="code">SHE200</field>
|
||||
<field name="sequence">137</field>
|
||||
<field name="product_id" ref="product.product_product_shelfofcm0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_defaultbomforkitshelfofcm0" model="mrp.bom">
|
||||
<field name="name">Default BOM for KIT Shelf of 100cm</field>
|
||||
<field name="code">SHE100KIT</field>
|
||||
<field name="sequence">139</field>
|
||||
<field name="product_id" ref="product.product_product_kitshelfofcm0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field name="type">phantom</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_rearpanelarm1" model="mrp.bom">
|
||||
<field name="sequence">141</field>
|
||||
<field name="product_id" ref="product.product_product_rearpanelarm0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field name="name">Rear panel SHE100</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_assemblysection2" model="mrp.bom">
|
||||
<field name="name">Assembly Section</field>
|
||||
<field name="sequence">143</field>
|
||||
<field name="product_id" ref="product.product_product_assemblysection0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">4.0</field>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforkitshelfofcm0"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_sidepanel2" model="mrp.bom">
|
||||
<field name="name">Side Panel</field>
|
||||
<field name="sequence">145</field>
|
||||
<field name="product_id" ref="product.product_product_sidepanel0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">2.0</field>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforkitshelfofcm0"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_rearpanelarm2" model="mrp.bom">
|
||||
<field name="sequence">147</field>
|
||||
<field name="product_id" ref="product.product_product_rearpanelarm0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field name="name">Rear panel SHE200</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_assemblysection3" model="mrp.bom">
|
||||
<field name="name">Assembly Section</field>
|
||||
<field name="sequence">149</field>
|
||||
<field name="product_id" ref="product.product_product_assemblysection0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">4.0</field>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_sidepanel3" model="mrp.bom">
|
||||
<field name="name">Side Panel</field>
|
||||
<field name="sequence">151</field>
|
||||
<field name="product_id" ref="product.product_product_sidepanel0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">2.0</field>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_shelf2" model="mrp.bom">
|
||||
<field name="sequence">153</field>
|
||||
<field name="product_id" ref="product.product_product_shelf1"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
|
||||
<field name="product_qty">3.0</field>
|
||||
<field name="name">Shelf 200</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_metalcleats3" model="mrp.bom">
|
||||
<field name="name">Metal Cleats</field>
|
||||
<field name="sequence">155</field>
|
||||
<field name="product_id" ref="product.product_product_metalcleats0"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">12.0</field>
|
||||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm1"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -55,7 +55,7 @@ class procurement_order(osv.osv):
|
|||
procurement_obj = self.pool.get('procurement.order')
|
||||
res = procurement_obj.make_mo(cr, uid, ids, context=context)
|
||||
res = res.values()
|
||||
return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value
|
||||
return len(res) and res[0] or 0
|
||||
|
||||
def make_mo(self, cr, uid, ids, context={}):
|
||||
""" Make Manufacturing(production) order from procurement
|
||||
|
|
|
@ -32,7 +32,7 @@ class product_product(osv.osv):
|
|||
@return: dictionary which contains information regarding stock input account, stock output account and stock journal
|
||||
"""
|
||||
product_obj = self.pool.get('product.product').browse(cr, uid, product_id, False)
|
||||
|
||||
res = super(product_product,self).get_product_accounts(cr, uid, product_id, context)
|
||||
stock_input_acc = product_obj.property_stock_account_input and product_obj.property_stock_account_input.id or False
|
||||
if not stock_input_acc:
|
||||
stock_input_acc = product_obj.categ_id.property_stock_account_input_categ and product_obj.categ_id.property_stock_account_input_categ.id or False
|
||||
|
@ -43,7 +43,6 @@ class product_product(osv.osv):
|
|||
|
||||
journal_id = product_obj.categ_id.property_stock_journal and product_obj.categ_id.property_stock_journal.id or False
|
||||
|
||||
res = {}
|
||||
res.update({'stock_account_input': stock_input_acc})
|
||||
res.update({'stock_account_output': stock_output_acc})
|
||||
res.update({'stock_journal': journal_id})
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
## -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
# 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 General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields,osv
|
||||
import tools
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
import time
|
||||
from report import report_sxw
|
||||
from osv import osv
|
||||
import pooler
|
||||
|
||||
class order(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
|
@ -31,9 +29,6 @@ class order(report_sxw.rml_parse):
|
|||
'time': time,
|
||||
})
|
||||
|
||||
|
||||
|
||||
report_sxw.report_sxw('report.mrp.production.order','mrp.production','addons/mrp/report/order.rml',parser=order,header=1)
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -173,7 +173,6 @@ class report_custom(report_int):
|
|||
ar.add_plot(bar_plot.T(label=workcenter['name'], data=data, fill_style=f, hcol=workcenter_num+1, cluster=(workcenter_num, len(res))))
|
||||
workcenter_num += 1
|
||||
|
||||
#plot = bar_plot.T(label=workcenter['name'], data=data, hcol=1, fill_style=fill_style.white, cluster=(color_index,len(ids)))
|
||||
if (not data) or (len(data[0]) <= 1):
|
||||
ar = self._empty_graph(time.strftime('%Y-%m-%d'))
|
||||
ar.draw(can)
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
-
|
||||
!function {model: procurement.order, name: run_scheduler}:
|
||||
- model: procurement.order
|
||||
search: "[('state','!=','confirmed')]"
|
||||
search: "[('state','=','confirmed')]"
|
||||
-
|
||||
I am checking Internal picking. I see one picking for Orange juice and its
|
||||
stock moves for Oranges, Sugar and Water made correctly.
|
||||
|
|
|
@ -47,3 +47,5 @@ class change_standard_price(osv.osv_memory):
|
|||
return super(change_standard_price, self).change_price(cr, uid, ids, context=context)
|
||||
|
||||
change_standard_price()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -74,3 +74,4 @@ class mrp_product_produce(osv.osv_memory):
|
|||
|
||||
mrp_product_produce()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
'depends': ['procurement'],
|
||||
'update_xml': ['mrp_jit.xml'],
|
||||
'demo_xml': [],
|
||||
'test': ['test/mrp_jit.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0086634760061',
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
-
|
||||
In order to test mrp_jit module with OpenERP, I will create manufacturing order
|
||||
and check whether the procurement orders run without scheduler or not.
|
||||
-
|
||||
!record {model: mrp.production, id: mrp_production_mo0}:
|
||||
bom_id: mrp.mrp_bom_1
|
||||
company_id: base.main_company
|
||||
date_planned: '2010-08-05 17:59:49'
|
||||
location_dest_id: stock.stock_location_stock
|
||||
location_src_id: stock.stock_location_stock
|
||||
name: MO/00017
|
||||
product_id: product.product_product_pc2
|
||||
product_qty: 10.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 0.0
|
||||
routing_id: mrp.mrp_routing_0
|
||||
-
|
||||
|
|
||||
I confirm production order.
|
||||
-
|
||||
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0}
|
||||
-
|
||||
|
|
||||
I check the procurement orders generated from the production order.
|
||||
-
|
||||
|
|
||||
It runs without using schedulers.
|
||||
-
|
||||
!python {model: procurement.order}: |
|
||||
prod_obj = self.pool.get('mrp.production')
|
||||
production = prod_obj.browse(cr, uid, ref('mrp_production_mo0'))
|
||||
products = map(lambda x:x.product_id.id, production.move_lines)
|
||||
procurement_ids = self.search(cr, uid, [('product_id','in',products)])
|
||||
procurements = self.browse(cr, uid, procurement_ids)
|
||||
assert all(proc.state != 'confirmed' for proc in procurements), 'Procurement not scheduled!'
|
|
@ -34,9 +34,6 @@ from tools.translate import _
|
|||
# capacity_hour : capacity per hour. default: 1.0.
|
||||
# Eg: If 5 concurrent operations at one time: capacity = 5 (because 5 employees)
|
||||
# unit_per_cycle : how many units are produced for one cycle
|
||||
#
|
||||
# TODO: Work Center may be recursive ?
|
||||
#
|
||||
|
||||
class stock_move(osv.osv):
|
||||
_inherit = 'stock.move'
|
||||
|
|
|
@ -411,7 +411,6 @@ class mrp_repair(osv.osv):
|
|||
})
|
||||
repair_fee_obj.write(cr, uid, [fee.id], {'invoiced': True, 'invoice_line_id': invoice_fee_id})
|
||||
res[repair.id] = inv_id
|
||||
#self.action_invoice_end(cr, uid, ids)
|
||||
return res
|
||||
|
||||
def action_repair_ready(self, cr, uid, ids, context=None):
|
||||
|
@ -444,7 +443,6 @@ class mrp_repair(osv.osv):
|
|||
if (order.invoice_method == 'b4repair'):
|
||||
val['state'] = 'ready'
|
||||
else:
|
||||
#val['state'] = 'done'
|
||||
pass
|
||||
self.write(cr, uid, [order.id], val)
|
||||
return True
|
||||
|
@ -462,7 +460,6 @@ class mrp_repair(osv.osv):
|
|||
elif (not order.invoiced and order.invoice_method=='b4repair'):
|
||||
val['state'] = 'ready'
|
||||
else:
|
||||
#val['state'] = 'done'
|
||||
pass
|
||||
self.write(cr, uid, [order.id], val)
|
||||
return True
|
||||
|
@ -496,7 +493,6 @@ class mrp_repair(osv.osv):
|
|||
'state': 'done',
|
||||
})
|
||||
repair_line_obj.write(cr, uid, [move.id], {'move_id': move_id})
|
||||
|
||||
if repair.deliver_bool:
|
||||
pick_name = seq_obj.get(cr, uid, 'stock.picking.out')
|
||||
picking = pick_obj.create(cr, uid, {
|
||||
|
@ -509,23 +505,20 @@ class mrp_repair(osv.osv):
|
|||
'invoice_state': 'none',
|
||||
'type': 'out',
|
||||
})
|
||||
wf_service.trg_validate(uid, 'stock.picking', picking, 'button_confirm', cr)
|
||||
|
||||
move_id = move_obj.create(cr, uid, {
|
||||
'name': repair.name,
|
||||
'picking_id': picking,
|
||||
'product_id': repair.product_id.id,
|
||||
'product_qty': 1.0,
|
||||
'product_uom': repair.product_id.uom_id.id,
|
||||
#'product_uos_qty': line.product_uom_qty,
|
||||
#'product_uos': line.product_uom.id,
|
||||
'prodlot_id': repair.prodlot_id and repair.prodlot_id.id or False,
|
||||
'address_id': repair.address_id and repair.address_id.id or False,
|
||||
'location_id': repair.location_id.id,
|
||||
'location_dest_id': repair.location_dest_id.id,
|
||||
'tracking_id': False,
|
||||
'state': 'assigned', # FIXME done ?
|
||||
'state': 'assigned',
|
||||
})
|
||||
wf_service.trg_validate(uid, 'stock.picking', picking, 'button_confirm', cr)
|
||||
self.write(cr, uid, [repair.id], {'state': 'done', 'picking_id': picking})
|
||||
res[repair.id] = picking
|
||||
else:
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
<search string="Search Reair Orders">
|
||||
<group col='4' colspan='4'>
|
||||
<filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-check" string="Confirmed" domain="[('state','=', 'confirmed)]" name="current" />
|
||||
<filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]" name="current" />
|
||||
<filter icon="terp-emblem-important" string="Ready To Repair" domain="[('state','=','ready')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-dolar" string="invoiced" domain="[('state','=','2binvoiced')]"/>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- |
|
||||
In order to test "mrp_repair" module, I start with creating repairt order, confirm it, and start repair.
|
||||
In order to test "mrp_repair" module, I start with creating repair order, confirm it, and start repair.
|
||||
|
||||
- |
|
||||
Given that I have already stock move line created.
|
||||
|
|
|
@ -38,6 +38,7 @@ With this module:
|
|||
'init_xml': [],
|
||||
'update_xml': ['security/ir.model.access.csv', 'mrp_subproduct_view.xml'],
|
||||
'demo_xml': [],
|
||||
'test': ['test/mrp_subproduct.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0050060616733',
|
||||
|
|
|
@ -0,0 +1,169 @@
|
|||
-
|
||||
In order to test mrp_subproduct with OpenERP, I create a bill of material with subproducts.
|
||||
I make a production order, confirm it so stock moves for subproducts are generated.
|
||||
-
|
||||
I create a record for the product Chair.
|
||||
-
|
||||
!record {model: product.product, id: product_product_woodenchair0}:
|
||||
categ_id: product.cat1
|
||||
name: Wooden Chair
|
||||
procure_method: make_to_stock
|
||||
supply_method: produce
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
property_stock_inventory: stock.location_inventory
|
||||
property_stock_procurement: stock.location_procurement
|
||||
property_stock_production: stock.location_production
|
||||
-
|
||||
I create a record for the product Wood.
|
||||
-
|
||||
!record {model: product.product, id: product_product_wood0}:
|
||||
categ_id: product.cat1
|
||||
name: Wood
|
||||
procure_method: make_to_order
|
||||
supply_method: buy
|
||||
property_stock_inventory: stock.location_inventory
|
||||
property_stock_procurement: stock.location_procurement
|
||||
property_stock_production: stock.location_production
|
||||
seller_ids:
|
||||
- delay: 1
|
||||
name: base.res_partner_maxtor
|
||||
min_qty: 300.0
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
-
|
||||
I create a record for the product Nails.
|
||||
-
|
||||
!record {model: product.product, id: product_product_nails0}:
|
||||
categ_id: product.cat1
|
||||
name: Nails
|
||||
procure_method: make_to_order
|
||||
supply_method: buy
|
||||
property_stock_inventory: stock.location_inventory
|
||||
property_stock_procurement: stock.location_procurement
|
||||
property_stock_production: stock.location_production
|
||||
seller_ids:
|
||||
- delay: 1
|
||||
name: base.res_partner_asus
|
||||
min_qty: 500.0
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
-
|
||||
I create a record for the product Table.
|
||||
-
|
||||
!record {model: product.product, id: product_product_woodentable0}:
|
||||
categ_id: product.cat1
|
||||
name: Wooden Table
|
||||
procure_method: make_to_stock
|
||||
supply_method: produce
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
property_stock_inventory: stock.location_inventory
|
||||
property_stock_procurement: stock.location_procurement
|
||||
property_stock_production: stock.location_production
|
||||
-
|
||||
Now I create a bill of material for the product Wooden Chair.
|
||||
-
|
||||
!record {model: mrp.bom, id: mrp_bom_woodenchair0}:
|
||||
company_id: base.main_company
|
||||
name: Wooden Chair
|
||||
product_efficiency: 1.0
|
||||
product_id: product_product_woodenchair0
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 0.0
|
||||
type: normal
|
||||
bom_lines:
|
||||
- company_id: base.main_company
|
||||
name: Wood
|
||||
product_efficiency: 1.0
|
||||
product_id: product_product_wood0
|
||||
product_qty: 10.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 0.0
|
||||
sequence: 0.0
|
||||
type: normal
|
||||
- company_id: base.main_company
|
||||
name: Nails
|
||||
product_efficiency: 1.0
|
||||
product_id: product_product_nails0
|
||||
product_qty: 35.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 0.0
|
||||
sequence: 0.0
|
||||
type: normal
|
||||
sub_products:
|
||||
- product_id: product_product_woodentable0
|
||||
product_uom: product.product_uom_unit
|
||||
product_qty: 1.0
|
||||
subproduct_type: fixed
|
||||
-
|
||||
I create a production order for Wooden Chair.
|
||||
-
|
||||
!record {model: mrp.production, id: mrp_production_mo0}:
|
||||
bom_id: mrp_bom_woodenchair0
|
||||
company_id: base.main_company
|
||||
date_planned: '2010-08-06 14:55:52'
|
||||
location_dest_id: stock.stock_location_stock
|
||||
location_src_id: stock.stock_location_stock
|
||||
name: MO/00004
|
||||
product_id: product_product_woodenchair0
|
||||
product_qty: 10.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 0.0
|
||||
-
|
||||
I compute the data of production order.
|
||||
-
|
||||
!python {model: mrp.production}: |
|
||||
self.action_compute(cr, uid, [ref("mrp_production_mo0")], {"lang": "en_US", "tz": False, "search_default_Current":
|
||||
1, "active_model": "ir.ui.menu", "active_ids": [ref("mrp.menu_mrp_production_action")],
|
||||
"active_id": ref("mrp.menu_mrp_production_action"), })
|
||||
-
|
||||
I confirm the production order.
|
||||
-
|
||||
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0}
|
||||
-
|
||||
Now I check the stock moves for the subproduct I created in the bill of material.
|
||||
This move is created automatically when I confirmed the production order.
|
||||
-
|
||||
!python {model: stock.move}: |
|
||||
move_id = self.search(cr, uid, [('product_id','=',ref('product_product_woodentable0'))])
|
||||
assert move_id, 'No moves are created !'
|
||||
-
|
||||
I want to start the production so I force the reservation of products.
|
||||
-
|
||||
!python {model: mrp.production}: |
|
||||
self.force_production(cr, uid, [ref("mrp_production_mo0")], {"lang": "en_US", "tz": False,
|
||||
"search_default_Current": 1, "active_model": "ir.ui.menu", "active_ids":
|
||||
[ref("mrp.menu_mrp_production_action")], "active_id": ref("mrp.menu_mrp_production_action"),
|
||||
})
|
||||
-
|
||||
I start the production.
|
||||
-
|
||||
!workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo0}
|
||||
-
|
||||
I consume and produce the Production of products.
|
||||
-
|
||||
I create record for selecting mode and quantity of products to produce.
|
||||
-
|
||||
!record {model: mrp.product.produce, id: mrp_product_produce0}:
|
||||
product_qty: 10.00
|
||||
mode: 'consume_produce'
|
||||
-
|
||||
I finish the production order.
|
||||
-
|
||||
!python {model: mrp.product.produce}: |
|
||||
self.do_produce(cr, uid, [ref("mrp_product_produce0")], {"lang": "en_US", "tz":
|
||||
False, "search_default_Current": 1, "active_model": "mrp.production", "active_ids":
|
||||
[ref("mrp_production_mo0")], "active_id": ref("mrp_production_mo0"), })
|
||||
-
|
||||
I see that stock moves of Wood and Nails including Wooden Table are done now.
|
||||
-
|
||||
!python {model: stock.move}: |
|
||||
move_ids = self.search(cr, uid, [('product_id','in',[ref("product_product_woodenchair0"),ref("product_product_woodentable0"),ref("product_product_wood0"),ref("product_product_nails0")])])
|
||||
moves = self.browse(cr, uid, move_ids)
|
||||
assert all(move.state == 'done' for move in moves), 'Moves are not done!'
|
|
@ -0,0 +1,31 @@
|
|||
# Mongolian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-08-06 08:47+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Mongolian <mn@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-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr ""
|
|
@ -0,0 +1 @@
|
|||
python addin.py
|
|
@ -0,0 +1 @@
|
|||
python addin.py --unregister
|
File diff suppressed because it is too large
Load Diff
|
@ -1,375 +1,376 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import xmlrpclib
|
||||
import sys
|
||||
import socket
|
||||
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
|
||||
try:
|
||||
res = getattr(connector,method)(*args)
|
||||
except socket.error,e:
|
||||
if e.args[0] == 111:
|
||||
if wait_count > wait_limit:
|
||||
print "Server is taking too long to start, it has exceeded the maximum limit of %d seconds."%(wait_limit)
|
||||
clean()
|
||||
sys.exit(1)
|
||||
print 'Please wait %d sec to start server....'%(waittime)
|
||||
wait_count += 1
|
||||
time.sleep(waittime)
|
||||
res = execute(connector, method, *args)
|
||||
else:
|
||||
return res
|
||||
wait_count = 0
|
||||
return res
|
||||
|
||||
class XMLRpcConn(object):
|
||||
__name__ = 'XMLRpcConn'
|
||||
_com_interfaces_ = ['_IDTExtensibility2']
|
||||
_public_methods_ = ['GetDBList', 'login', 'GetAllObjects', 'GetObjList', 'InsertObj', 'DeleteObject', \
|
||||
'ArchiveToOpenERP', 'IsCRMInstalled', 'GetPartners', 'GetObjectItems', \
|
||||
'CreateCase', 'MakeAttachment', 'CreateContact', 'CreatePartner', 'getitem', 'setitem', \
|
||||
'SearchPartnerDetail', 'WritePartnerValues', 'GetAllState', 'GetAllCountry' ]
|
||||
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
|
||||
_reg_clsid_ = "{C6399AFD-763A-400F-8191-7F9D0503CAE2}"
|
||||
_reg_progid_ = "Python.OpenERP.XMLRpcConn"
|
||||
_reg_policy_spec_ = "win32com.server.policy.EventHandlerPolicy"
|
||||
def __init__(self,server='localhost',port=8069,uri='http://localhost:8069'):
|
||||
self._server=server
|
||||
self._port=port
|
||||
self._uri=uri
|
||||
self._obj_list=[]
|
||||
self._dbname=''
|
||||
self._uname='admin'
|
||||
self._pwd='a'
|
||||
self._login=False
|
||||
self._running=False
|
||||
self._uid=False
|
||||
self._iscrm=True
|
||||
self.partner_id_list=None
|
||||
self.protocol=None
|
||||
def getitem(self, attrib):
|
||||
v=self.__getattribute__(attrib)
|
||||
return str(v)
|
||||
|
||||
def setitem(self, attrib, value):
|
||||
return self.__setattr__(attrib, value)
|
||||
|
||||
def GetDBList(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/db')
|
||||
try:
|
||||
db_list = execute(conn, 'list')
|
||||
if db_list == False:
|
||||
self._running=False
|
||||
return []
|
||||
else:
|
||||
self._running=True
|
||||
except:
|
||||
db_list=-1
|
||||
self._running=True
|
||||
return db_list
|
||||
|
||||
def login(self,dbname, user, pwd):
|
||||
self._dbname = dbname
|
||||
self._uname = user
|
||||
self._pwd = pwd
|
||||
conn = xmlrpclib.ServerProxy(str(self._uri) + '/xmlrpc/common')
|
||||
uid = execute(conn,'login',dbname, ustr(user), ustr(pwd))
|
||||
return uid
|
||||
|
||||
def GetAllObjects(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[])
|
||||
objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',ids,['model'])
|
||||
obj_list = [item['model'] for item in objects]
|
||||
return obj_list
|
||||
|
||||
def GetObjList(self):
|
||||
self._obj_list=list(self._obj_list)
|
||||
self._obj_list.sort(reverse=True)
|
||||
return self._obj_list
|
||||
|
||||
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)))
|
||||
self._obj_list.sort(reverse=True)
|
||||
|
||||
def DeleteObject(self,sel_text):
|
||||
self._obj_list=list(self._obj_list)
|
||||
for obj in self._obj_list:
|
||||
if obj[0] == sel_text:
|
||||
self._obj_list.remove(obj)
|
||||
break
|
||||
|
||||
def ArchiveToOpenERP(self, recs, mail):
|
||||
import win32ui, win32con
|
||||
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object')
|
||||
import eml
|
||||
new_msg = files = ext_msg =""
|
||||
eml_path=eml.generateEML(mail)
|
||||
att_name = ustr(eml_path.split('\\')[-1])
|
||||
flag=False
|
||||
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):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=','crm.lead')])
|
||||
return id
|
||||
|
||||
def GetPartners(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids=[]
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[])
|
||||
ids.sort()
|
||||
obj_list=[]
|
||||
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'])))
|
||||
return obj_list
|
||||
|
||||
def GetObjectItems(self, search_list=[], search_text=''):
|
||||
import win32ui
|
||||
res = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
for obj in search_list:
|
||||
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']
|
||||
if obj == "res.partner.address":
|
||||
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'])
|
||||
if rec['street']:
|
||||
name += ', ' + ustr(rec['street'])
|
||||
if rec['city']:
|
||||
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'])
|
||||
res.append((obj,rec['id'],name,object_name))
|
||||
return res
|
||||
|
||||
def CreateCase(self, section, mail, partner_ids, with_attachments=True):
|
||||
res={}
|
||||
import win32ui
|
||||
section=str(section)
|
||||
partner_ids=eval(str(partner_ids))
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
res['name'] = ustr(mail.Subject)
|
||||
res['description'] = ustr(mail.Body)
|
||||
res['partner_name'] = ustr(mail.SenderName)
|
||||
res['email_from'] = ustr(mail.SenderEmailAddress)
|
||||
|
||||
if partner_ids:
|
||||
for partner_id in partner_ids:
|
||||
res['partner_id'] = partner_id
|
||||
partner_addr = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','address_get',[partner_id])
|
||||
res['partner_address_id'] = partner_addr['default']
|
||||
id=execute(conn,'execute',self._dbname,int(self._uid),self._pwd,section,'create',res)
|
||||
if section == 'project.issue':
|
||||
execute(conn,'execute',self._dbname,int(self._uid),self._pwd,section,'convert_to_bug',[id])
|
||||
recs=[(section,id,'')]
|
||||
if with_attachments:
|
||||
self.MakeAttachment(recs, mail)
|
||||
else:
|
||||
id=execute(conn,'execute',self._dbname,int(self._uid),self._pwd,section,'create',res)
|
||||
recs=[(section,id,'')]
|
||||
if with_attachments:
|
||||
self.MakeAttachment(recs, mail)
|
||||
|
||||
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)
|
||||
if len(fn) > 64:
|
||||
l = 64 - len(fn)
|
||||
f = fn.split('.')
|
||||
fn = f[0][0:l] + '.' + f[-1]
|
||||
att_path = os.path.join(att_folder_path,fn)
|
||||
attachments[i].SaveAsFile(att_path)
|
||||
f=open(att_path,"rb")
|
||||
content = "".join(f.readlines()).encode('base64')
|
||||
f.close()
|
||||
res['name'] = ustr(attachments[i].DisplayName)
|
||||
res['datas_fname'] = ustr(fn)
|
||||
res['datas'] = content
|
||||
res['res_id'] = obj_id
|
||||
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))
|
||||
|
||||
self.partner_id_list=eval(str(self.partner_id_list))
|
||||
if self.partner_id_list.get(sel,-999) != -999:
|
||||
res['partner_id'] = self.partner_id_list[sel]
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner.address','create',res)
|
||||
return id
|
||||
|
||||
def CreatePartner(self, res):
|
||||
res=eval(str(res))
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[('name','=',res['name'])])
|
||||
if ids:
|
||||
return False
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','create',res)
|
||||
return id
|
||||
|
||||
def SearchPartnerDetail(self, search_email_id):
|
||||
import win32ui
|
||||
res_vals = []
|
||||
address = {}
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
address_id = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','ilike',ustr(search_email_id))])
|
||||
if not address_id :
|
||||
return
|
||||
address = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','name','street','street2','city','state_id','country_id','phone','mobile','email','fax','zip'])
|
||||
for key, vals in address.items():
|
||||
res_vals.append([key,vals])
|
||||
return res_vals
|
||||
|
||||
def WritePartnerValues(self, new_vals):
|
||||
import win32ui
|
||||
flag = -1
|
||||
new_dict = dict(new_vals)
|
||||
email=new_dict['email']
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
address_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(email))])
|
||||
if not address_id:
|
||||
return flag
|
||||
address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','state_id','country_id'])
|
||||
vals_res_address={ 'name' : new_dict['name'],
|
||||
'street':new_dict['street'],
|
||||
'street2' : new_dict['street2'],
|
||||
'city' : new_dict['city'],
|
||||
'phone' : new_dict['phone'],
|
||||
'mobile' : new_dict['mobile'],
|
||||
'fax' : new_dict['fax'],
|
||||
'zip' : new_dict['zip'],
|
||||
}
|
||||
if new_dict['partner_id'] != -1:
|
||||
vals_res_address['partner_id'] = new_dict['partner_id']
|
||||
if new_dict['state_id'] != -1:
|
||||
vals_res_address['state_id'] = new_dict['state_id']
|
||||
if new_dict['country_id'] != -1:
|
||||
vals_res_address['country_id'] = new_dict['country_id']
|
||||
temp = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'write', address_id, vals_res_address)
|
||||
if temp:
|
||||
flag=1
|
||||
else:
|
||||
flag=0
|
||||
return flag
|
||||
|
||||
def GetAllState(self):
|
||||
import win32ui
|
||||
state_list = []
|
||||
state_ids = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/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'])))
|
||||
return state_list
|
||||
|
||||
def GetAllCountry(self):
|
||||
import win32ui
|
||||
country_list = []
|
||||
country_ids = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/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'])))
|
||||
return country_list
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import xmlrpclib
|
||||
import sys
|
||||
import socket
|
||||
import os
|
||||
import pythoncom
|
||||
import time
|
||||
from manager import ustr
|
||||
|
||||
import smtplib
|
||||
from email.mime.text import MIMEText
|
||||
from email.parser import*
|
||||
import email
|
||||
|
||||
waittime = 10
|
||||
wait_count = 0
|
||||
wait_limit = 12
|
||||
import binascii
|
||||
import base64
|
||||
def execute(connector, method, *args):
|
||||
global wait_count
|
||||
res = False
|
||||
try:
|
||||
res = getattr(connector,method)(*args)
|
||||
except socket.error,e:
|
||||
if e.args[0] == 111:
|
||||
if wait_count > wait_limit:
|
||||
print "Server is taking too long to start, it has exceeded the maximum limit of %d seconds."%(wait_limit)
|
||||
clean()
|
||||
sys.exit(1)
|
||||
print 'Please wait %d sec to start server....'%(waittime)
|
||||
wait_count += 1
|
||||
time.sleep(waittime)
|
||||
res = execute(connector, method, *args)
|
||||
else:
|
||||
return res
|
||||
wait_count = 0
|
||||
return res
|
||||
|
||||
class XMLRpcConn(object):
|
||||
__name__ = 'XMLRpcConn'
|
||||
_com_interfaces_ = ['_IDTExtensibility2']
|
||||
_public_methods_ = ['GetDBList', 'login', 'GetAllObjects', 'GetObjList', 'InsertObj', 'DeleteObject', \
|
||||
'ArchiveToOpenERP', 'IsCRMInstalled', 'GetPartners', 'GetObjectItems', \
|
||||
'CreateCase', 'MakeAttachment', 'CreateContact', 'CreatePartner', 'getitem', 'setitem', \
|
||||
'SearchPartnerDetail', 'WritePartnerValues', 'GetAllState', 'GetAllCountry' ]
|
||||
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
|
||||
_reg_clsid_ = "{C6399AFD-763A-400F-8191-7F9D0503CAE2}"
|
||||
_reg_progid_ = "Python.OpenERP.XMLRpcConn"
|
||||
_reg_policy_spec_ = "win32com.server.policy.EventHandlerPolicy"
|
||||
def __init__(self,server='localhost',port=8069,uri='http://localhost:8069'):
|
||||
self._server=server
|
||||
self._port=port
|
||||
self._uri=uri
|
||||
self._obj_list=[]
|
||||
self._dbname=''
|
||||
self._uname='admin'
|
||||
self._pwd='a'
|
||||
self._login=False
|
||||
self._running=False
|
||||
self._uid=False
|
||||
self._iscrm=True
|
||||
self.partner_id_list=None
|
||||
self.protocol=None
|
||||
def getitem(self, attrib):
|
||||
v=self.__getattribute__(attrib)
|
||||
return str(v)
|
||||
|
||||
def setitem(self, attrib, value):
|
||||
return self.__setattr__(attrib, value)
|
||||
|
||||
def GetDBList(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/db')
|
||||
try:
|
||||
db_list = execute(conn, 'list')
|
||||
if db_list == False:
|
||||
self._running=False
|
||||
return []
|
||||
else:
|
||||
self._running=True
|
||||
except:
|
||||
db_list=-1
|
||||
self._running=True
|
||||
return db_list
|
||||
|
||||
def login(self,dbname, user, pwd):
|
||||
self._dbname = dbname
|
||||
self._uname = user
|
||||
self._pwd = pwd
|
||||
conn = xmlrpclib.ServerProxy(str(self._uri) + '/xmlrpc/common')
|
||||
uid = execute(conn,'login',dbname, ustr(user), ustr(pwd))
|
||||
return uid
|
||||
|
||||
def GetAllObjects(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[])
|
||||
objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',ids,['model'])
|
||||
obj_list = [item['model'] for item in objects]
|
||||
return obj_list
|
||||
|
||||
def GetObjList(self):
|
||||
self._obj_list=list(self._obj_list)
|
||||
self._obj_list.sort(reverse=True)
|
||||
return self._obj_list
|
||||
|
||||
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)))
|
||||
self._obj_list.sort(reverse=True)
|
||||
|
||||
def DeleteObject(self,sel_text):
|
||||
self._obj_list=list(self._obj_list)
|
||||
for obj in self._obj_list:
|
||||
if obj[0] == sel_text:
|
||||
self._obj_list.remove(obj)
|
||||
break
|
||||
|
||||
def ArchiveToOpenERP(self, recs, mail):
|
||||
import win32ui, win32con
|
||||
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object')
|
||||
import eml
|
||||
new_msg = files = ext_msg =""
|
||||
eml_path=eml.generateEML(mail)
|
||||
att_name = ustr(eml_path.split('\\')[-1])
|
||||
flag=False
|
||||
attachments=mail.Attachments
|
||||
|
||||
try:
|
||||
fp = open(eml_path, 'rb')
|
||||
msg =fp.read()
|
||||
fp.close()
|
||||
new_mail = email.message_from_string(str(msg))
|
||||
except Exception,e:
|
||||
win32ui.MessageBox(str(e),"Reading Error Mail")
|
||||
|
||||
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(new_mail.get('Message-Id')),
|
||||
'references':str(new_mail.get('References')),
|
||||
}
|
||||
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):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=','crm.lead')])
|
||||
return id
|
||||
|
||||
def GetPartners(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids=[]
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[])
|
||||
ids.sort()
|
||||
obj_list=[]
|
||||
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'])))
|
||||
return obj_list
|
||||
|
||||
def GetObjectItems(self, search_list=[], search_text=''):
|
||||
import win32ui
|
||||
res = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
for obj in search_list:
|
||||
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']
|
||||
if obj == "res.partner.address":
|
||||
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'])
|
||||
if rec['street']:
|
||||
name += ', ' + ustr(rec['street'])
|
||||
if rec['city']:
|
||||
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'])
|
||||
res.append((obj,rec['id'],name,object_name))
|
||||
return res
|
||||
|
||||
def CreateCase(self, section, mail, partner_ids, with_attachments=True):
|
||||
res={}
|
||||
import win32ui
|
||||
import eml
|
||||
section=str(section)
|
||||
partner_ids=eval(str(partner_ids))
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
try:
|
||||
eml_path=eml.generateEML(mail)
|
||||
fp = open(eml_path, 'rb')
|
||||
msg =fp.read()
|
||||
fp.close()
|
||||
new_mail = email.message_from_string(str(msg))
|
||||
except Exception,e:
|
||||
win32ui.MessageBox(str(e),"Mail Reading Error")
|
||||
execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'email.server.tools','process_email',section, str(new_mail))
|
||||
|
||||
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\\mails\\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)
|
||||
if len(fn) > 64:
|
||||
l = 64 - len(fn)
|
||||
f = fn.split('.')
|
||||
fn = f[0][0:l] + '.' + f[-1]
|
||||
att_path = os.path.join(att_folder_path,fn)
|
||||
attachments[i].SaveAsFile(att_path)
|
||||
f=open(att_path,"rb")
|
||||
content = "".join(f.readlines()).encode('base64')
|
||||
f.close()
|
||||
res['name'] = ustr(attachments[i].DisplayName)
|
||||
res['datas_fname'] = ustr(fn)
|
||||
res['datas'] = content
|
||||
res['res_id'] = obj_id
|
||||
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))
|
||||
|
||||
self.partner_id_list=eval(str(self.partner_id_list))
|
||||
if self.partner_id_list.get(sel,-999) != -999:
|
||||
res['partner_id'] = self.partner_id_list[sel]
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner.address','create',res)
|
||||
return id
|
||||
|
||||
def CreatePartner(self, res):
|
||||
res=eval(str(res))
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[('name','=',res['name'])])
|
||||
if ids:
|
||||
return False
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','create',res)
|
||||
return id
|
||||
|
||||
def SearchPartnerDetail(self, search_email_id):
|
||||
import win32ui
|
||||
res_vals = []
|
||||
address = {}
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
address_id = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','ilike',ustr(search_email_id))])
|
||||
if not address_id :
|
||||
return
|
||||
address = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','name','street','street2','city','state_id','country_id','phone','mobile','email','fax','zip'])
|
||||
for key, vals in address.items():
|
||||
res_vals.append([key,vals])
|
||||
return res_vals
|
||||
|
||||
def WritePartnerValues(self, new_vals):
|
||||
import win32ui
|
||||
flag = -1
|
||||
new_dict = dict(new_vals)
|
||||
email=new_dict['email']
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
address_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(email))])
|
||||
if not address_id:
|
||||
return flag
|
||||
address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','state_id','country_id'])
|
||||
vals_res_address={ 'name' : new_dict['name'],
|
||||
'street':new_dict['street'],
|
||||
'street2' : new_dict['street2'],
|
||||
'city' : new_dict['city'],
|
||||
'phone' : new_dict['phone'],
|
||||
'mobile' : new_dict['mobile'],
|
||||
'fax' : new_dict['fax'],
|
||||
'zip' : new_dict['zip'],
|
||||
}
|
||||
if new_dict['partner_id'] != -1:
|
||||
vals_res_address['partner_id'] = new_dict['partner_id']
|
||||
if new_dict['state_id'] != -1:
|
||||
vals_res_address['state_id'] = new_dict['state_id']
|
||||
if new_dict['country_id'] != -1:
|
||||
vals_res_address['country_id'] = new_dict['country_id']
|
||||
temp = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'write', address_id, vals_res_address)
|
||||
if temp:
|
||||
flag=1
|
||||
else:
|
||||
flag=0
|
||||
return flag
|
||||
|
||||
def GetAllState(self):
|
||||
import win32ui
|
||||
state_list = []
|
||||
state_ids = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/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'])))
|
||||
return state_list
|
||||
|
||||
def GetAllCountry(self):
|
||||
import win32ui
|
||||
country_list = []
|
||||
country_ids = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/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'])))
|
||||
return country_list
|
||||
|
|
|
@ -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:44+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 00:29+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:38+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: point_of_sale
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.4\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:49+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 03:20+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:39+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: process
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.0_rc3\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 09:07+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 03:27+0000\n"
|
||||
"Last-Translator: Angel Spy <melissadilara@yahoo.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:43+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: product
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.6\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 09:08+0000\n"
|
||||
"PO-Revision-Date: 2010-08-06 20:05+0000\n"
|
||||
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:43+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: product
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
Resource: product.category
|
||||
-->
|
||||
Resource: product.category
|
||||
-->
|
||||
|
||||
<record id="cat0" model="product.category">
|
||||
<field name="parent_id" ref="null"/>
|
||||
|
@ -54,6 +54,42 @@
|
|||
<field name="parent_id" ref="product_category_3"/>
|
||||
<field name="name">IT components kits</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="product_category_marketableproduct0" model="product.category">
|
||||
<field name="name">Marketable Products</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_shelves0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_marketableproduct0"/>
|
||||
<field name="name">Shelves</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_otherproducts0" model="product.category">
|
||||
<field name="name">Other Products</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_rawmaterial0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_otherproducts0"/>
|
||||
<field name="name">Raw Materials</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_services0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_marketableproduct0"/>
|
||||
<field name="name">Marketable Services</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_misc0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_otherproducts0"/>
|
||||
<field name="name">Misc</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_ul_box" model="product.ul">
|
||||
<field name="name">Box 20x20x40</field>
|
||||
|
@ -65,8 +101,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Resource: product.product
|
||||
-->
|
||||
Resource: product.product
|
||||
-->
|
||||
|
||||
<record id="product_product_0" model="product.product">
|
||||
<field name="list_price">38.25</field>
|
||||
|
@ -352,7 +388,246 @@
|
|||
<field name="name">Kit Keyboard + Mouse</field>
|
||||
<field name="categ_id" ref="product_category_11"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
Resource: product.product NEW EVV
|
||||
-->
|
||||
|
||||
<record id="product_product_shelfofcm0" model="product.product">
|
||||
<field name="default_code">SHE100</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="list_price">130.0</field>
|
||||
<field name="standard_price">50.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Shelf of 100cm</field>
|
||||
<field name="categ_id" ref="product_category_shelves0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_shelfofcm1" model="product.product">
|
||||
<field name="default_code">SHE200</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="list_price">210.0</field>
|
||||
<field name="standard_price">80.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Shelf of 200cm</field>
|
||||
<field name="categ_id" ref="product_category_shelves0"/>
|
||||
</record>
|
||||
<record id="product_product_woodmm0" model="product.product">
|
||||
<field name="default_code">WOOD002</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">5.0</field>
|
||||
<field name="uom_id" ref="product_uom_meter"/>
|
||||
<field name="uom_po_id" ref="product_uom_meter"/>
|
||||
<field name="name">Wood 2mm</field>
|
||||
<field eval="10" name="seller_delay"/>
|
||||
<field eval="7.0" name="sale_delay"/>
|
||||
<field name="categ_id" ref="product_category_rawmaterial0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_kitchendesignproject0" model="product.product">
|
||||
<field name="default_code">PROJ</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">90.0</field>
|
||||
<field name="standard_price">20.0</field>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Kitchen Design Project</field>
|
||||
<field name="categ_id" ref="product_category_services0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_employee0" model="product.product">
|
||||
<field name="default_code">EMPL</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">200.0</field>
|
||||
<field name="standard_price">50.0</field>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Employee</field>
|
||||
<field name="categ_id" ref="product_category_services0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_restaurantexpenses0" model="product.product">
|
||||
<field name="default_code">REST</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="type">consu</field>
|
||||
<field name="list_price">1.0</field>
|
||||
<field name="standard_price">1.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Restaurant Expenses</field>
|
||||
<field eval="1" name="hr_expense_ok"/>
|
||||
<field name="categ_id" ref="product_category_otherproducts0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_worker0" model="product.product">
|
||||
<field name="default_code">WORK</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="type">service</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field eval="1" name="purchase_ok"/>
|
||||
<field name="standard_price">20.0</field>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Worker</field>
|
||||
<field name="categ_id" ref="product_category_services0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_rearpanelarm0" model="product.product">
|
||||
<field name="default_code">RPAN100</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">10.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rear Panel SHE100</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="5" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_rearpanelarm1" model="product.product">
|
||||
<field name="default_code">RPAN200</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">13.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rear Panel SHE200</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="5" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_sidepanel0" model="product.product">
|
||||
<field name="default_code">SIDEPAN</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">3.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Side Panel</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="5" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_shelf0" model="product.product">
|
||||
<field name="default_code">RCK100</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">5.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rack 100cm</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="8" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_shelf1" model="product.product">
|
||||
<field name="default_code">RCK200</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">4.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rack 200cm</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="8" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_product_assemblysection0" model="product.product">
|
||||
<field name="default_code">PROFIL</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="list_price">1.0</field>
|
||||
<field name="standard_price">2.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Assembly Section</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_woodlintelm0" model="product.product">
|
||||
<field name="default_code">LIN40</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">8.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Wood Lintel 4m</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="10" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_metalcleats0" model="product.product">
|
||||
<field name="default_code">METC000</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Metal Cleats</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="20" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_hotelexpenses0" model="product.product">
|
||||
<field name="default_code">HOT</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="type">consu</field>
|
||||
<field name="list_price">1.0</field>
|
||||
<field name="standard_price">1.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Hotel Expenses</field>
|
||||
<field eval="1" name="hr_expense_ok"/>
|
||||
<field name="categ_id" ref="product_category_otherproducts0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_kitshelfofcm0" model="product.product">
|
||||
<field name="default_code">SHE100KIT</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="list_price">110.0</field>
|
||||
<field name="standard_price">48.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">KIT Shelf of 100cm</field>
|
||||
<field eval="0" name="purchase_ok"/>
|
||||
<field name="categ_id" ref="product_category_shelves0"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: product.supplierinfo
|
||||
-->
|
||||
|
||||
<record id="supplierinfo1" model="product.supplierinfo">
|
||||
<field name="name" ref="base.res_partner_asus"/>
|
||||
<field name="qty">10</field>
|
||||
|
@ -469,6 +744,7 @@
|
|||
<field name="name" ref="base.res_partner_seagate"/>
|
||||
<field name="qty">10</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="sequence">5</field>
|
||||
<field name="product_id" ref="product_product_hdd1"/>
|
||||
<field name="delay">10</field>
|
||||
</record>
|
||||
|
@ -476,6 +752,7 @@
|
|||
<field name="name" ref="base.res_partner_seagate"/>
|
||||
<field name="qty">10</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="sequence">5</field>
|
||||
<field name="product_id" ref="product_product_hdd2"/>
|
||||
<field name="delay">10</field>
|
||||
</record>
|
||||
|
@ -483,9 +760,87 @@
|
|||
<field name="name" ref="base.res_partner_4"/>
|
||||
<field name="qty">10</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="sequence">5</field>
|
||||
<field name="product_id" ref="product_product_hdd3"/>
|
||||
<field name="delay">10</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
Resource: product.supplierinfo NEW for training
|
||||
-->
|
||||
|
||||
<record id="product_supplierinfo_0" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_rearpanelarm0"/>
|
||||
<field name="delay">10</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_1" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_rearpanelarm0"/>
|
||||
<field name="delay">5</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_2" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_rearpanelarm1"/>
|
||||
<field name="delay">5</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_3" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_sidepanel0"/>
|
||||
<field name="delay">5</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_4" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_shelfofcm0"/>
|
||||
<field name="delay">8</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_5" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_shelfofcm1"/>
|
||||
<field name="delay">8</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_6" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_assemblysection0"/>
|
||||
<field name="delay">2</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_7" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_woodlintelm0"/>
|
||||
<field name="delay">10</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_8" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_metalcleats0"/>
|
||||
<field name="delay">20</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.4\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 09:12+0000\n"
|
||||
"PO-Revision-Date: 2010-08-06 22:28+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: profile_accounting
|
||||
|
|
|
@ -51,12 +51,17 @@
|
|||
<field name="fn">field</field>
|
||||
</record>
|
||||
|
||||
<!-- Sequence is not impemented right.
|
||||
See http://tools.ietf.org/html/rfc5545#section-3.8.7.4
|
||||
Disabling..
|
||||
|
||||
<record model="basic.calendar.fields" id="map_todo_6">
|
||||
<field name="name" ref="caldav.field_todo_seq"/>
|
||||
<field name="type_id" ref="caldav.calendar_lines_todo" />
|
||||
<field name="field_id" search="[('name','=','sequence'),('model_id.model','=','calendar.todo')]" />
|
||||
<field name="fn">field</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<record model="basic.calendar.fields" id="map_todo_7">
|
||||
<field name="name" ref="caldav.field_todo_url"/>
|
||||
|
|
|
@ -0,0 +1,877 @@
|
|||
# Mongolian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-06 08:44+0000\n"
|
||||
"Last-Translator: ub121 <Unknown>\n"
|
||||
"Language-Team: Mongolian <mn@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-07 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,invoiced:0
|
||||
msgid "Invoiced & Paid"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_invoiceafterpacking0
|
||||
msgid "Supplier Invoice pre-generated on receptions for control"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,location_id:0
|
||||
msgid "Destination"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,invoice_method:0
|
||||
msgid "From Picking"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Validated By"
|
||||
msgstr "Баталсан"
|
||||
|
||||
#. module: purchase
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,partner_id:0
|
||||
msgid "Supplier"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Delivery"
|
||||
msgstr "Хүргэлт"
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,product_qty:0
|
||||
msgid "Quantity"
|
||||
msgstr "Тоо ширхэг"
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,invoice_method:0
|
||||
msgid "From Order"
|
||||
msgstr "Захиалгаас"
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,name:purchase.process_node_confirmpurchaseorder0
|
||||
msgid "Confirmed Purchase"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,state:0
|
||||
msgid "Invoice Exception"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:product.pricelist,name:purchase.list0
|
||||
msgid "Default Purchase Pricelist"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition.action,name:purchase.process_transition_action_invoicefrompurchaseorder0
|
||||
msgid "Create invoice"
|
||||
msgstr "Нэхэмжлэл үүсгэх"
|
||||
|
||||
#. module: purchase
|
||||
#: help:res.partner,property_product_pricelist_purchase:0
|
||||
msgid ""
|
||||
"This pricelist will be used, instead of the default one, for purchases from "
|
||||
"the current partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Fax :"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_productrecept0
|
||||
msgid "Create invoice from product recept"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: help:purchase.order,pricelist_id:0
|
||||
msgid ""
|
||||
"The pricelist sets the currency used for this purchase order. It also "
|
||||
"computes the supplier price for the selected products/quantities."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.process,name:purchase.process_process_purchaseprocess0
|
||||
msgid "Purchase Process"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_invoicefrompackinglist0
|
||||
msgid "Invoice from Packing list"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Approve Purchase"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,state:0
|
||||
msgid "Approved"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.act_window,name:purchase.purchase_form_action4
|
||||
#: model:ir.ui.menu,name:purchase.menu_purchase_form_action4
|
||||
msgid "Purchase Orders in Progress"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,amount_untaxed:0
|
||||
msgid "Untaxed Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
#: field:purchase.order,notes:0
|
||||
#: view:purchase.order.line:0
|
||||
#: field:purchase.order.line,notes:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
#: field:purchase.order,amount_tax:0
|
||||
#: view:purchase.order.line:0
|
||||
#: field:purchase.order.line,taxes_id:0
|
||||
msgid "Taxes"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.report.xml,name:purchase.report_purchase_order
|
||||
#: model:process.node,name:purchase.process_node_purchaseorder0
|
||||
#: view:purchase.order:0
|
||||
#: model:res.request.link,name:purchase.req_link_purchase_order
|
||||
#: field:stock.picking,purchase_id:0
|
||||
msgid "Purchase Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.quotation:0
|
||||
msgid "Regards,"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Net Total :"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,state:0
|
||||
msgid "Cancelled"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: help:purchase.order,state:0
|
||||
msgid ""
|
||||
"The state of the purchase order or the quotation request. A quotation is a "
|
||||
"purchase order in a 'Draft' state. Then the order has to be confirmed by the "
|
||||
"user, the state switch to 'Confirmed'. Then the supplier must confirm the "
|
||||
"order to change the state to 'Approved'. When the purchase order is paid and "
|
||||
"received, the state becomes 'Done'. If a cancel action occurs in the invoice "
|
||||
"or in the reception of goods, the state becomes in exception."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,origin:0
|
||||
msgid "Origin"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,name:purchase.process_node_packinglist0
|
||||
msgid "Incoming Products"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
#: rml:purchase.quotation:0
|
||||
msgid "Qty"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Manually Corrected"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "TVA :"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.quotation:0
|
||||
msgid "Tel.:"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,account_analytic_id:0
|
||||
msgid "Analytic Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.model,name:purchase.model_purchase_order_line
|
||||
msgid "Purchase Order lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,validator:0
|
||||
msgid "Validated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: help:purchase.order,invoice_method:0
|
||||
msgid ""
|
||||
"From Order: a draft invoice will be pre-generated based on the purchase "
|
||||
"order. The accountant will just have to validate this invoice for control.\n"
|
||||
"From Picking: a draft invoice will be pre-genearted based on validated "
|
||||
"receptions.\n"
|
||||
"Manual: no invoice will be pre-generated. The accountant will have to encode "
|
||||
"manually."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_packinginvoice0
|
||||
msgid "Invoice based on deliveries"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Net Price"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order.line:0
|
||||
msgid "Order Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,state:0
|
||||
msgid "Confirmed"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,name:purchase.process_node_productrecept0
|
||||
msgid "Product Receipt"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition.action,name:purchase.process_transition_action_confirmpurchaseorder0
|
||||
msgid "Confirm"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Invoice Control"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,name:purchase.process_node_draftpurchaseorder0
|
||||
#: model:process.node,name:purchase.process_node_draftpurchaseorder1
|
||||
msgid "RFQ"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,state:0
|
||||
msgid "Waiting"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,picking_ids:0
|
||||
msgid "Picking List"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,warehouse_id:0
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,order_line:0
|
||||
msgid "Order Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_confirmingpurchaseorder1
|
||||
msgid "Confirm Purchase order from Request for quotation without origin"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.quotation:0
|
||||
msgid "Fax:"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Untaxed amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.quotation:0
|
||||
msgid "Expected Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Shipping address :"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:product.pricelist.type,name:purchase.pricelist_type_purchase
|
||||
#: field:res.partner,property_product_pricelist_purchase:0
|
||||
msgid "Purchase Pricelist"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,minimum_planned_date:0
|
||||
msgid "Planned Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Approved by Supplier"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.act_window,name:purchase.act_purchase_order_2_stock_picking
|
||||
msgid "Packing"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.wizard,name:purchase.purchase_order_merge
|
||||
msgid "Merge purchases"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,move_dest_id:0
|
||||
msgid "Reservation Destination"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,name:0
|
||||
msgid "Order Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,state:0
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,pricelist_id:0
|
||||
msgid "Pricelist"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_purchaseorder0
|
||||
msgid "When controlling invoice from orders"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_invoicecontrol0
|
||||
msgid "Pre-generated supplier invoice to control based on order"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_invoicefrompurchase0
|
||||
msgid "Invoice from Purchase"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_packinglist0
|
||||
msgid "Packing is created for the products reception control."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,invoice_method:0
|
||||
msgid "Manual"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_confirmingpurchaseorder1
|
||||
msgid "Confirming Purchase"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_approvingpurchaseorder0
|
||||
msgid "Approve Purchase order after Confirming"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: selection:purchase.order,state:0
|
||||
msgid "Shipping Exception"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_draftpurchaseorder1
|
||||
msgid "Encoded manually by the user."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: help:purchase.order,minimum_planned_date:0
|
||||
msgid ""
|
||||
"This is computed as the minimum scheduled date of all purchase order lines' "
|
||||
"products."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.act_window,name:purchase.act_res_partner_2_purchase_order
|
||||
msgid "Purchase orders"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: help:purchase.order,dest_address_id:0
|
||||
msgid ""
|
||||
"Put an address if you want to deliver directly from the supplier to the "
|
||||
"customer.In this case, it will remove the warehouse link and set the "
|
||||
"customer location."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.quotation:0
|
||||
msgid "Request for Quotation :"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_confirmingpurchaseorder0
|
||||
msgid "Confirm Purchase order from Request for quotation"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Confirm Purchase Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: help:purchase.order,picking_ids:0
|
||||
msgid ""
|
||||
"This is the list of picking list that have been generated for this purchase"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.module.module,shortdesc:purchase.module_meta_information
|
||||
#: model:ir.ui.menu,name:purchase.menu_purchase_root
|
||||
msgid "Purchase Management"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,partner_ref:0
|
||||
msgid "Partner Ref."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Taxes :"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,invoiced_rate:0
|
||||
msgid "Invoiced"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,dest_address_id:0
|
||||
msgid "Destination Address"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order.line:0
|
||||
#: field:stock.move,purchase_line_id:0
|
||||
msgid "Purchase Order Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Calendar View"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Set to Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_approvepurchaseorder0
|
||||
msgid "Purchase order is approved by supplier."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,name:purchase.process_node_invoiceafterpacking0
|
||||
#: model:process.node,name:purchase.process_node_invoicecontrol0
|
||||
msgid "Draft Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.model,name:purchase.model_purchase_order
|
||||
msgid "Purchase order"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_draftpurchaseorder0
|
||||
msgid "Request for quotation is proposed by the system."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_packinginvoice0
|
||||
msgid "Packing Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_invoicefrompackinglist0
|
||||
msgid "Creates invoice from packin list"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: help:purchase.order,date_order:0
|
||||
msgid "Date on which this document has been created."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Delivery & Invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,date_order:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: help:purchase.order,origin:0
|
||||
msgid "Reference of the document that generated this purchase order request."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Tél. :"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_purchaseinvoice0
|
||||
msgid "After Purchase order , Create invoice."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,date_planned:0
|
||||
msgid "Scheduled date"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Our Order Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.quotation:0
|
||||
msgid "TVA:"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Compute"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: constraint:product.pricelist.version:0
|
||||
msgid "You cannot have 2 pricelist versions that overlap!"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Cancel Purchase Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_createpackinglist0
|
||||
msgid "Create Packing list"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Total :"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_createpackinglist0
|
||||
msgid "When purchase order is approved , it creates its packing list."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order.line:0
|
||||
msgid "History"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,state:0
|
||||
msgid "Order Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,price_subtotal:0
|
||||
msgid "Subtotal"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:product.pricelist.version,name:purchase.ver0
|
||||
msgid "Default Purchase Pricelist Version"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
#: field:purchase.order.line,price_unit:0
|
||||
msgid "Unit Price"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,fiscal_position:0
|
||||
msgid "Fiscal Position"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Request for Quotation N°"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,invoice_id:0
|
||||
msgid "Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition.action,name:purchase.process_transition_action_approvingcancelpurchaseorder0
|
||||
#: model:process.transition.action,name:purchase.process_transition_action_cancelpurchaseorder0
|
||||
#: wizard_button:purchase.order.merge,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:res.partner:0
|
||||
msgid "Purchases Properties"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,order_id:0
|
||||
msgid "Order Ref"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.act_window,name:purchase.purchase_form_action
|
||||
#: model:ir.ui.menu,name:purchase.menu_purchase_form_action
|
||||
msgid "Purchase Orders"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: wizard_view:purchase.order.merge,init:0
|
||||
#: wizard_button:purchase.order.merge,init,merge:0
|
||||
msgid "Merge orders"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.act_window,name:purchase.purchase_form_action_new
|
||||
#: model:ir.ui.menu,name:purchase.menu_purchase_form_action_new
|
||||
msgid "New Purchase Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,shipped:0
|
||||
#: field:purchase.order,shipped_rate:0
|
||||
msgid "Received"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.report.xml,name:purchase.report_purchase_quotation
|
||||
#: selection:purchase.order,state:0
|
||||
msgid "Request for Quotation"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,name:purchase.process_node_packinginvoice0
|
||||
msgid "Out Packing"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_productrecept0
|
||||
msgid "Control invoices on receptions"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Date Req."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,date_approve:0
|
||||
msgid "Date Approved"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.module.module,description:purchase.module_meta_information
|
||||
msgid ""
|
||||
"Module for purchase management\n"
|
||||
" Request for quotation, Create Supplier Invoice, Print Order..."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,product_id:0
|
||||
msgid "Product"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
#: field:purchase.order.line,name:0
|
||||
#: rml:purchase.quotation:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_productrecept0
|
||||
msgid "Product recept invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.quotation:0
|
||||
msgid "Expected Delivery address:"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.act_window,name:purchase.purchase_form_action3
|
||||
#: model:ir.ui.menu,name:purchase.menu_purchase_form_action3
|
||||
msgid "Purchase Order Waiting Approval"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_confirmingpurchaseorder0
|
||||
msgid "Confirming Purchase Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,product_uom:0
|
||||
msgid "Product UOM"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order.line,move_ids:0
|
||||
msgid "Reservation"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_confirmpurchaseorder0
|
||||
msgid "Purchase order is confirmed by the user."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_purchaseinvoice0
|
||||
msgid "Purchase Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Your Order Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Purchase Order Confirmation N°"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Total amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: rml:purchase.order:0
|
||||
msgid "Date Ordered"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order:0
|
||||
msgid "Purchase Control"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.act_window,name:purchase.purchase_form_action2
|
||||
#: model:ir.ui.menu,name:purchase.menu_purchase_order_draft
|
||||
msgid "Request For Quotations"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,invoice_method:0
|
||||
msgid "Invoicing Control"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition.action,name:purchase.process_transition_action_approvingpurchaseorder0
|
||||
msgid "Approve"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.node,name:purchase.process_node_approvepurchaseorder0
|
||||
msgid "Approved Purchase"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_packinginvoice0
|
||||
msgid "From Packing list, Create invoice."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,amount_total:0
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: wizard_view:purchase.order.merge,init:0
|
||||
msgid "Are you sure you want to merge these orders ?"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_approvingpurchaseorder0
|
||||
msgid "Approving Purchase Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_invoicefrompurchase0
|
||||
msgid "After approved purchase order , it comes into the supplier invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
#: view:purchase.order.line:0
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
|
@ -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-04 20:16+0000\n"
|
||||
"PO-Revision-Date: 2010-08-06 22:06+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-05 03:35+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: purchase
|
||||
|
@ -822,7 +822,7 @@ msgstr "Reservation"
|
|||
#. module: purchase
|
||||
#: model:process.node,note:purchase.process_node_confirmpurchaseorder0
|
||||
msgid "Purchase order is confirmed by the user."
|
||||
msgstr ""
|
||||
msgstr "Ordem de compra confirmada pelo usuário."
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_purchaseinvoice0
|
||||
|
@ -858,7 +858,7 @@ msgstr "Controle de Compras"
|
|||
#: model:ir.actions.act_window,name:purchase.purchase_form_action2
|
||||
#: model:ir.ui.menu,name:purchase.menu_purchase_order_draft
|
||||
msgid "Request For Quotations"
|
||||
msgstr ""
|
||||
msgstr "Requisição para Cotações"
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,invoice_method:0
|
||||
|
@ -873,12 +873,12 @@ msgstr "Aprovar"
|
|||
#. module: purchase
|
||||
#: model:process.node,name:purchase.process_node_approvepurchaseorder0
|
||||
msgid "Approved Purchase"
|
||||
msgstr ""
|
||||
msgstr "Compra Aprovada"
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_packinginvoice0
|
||||
msgid "From Packing list, Create invoice."
|
||||
msgstr ""
|
||||
msgstr "A partir da Lista de Separação, criar Nota Fiscal"
|
||||
|
||||
#. module: purchase
|
||||
#: field:purchase.order,amount_total:0
|
||||
|
@ -893,7 +893,7 @@ msgstr "Are you sure you want to merge these orders ?"
|
|||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_approvingpurchaseorder0
|
||||
msgid "Approving Purchase Order"
|
||||
msgstr ""
|
||||
msgstr "Aprovando Ordem de Compra"
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_invoicefrompurchase0
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
- delay: 1
|
||||
name: base.res_partner_asus
|
||||
qty: 5.0
|
||||
min_qty: 1.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
|
@ -145,12 +146,12 @@
|
|||
pick=self.browse(cr,uid,picking_id[0])
|
||||
move =pick.move_lines[0]
|
||||
partial_datas = {
|
||||
'partner_id': 2,
|
||||
'address_id': 6,
|
||||
'partner_id': pick.address_id.partner_id.id,
|
||||
'address_id': pick.address_id.id,
|
||||
'delivery_date' : time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
partial_datas['move%s'%(move.id)]= {
|
||||
'product_id': move.product_id,
|
||||
'product_id': move.product_id.id,
|
||||
'product_qty': move.product_qty,
|
||||
'product_uom': move.product_uom.id,
|
||||
}
|
||||
|
@ -171,7 +172,7 @@
|
|||
'delivery_date' : time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
partial_datas['move%s'%(move.id)]= {
|
||||
'product_id': move.product_id,
|
||||
'product_id': move.product_id.id,
|
||||
'product_qty': move.product_qty,
|
||||
'product_uom': move.product_uom.id,
|
||||
}
|
||||
|
@ -184,6 +185,5 @@
|
|||
picking_id = self.search(cr, uid, [('origin','=','TEST/TENDER/0001'),('type','=','out')])
|
||||
if picking_id:
|
||||
pick=self.browse(cr,uid,picking_id[0])
|
||||
print pick.state
|
||||
assert(pick.state == 'assigned'), _('Picking is not in available state')
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
- delay: 1
|
||||
name: base.res_partner_asus
|
||||
qty: 5.0
|
||||
min_qty: 1.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
|
@ -91,15 +92,15 @@
|
|||
I confirm and validate the Request for Quotation of ASUStek.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
partner_id=self.pool.get('res.partner').search(cr,uid,[('name','=','ASUStek')])[0]
|
||||
req_obj = self.pool.get('purchase.requisition')
|
||||
ids =req_obj.search(cr, uid, [('origin','=','Laptop ACER1')])
|
||||
purchase_id= self.search(cr, uid, [('partner_id','=',partner_id),('requisition_id','in',ids)])[0]
|
||||
import netsvc
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
if purchase_id:
|
||||
wf_service.trg_validate(uid, 'purchase.order',purchase_id,'purchase_confirm', cr)
|
||||
wf_service.trg_validate(uid, 'purchase.order',purchase_id,'purchase_approve', cr)
|
||||
partner_id=self.pool.get('res.partner').search(cr,uid,[('name','=','ASUStek')])[0]
|
||||
req_obj = self.pool.get('purchase.requisition')
|
||||
ids =req_obj.search(cr, uid, [('origin','=','Laptop ACER1')])
|
||||
purchase_id= self.search(cr, uid, [('partner_id','=',partner_id),('requisition_id','in',ids)])[0]
|
||||
import netsvc
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
if purchase_id:
|
||||
wf_service.trg_validate(uid, 'purchase.order',purchase_id,'purchase_confirm', cr)
|
||||
wf_service.trg_validate(uid, 'purchase.order',purchase_id,'purchase_approve', cr)
|
||||
-
|
||||
I check that Request for Quotation of DistriPC is cancelled.
|
||||
-
|
||||
|
|
|
@ -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 06:41+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 03:41+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:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: sale
|
||||
|
|
|
@ -27,10 +27,8 @@ import netsvc
|
|||
from osv import fields, osv
|
||||
from tools import config
|
||||
from tools.translate import _
|
||||
|
||||
import decimal_precision as dp
|
||||
|
||||
|
||||
class sale_shop(osv.osv):
|
||||
_name = "sale.shop"
|
||||
_description = "Sale Shop"
|
||||
|
@ -47,7 +45,7 @@ sale_shop()
|
|||
|
||||
def _incoterm_get(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
context = {}
|
||||
cr.execute('select code, code||\', \'||name from stock_incoterms where active')
|
||||
return cr.fetchall()
|
||||
|
||||
|
@ -147,7 +145,6 @@ class sale_order(osv.osv):
|
|||
for invoice in sale.invoice_ids:
|
||||
if invoice.state not in ('draft', 'cancel'):
|
||||
tot += invoice.amount_untaxed
|
||||
|
||||
if tot:
|
||||
res[sale.id] = min(100.0, tot * 100.0 / (sale.amount_untaxed or 1.00))
|
||||
else:
|
||||
|
@ -211,7 +208,6 @@ class sale_order(osv.osv):
|
|||
'shop_id': fields.many2one('sale.shop', 'Shop', required=True, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'origin': fields.char('Source document', size=64, help="Reference of the document that generated this sale order request."),
|
||||
'client_order_ref': fields.char('Customer Reference', size=64),
|
||||
|
||||
'state': fields.selection([
|
||||
('draft', 'Quotation'),
|
||||
('waiting_date', 'Waiting Schedule'),
|
||||
|
@ -283,7 +279,7 @@ class sale_order(osv.osv):
|
|||
'company_id': fields.related('shop_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
|
||||
}
|
||||
_defaults = {
|
||||
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'sale.order', context=c),
|
||||
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'sale.order', context=c),
|
||||
'picking_policy': 'direct',
|
||||
'date_order': time.strftime('%Y-%m-%d'),
|
||||
'order_policy': 'manual',
|
||||
|
@ -1186,7 +1182,6 @@ class sale_config_picking_policy(osv.osv_memory):
|
|||
ir_values_obj = self.pool.get('ir.values')
|
||||
ir_values_obj.set(cr, uid, 'default', False, 'picking_policy', ['sale.order'], o.picking_policy)
|
||||
ir_values_obj.set(cr, uid, 'default', False, 'order_policy', ['sale.order'], o.order_policy)
|
||||
|
||||
if o.step == 'one':
|
||||
md = self.pool.get('ir.model.data')
|
||||
group_id = md._get_id(cr, uid, 'base', 'group_no_one')
|
||||
|
@ -1194,10 +1189,10 @@ class sale_config_picking_policy(osv.osv_memory):
|
|||
menu_id = md._get_id(cr, uid, 'stock', 'menu_action_picking_tree_delivery')
|
||||
menu_id = md.browse(cr, uid, menu_id, context=context).res_id
|
||||
self.pool.get('ir.ui.menu').write(cr, uid, [menu_id], {'groups_id': [(6, 0, [group_id])]})
|
||||
|
||||
location_id = md._get_id(cr, uid, 'stock', 'stock_location_output')
|
||||
location_id = md.browse(cr, uid, location_id, context=context).res_id
|
||||
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'transparent'})
|
||||
|
||||
sale_config_picking_policy()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -1,6 +1,6 @@
|
|||
-
|
||||
In order to test the Sale module in OpenERP,
|
||||
I create a Sale Order for Slider Mobile for 500 quantity having Shipping Policy 'Shipping & Manual Invoice' and Invoice on 'Shipped quantities'
|
||||
I create a Sale Order for Slider Mobile for 500 quantity having Shipping Policy 'Invoice from Picking' and Invoice on 'Shipped quantities'
|
||||
in order to create an invoice based on the shipping quantity
|
||||
-
|
||||
!record {model: sale.order, id: sale_order_so6}:
|
||||
|
@ -17,7 +17,7 @@
|
|||
product_id: sale.product_product_slidermobile0
|
||||
product_uos_qty: 200.0
|
||||
type: make_to_order
|
||||
order_policy: manual
|
||||
order_policy: picking
|
||||
invoice_quantity: procurement
|
||||
partner_id: sale.res_partner_cleartrail0
|
||||
partner_invoice_id: sale.res_partner_address_2
|
||||
|
@ -65,9 +65,23 @@
|
|||
}
|
||||
self.do_partial(cr, uid, [pick.id],partial_datas)
|
||||
-
|
||||
I click on Create Invoice button to create the invoice.
|
||||
Then I create invoice from picking
|
||||
-
|
||||
!workflow {model: sale.order, action: manual_invoice, ref: sale_order_so6}
|
||||
!record {model: stock.invoice.onshipping, id: stock_invoice_onshipping_6}:
|
||||
invoice_date: '2010-07-17'
|
||||
journal_id: account.sales_journal
|
||||
type: out_invoice
|
||||
-
|
||||
Then I click on 'Create Invoices' button
|
||||
-
|
||||
!python {model: stock.invoice.onshipping}: |
|
||||
sale_obj = self.pool.get('sale.order')
|
||||
sale_id = sale_obj.browse(cr, uid, ref("sale_order_so6"))
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
ids = picking_obj.search(cr, uid, [('origin', '=', sale_id.name)])
|
||||
self.create_invoice(cr, uid, [ref("stock_invoice_onshipping_6")], {"lang": "en_US",
|
||||
"search_default_available": 1, "tz": False, "active_model": "stock.picking",
|
||||
"contact_display": "partner", "active_ids": ids, "active_id": ids[0]})
|
||||
-
|
||||
I verify whether the invoice has been generated for SO
|
||||
-
|
||||
|
@ -75,7 +89,7 @@
|
|||
so = self.browse(cr, uid, ref("sale_order_so6"))
|
||||
assert so.invoice_ids, "Invoices has not been generated for sale_order_so6"
|
||||
-
|
||||
I verify that an invoice is created on the basis of shipped quantity
|
||||
I verify that an invoice is created on the basis of shipped quantity
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
"author":"OpenERP SA",
|
||||
"depends":["sale"],
|
||||
"demo_xml":[],
|
||||
'test': ['test/sale_margin.yml'],
|
||||
"update_xml":["security/ir.model.access.csv","sale_margin_view.xml","report/report_margin_view.xml"],
|
||||
"active": False,
|
||||
"installable": True,
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
-
|
||||
In order to test the sale_margin module in OpenERP,
|
||||
I create a sale order and verify its margin
|
||||
-
|
||||
I place a sale order for product keyboard, quantity 50
|
||||
-
|
||||
!record {model: sale.order, id: sale_order_so11}:
|
||||
date_order: '2010-08-04'
|
||||
invoice_quantity: order
|
||||
name: Test_SO011
|
||||
order_line:
|
||||
- name: '[KEYA] Keyboard - AZERTY'
|
||||
price_unit: 7.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 100.0
|
||||
state: draft
|
||||
delay: 7.0
|
||||
product_id: product.product_product_24
|
||||
product_uos_qty: 100.0
|
||||
th_weight: 0.0
|
||||
type: make_to_stock
|
||||
order_policy: manual
|
||||
partner_id: base.res_partner_4
|
||||
partner_invoice_id: base.res_partner_address_7
|
||||
partner_order_id: base.res_partner_address_7
|
||||
partner_shipping_id: base.res_partner_address_7
|
||||
picking_policy: direct
|
||||
pricelist_id: product.list0
|
||||
shop_id: sale.shop
|
||||
-
|
||||
I confirm the sale order
|
||||
-
|
||||
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so11}
|
||||
-
|
||||
I verify that margin field gets bind with the value
|
||||
-
|
||||
!python {model: sale.order}: |
|
||||
so = self.browse(cr, uid, ref("sale_order_so11"))
|
||||
assert so.margin, "No margin !"
|
||||
-
|
||||
I verify that the picking has been generated for the sale order
|
||||
-
|
||||
!python {model: sale.order}: |
|
||||
so = self.browse(cr, uid, ref("sale_order_so11"))
|
||||
assert so.picking_ids,"Picking has not been generated"
|
||||
-
|
||||
Then I click on the 'Create Invoice' button of 'Outgoing Orders'
|
||||
-
|
||||
!python {model: stock.picking}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so11"))
|
||||
ids = self.search(cr, uid, [('origin', '=', so.name),('type', '=', 'out')])
|
||||
self.create_invoice(cr, uid, ids, {"lang": "en_US", "search_default_available":
|
||||
1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner",
|
||||
"active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"),
|
||||
})
|
||||
-
|
||||
I verify that an invoice has been generated from picking
|
||||
-
|
||||
!python {model: stock.picking}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so11"))
|
||||
pick_ids = self.search(cr, uid, [('origin', '=', so.name)])
|
||||
pick_brw = self.browse(cr, uid, pick_ids[0])
|
||||
assert pick_brw.invoice_ids,"Invoice has not been created"
|
||||
|
|
@ -1730,7 +1730,7 @@ class stock_move(osv.osv):
|
|||
accounts = product_obj.get_product_accounts(cr,uid,move.product_id.id,context)
|
||||
acc_src = accounts['stock_account_input']
|
||||
acc_dest = accounts['stock_account_output']
|
||||
acc_variation = accounts['property_stock_variation']
|
||||
acc_variation = accounts.get('property_stock_variation', False)
|
||||
journal_id = accounts['stock_journal']
|
||||
|
||||
if context is None:
|
||||
|
|
|
@ -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 21:00+0000\n"
|
||||
"Last-Translator: Jan Verlaan (Veritos) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-07 02:52+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <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:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-07 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: stock_invoice_directly
|
||||
|
|
Loading…
Reference in New Issue