bzr revid: hmo@tinyerp.com-20100806131719-8l35nhnbr0d2ci2z
This commit is contained in:
Harry (OpenERP)
2010-08-06 18:47:19 +05:30
18 changed files with 378 additions and 733 deletions
+2 -2
View File
@@ -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,
+30 -19
View File
@@ -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',
+2 -3
View File
@@ -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"
+7 -8
View File
@@ -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','&lt;&gt;','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>
+81 -35
View File
@@ -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>
+2 -2
View File
@@ -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 -1
View File
@@ -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 -1
View File
@@ -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"/>
+2 -2
View File
@@ -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 -1
View File
@@ -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>
+2 -2
View File
@@ -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">
+9 -186
View File
@@ -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()
+11 -410
View File
@@ -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>
+2 -2
View File
@@ -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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
10 access_auction_lot_history auction.lot.history model_auction_lot_history base.group_user 1 1 1 1
11 access_report_auction report.auction model_report_auction base.group_user 1 0 0 0
12 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
13 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
14 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
15 access_aie_category aie.category model_aie_category base.group_user 1 0 0 0
+219 -48
View File
@@ -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">