diff --git a/addons/auction/__openerp__.py b/addons/auction/__openerp__.py
index 7ad16bfeb03..75b50113028 100644
--- a/addons/auction/__openerp__.py
+++ b/addons/auction/__openerp__.py
@@ -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,
diff --git a/addons/auction/auction.py b/addons/auction/auction.py
index a1c21ebcc41..f6aebbb5077 100644
--- a/addons/auction/auction.py
+++ b/addons/auction/auction.py
@@ -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',
diff --git a/addons/auction/auction_report.xml b/addons/auction/auction_report.xml
index 4d594b6fe33..885c08582ee 100644
--- a/addons/auction/auction_report.xml
+++ b/addons/auction/auction_report.xml
@@ -3,7 +3,7 @@
-
-
form
-
+
@@ -50,7 +50,7 @@
auction.lot.category
tree
-
+
@@ -61,7 +61,7 @@
auction.lot.category
form
-
-
diff --git a/addons/auction/board_auction_view.xml b/addons/auction/board_auction_view.xml
index e1d92d5e753..7a233282f2c 100644
--- a/addons/auction/board_auction_view.xml
+++ b/addons/auction/board_auction_view.xml
@@ -1,12 +1,62 @@
-
-
- Auction
+
+
+ Auction DashBoard
-
-
- board.auction.manager.form
+
+
+ auction.lots
+ form
+ tree,form
+
+
+
+ auction.deposit
+ form
+ tree,form
+
+
+
+ report.auction.estimation.adj.category.tree
+ auction.lots
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+ report.auction.lots.estimation.adj.category.graph
+ auction.lots
+ graph
+
+
+
+
+
+
+
+
+
+
+
+
+ Min est/Adj/Max est
+ auction.lots
+ form
+ graph,tree
+
+
+
+ board.auction.form
board.board
form
@@ -14,36 +64,31 @@
-
+ width="510" />
+
-
+
-
-
+
+
-
+ view_mode="graph,tree" colspan="4" />
@@ -51,20 +96,21 @@
- Auction member board
+ Auction board
board.board
form
form
menu
-
+
+
+
+ sequence="1"
+ id="menu_board_auction_open" icon="terp-graph" parent="menu_board_auction"/>
-
+
-
diff --git a/addons/auction/report/ach_bordereau_photo.xsl b/addons/auction/report/ach_bordereau_photo.xsl
index 40e01041c0d..0eca114f50c 100644
--- a/addons/auction/report/ach_bordereau_photo.xsl
+++ b/addons/auction/report/ach_bordereau_photo.xsl
@@ -1,14 +1,13 @@
-
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"/>
+
+
-
@@ -62,3 +61,4 @@
+
\ No newline at end of file
diff --git a/addons/auction/report/catalog.xsl b/addons/auction/report/catalog.xsl
index 29c5da5cab4..5ce04194a77 100644
--- a/addons/auction/report/catalog.xsl
+++ b/addons/auction/report/catalog.xsl
@@ -1,8 +1,8 @@
-
-
+
+
a4_normal
diff --git a/addons/auction/report/lots_bids_phone.xsl b/addons/auction/report/lots_bids_phone.xsl
index 4e22235c042..d24b86d5109 100644
--- a/addons/auction/report/lots_bids_phone.xsl
+++ b/addons/auction/report/lots_bids_phone.xsl
@@ -1,6 +1,6 @@
-
+
diff --git a/addons/auction/report/lots_bids_phone2.xsl b/addons/auction/report/lots_bids_phone2.xsl
index 27c57f475e2..02611f5fcd0 100644
--- a/addons/auction/report/lots_bids_phone2.xsl
+++ b/addons/auction/report/lots_bids_phone2.xsl
@@ -1,6 +1,6 @@
-
+
diff --git a/addons/auction/report/lots_deposit.xsl b/addons/auction/report/lots_deposit.xsl
index 1b88f934be2..79ae4acb030 100644
--- a/addons/auction/report/lots_deposit.xsl
+++ b/addons/auction/report/lots_deposit.xsl
@@ -1,7 +1,7 @@
-
-
+
+
diff --git a/addons/auction/report/lots_list.xsl b/addons/auction/report/lots_list.xsl
index 96756838da9..bb61596a4f1 100644
--- a/addons/auction/report/lots_list.xsl
+++ b/addons/auction/report/lots_list.xsl
@@ -1,7 +1,7 @@
-
+
diff --git a/addons/auction/report/lots_with_vat.xsl b/addons/auction/report/lots_with_vat.xsl
index 1dd6bda428b..b3884060da6 100644
--- a/addons/auction/report/lots_with_vat.xsl
+++ b/addons/auction/report/lots_with_vat.xsl
@@ -3,8 +3,8 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
-
-
+
+
a4_normal
diff --git a/addons/auction/report/report_auction.py b/addons/auction/report/report_auction.py
index 3dffc25a78d..9ce346a2632 100644
--- a/addons/auction/report/report_auction.py
+++ b/addons/auction/report/report_auction.py
@@ -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()
diff --git a/addons/auction/report/report_auction_view.xml b/addons/auction/report/report_auction_view.xml
index f601739fe25..686cb80d78f 100644
--- a/addons/auction/report/report_auction_view.xml
+++ b/addons/auction/report/report_auction_view.xml
@@ -20,6 +20,7 @@
+
@@ -107,7 +108,7 @@
- Auction's Summary
+ Auction Analysis
report.auction
form
tree,graph
@@ -116,250 +117,12 @@
{'search_default_month':1}
-
-
+
+
-
-
-
- Unplanned objects
- report.unplanned.object
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Unplanned objects
- report.unplanned.object
- form
-
-
-
-
-
-=============================
-estimation.adj.category
-==============================
-
- report.auction.estimation.adj.category.form
- report.auction.estimation.adj.category
- form
-
-
-
-
-
- report.auction.estimation.adj.category.tree
- report.auction.estimation.adj.category
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- report.auction.estimation.adj.category.graph
- report.auction.estimation.adj.category
- graph
-
-
-
-
-
-
-
-
-
-
-
-
- Min est/Adj/Max est
- report.auction.estimation.adj.category
- form
- graph,tree
- [('date','like',time.strftime('%Y-%m'))]
-
-
-
- Min est/Adj/Max est
- report.auction.estimation.adj.category
- form
- graph,tree
- [('date','like',time.strftime('%Y-%m')),('user_id','=',uid)]
-
-
-
-
-
-
-
-
-
-
- report attendance
- report.attendance
- tree
-
-
-
-
-
-
-
-
-
-
- Graph attendance
- report.attendance
- graph
-
-
-
-
-
-
-
-
-
-
-
-
- report.attendance
- form
- tree,graph
- [('name','=',time.strftime('%Y-%m-%d')),('employee_id','=',uid)]
-
-
-
-
-
-
- report.attendance
- form
- tree,graph
- [('name','=',time.strftime('%Y-%m-%d'))]
-
-
-
-
-==============================
-My Latest Objects
-==============================
-
- auction.lots
- form
- tree,form
- [('create_uid','=',uid)]
-
-
-
- auction.lots
- form
- tree,form
-
-
-
-
-=============================
-My Latest Deposit
-==============================
-
-
- auction.deposit
- form
- tree,form
- [('create_uid','=',uid)]
-
-
-
-
- auction.deposit
- form
- tree,form
-
-
-
=============================
Objects per Day
==============================
@@ -417,59 +180,7 @@ Objects per Day
graph,tree
[('month','=',time.strftime('%Y-%m-01'))]
-
-
-
-
- Detailed lots
- auction.lots
- form
- [('auction_id','=', active_id)]
-
-
-
- tree_but_open
- auction.dates
- Open auction
-
-
-
-
-
- Simplified lots for adjudication
- auction.lots
- form
- [('auction_id','=',active_id)]
-
-
-
-
- tree_but_action
- auction.dates
- Open lots for adjudication
-
-
-
-
-
- Auction dates
- auction.dates
- tree
- [('state','=', 'draft')]
-
-
=============================
Auction adjudication
==============================
@@ -505,48 +216,10 @@ Auction adjudication
form
graph,tree
-
-
-
- Depositer's statistics
- report.deposit.border
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
=============================
Object encoded
==============================
-
- report.object.encoded.form
- report.object.encoded
- form
-
-
-
-
report.object.encoded.tree
@@ -554,59 +227,8 @@ Object encoded
tree
-
+
-
-
-
-
-
-
-
-
-
- report.object.encoded.graph
- report.object.encoded
- graph
-
-
-
-
-
-
-
-
-
-
-
- report.object.encoded
- form
- tree
- [('user_id','=',uid),('date','ilike',time.strftime('%Y-%m'))]
-
-
-
- report.object.encoded.tree
- report.object.encoded.manager
- tree
-
-
-
@@ -619,9 +241,9 @@ Object encoded
-
+
report.object.encoded.graph
- report.object.encoded.manager
+ report.object.encoded
graph
@@ -635,34 +257,13 @@ Object encoded
-
- report.object.encoded.manager
+
+ Object statistics
+ report.object.encoded
form
- tree
+ tree,graph
[('date','ilike',time.strftime('%Y-%m'))]
-
- report.unclassified.objects
- report.unclassified.objects
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/addons/auction/report/vnd_bordereau.xsl b/addons/auction/report/vnd_bordereau.xsl
index 356f069dfa8..d5442be6f64 100644
--- a/addons/auction/report/vnd_bordereau.xsl
+++ b/addons/auction/report/vnd_bordereau.xsl
@@ -1,7 +1,7 @@
-
-
+
+
diff --git a/addons/auction/security/ir.model.access.csv b/addons/auction/security/ir.model.access.csv
index 47850e2ad78..b06179bf000 100644
--- a/addons/auction/security/ir.model.access.csv
+++ b/addons/auction/security/ir.model.access.csv
@@ -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
diff --git a/addons/auction/test/auction.yml b/addons/auction/test/auction.yml
index a77ad4ccda6..6b86511cf2a 100644
--- a/addons/auction/test/auction.yml
+++ b/addons/auction/test/auction.yml
@@ -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!')
-
\ No newline at end of file
+ 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!')
diff --git a/addons/auction/wizard/auction_lots_auction_move_view.xml b/addons/auction/wizard/auction_lots_auction_move_view.xml
index fc216cd1893..27d68798ba5 100644
--- a/addons/auction/wizard/auction_lots_auction_move_view.xml
+++ b/addons/auction/wizard/auction_lots_auction_move_view.xml
@@ -7,8 +7,8 @@
form