[auction] merged clean work

bzr revid: hmo@tinyerp.com-20100804135617-11z6ng0lus5cy0fe
This commit is contained in:
Harry (OpenERP)
2010-08-04 19:26:17 +05:30
45 changed files with 3149 additions and 3331 deletions
+7 -10
View File
@@ -40,34 +40,31 @@
""",
'author': 'OpenERP SA',
'depends': ['base', 'account', 'hr_attendance'],
'init_xml': ['auction_sequence.xml'],
'init_xml': ['auction_sequence.xml', 'auction_data.xml'],
'update_xml': [
'security/ir.model.access.csv',
# 'wizard/auction_lots_cancel_view.xml',
# 'wizard/auction_transfer_unsold_object_view.xml',
'wizard/auction_lots_able_view.xml',
'wizard/auction_lots_enable_view.xml',
# 'wizard/auction_lots_able_view.xml',
# 'wizard/auction_lots_enable_view.xml',
'wizard/auction_lots_make_invoice_buyer_view.xml',
'wizard/auction_lots_make_invoice_view.xml',
'wizard/auction_taken_view.xml',
'wizard/auction_lots_auction_move_view.xml',
'wizard/auction_pay_buy_view.xml',
'wizard/auction_payer_sel_view.xml',
#'wizard/auction_payer_sel_view.xml',
'wizard/auction_lots_sms_send_view.xml',
'wizard/auction_catalog_flagey_view.xml',
# 'wizard/auction_aie_send_view.xml',
# 'wizard/auction_aie_send_result_view.xml',
'wizard/auction_lots_buyer_map_view.xml',
# 'wizard/auction_lots_numerotate_view.xml',
'auction_view.xml',
'auction_report.xml',
'report/report_auction_view.xml',
'auction_wizard.xml',
'board_auction_view.xml',
'board_auction_manager_view.xml',
],
'demo_xml': ['auction_demo.xml','board_auction_demo.xml'],
'test': ['test/auction.yml', 'test/auction_wizard.yml'],
'installable': True,
'active': False,
'certificate': '0039333102717',
+401 -1022
View File
File diff suppressed because it is too large Load Diff
+261 -87
View File
@@ -1,98 +1,272 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="account.account" id="auction_income_view">
<field name="name">Auction Adjudications</field>
<field name="code">0</field>
<field name="type">view</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" type="list">
<value search="[('type','=','view')]" model="account.account"/>
</field>
</record>
<!-- Auction lots category data -->
<record model="aie.category" id="aie_category_anti_view">
<field name="name">Antiques</field>
<field name="code">ANTI</field>
</record>
<record model="aie.category" id="aie_category_paint_view">
<field name="name">Painting</field>
<field name="code">PAINT</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_furn_view">
<field name="name">Furnitures</field>
<field name="code">FURN</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_pcg_view">
<field name="name">Porcelain, Ceramics, Glassmaking, ...</field>
<field name="code">PCG</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="account.account" id="auction_expense_view">
<field name="name">Auction Adjudication Expenses</field>
<field name="code">0</field>
<field name="type">view</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" type="list">
<value search="[('type','=','view')]" model="account.account"/>
</field>
</record>
<record model="aie.category" id="aie_category_sbe_view">
<field name="name">Sculpture, bronze, eso</field>
<field name="code">SBE</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_clock_view">
<field name="name">Clocks and watches</field>
<field name="code">CLW</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_caob_view">
<field name="name">Collectible and art objects</field>
<field name="code">COAO</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_engr_view">
<field name="name">Engravings</field>
<field name="code">ENGR</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_gart_view">
<field name="name">Graphic Arts</field>
<field name="code">GART</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_light_view">
<field name="name">Lightings</field>
<field name="code">LGT</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_metal_view">
<field name="name">Metal Ware</field>
<field name="code">MW</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_mini_view">
<field name="name">Miniatures</field>
<field name="code">MAT</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_collect_view">
<field name="name">Collections</field>
<field name="code">CLT</field>
<field name="parent_id" ref="aie_category_mini_view"/>
</record>
<record model="aie.category" id="aie_category_mi_view">
<field name="name">Musical Instruments</field>
<field name="code">MI</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_owm_view">
<field name="name">Old weapons and militaria</field>
<field name="code">OWM</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_oart_view">
<field name="name">Oriental Arts</field>
<field name="code">OART</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_chf_view">
<field name="name">Chineese furnitures</field>
<field name="code">CHF</field>
<field name="parent_id" ref="aie_category_oart_view"/>
</record>
<record model="aie.category" id="aie_category_othr_view">
<field name="name">Others</field>
<field name="code">OTR</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_pst_view">
<field name="name">Posters</field>
<field name="code">PST</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_rel_view">
<field name="name">Religiosa</field>
<field name="code">REL</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_sin_view">
<field name="name">Scientific Instruments</field>
<field name="code">SIN</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_tin_view">
<field name="name">Tin</field>
<field name="code">TIN</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_cwa_view">
<field name="name">Copper wares</field>
<field name="code">CWA</field>
<field name="parent_id" ref="aie_category_tin_view"/>
</record>
<record model="aie.category" id="aie_category_ty_view">
<field name="name">Toys</field>
<field name="code">TY</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_vrs_view">
<field name="name">Verreries</field>
<field name="code">VRS</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_wne_view">
<field name="name">Wine</field>
<field name="code">WNE</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<!-- -->
<record model="account.account" id="auction_income">
<field name="name">Auction Adjudications</field>
<field name="code">7x*</field>
<field name="type">income</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="[auction_income_view]"/>
</record>
<record model="account.account" id="auction_expense">
<field name="name">Auction Adjudication Expenses</field>
<field name="code">6x*</field>
<field name="type">expense</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="[auction_expense_view]"/>
</record>
<record model="aie.category" id="aie_category_con_view">
<field name="name">Contemporary Art</field>
<field name="code">CONTEM</field>
</record>
<record model="aie.category" id="aie_category_con_art_view">
<field name="name">Arts</field>
<field name="code">ARTS</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_curi_view">
<field name="name">Curiosa</field>
<field name="code">CRS</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_ome_view">
<field name="name">Other Media</field>
<field name="code">OME</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_pht_view">
<field name="name">Photo</field>
<field name="code">PHT</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_paint_view">
<field name="name">Painting</field>
<field name="code">CPAINT</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_scul_view">
<field name="name">Sculpture</field>
<field name="code">SCUL</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="account.account" id="auction_income_costs">
<field name="name">Auction Buyer Costs</field>
<field name="code">7x*</field>
<field name="type">tax</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="[auction_income_view]"/>
</record>
<record model="account.account" id="auction_expense_costs">
<field name="name">Auction Seller Costs</field>
<field name="code">6x*</field>
<field name="type">tax</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="[auction_expense_view]"/>
</record>
<record model="aie.category" id="aie_category_con_cshe_view">
<field name="name">Shows</field>
<field name="code">CSHW</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_jew_view">
<field name="name">Jewelry</field>
<field name="code">JWL</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<!-- -->
<record model="account.tax" id="tax_buyer_author">
<field name="name">Author rights (4%)</field>
<field name="type">percent</field>
<field name="applicable_type">code</field>
<field name="amount">0.04</field>
<field name="domain">sabam</field>
<field name="account_collected_id" ref="auction_income_costs"/>
<field name="account_paid_id" ref="auction_income_costs"/>
<field name="python_applicable">result = (price_unit&gt;=1250)</field>
</record>
<record model="account.tax" id="tax_buyer">
<field name="name">Buyer Costs (20%)</field>
<field name="type">percent</field>
<field name="amount">0.20</field>
<field name="domain">auction</field>
<field name="account_collected_id" ref="auction_income_costs"/>
<field name="account_paid_id" ref="auction_income_costs"/>
</record>
<record model="account.tax" id="tax_seller">
<field name="name">Seller Costs (12%)</field>
<field name="type">percent</field>
<field name="amount">-0.12</field>
<field name="domain">auction</field>
<field name="account_collected_id" ref="auction_expense_costs"/>
<field name="account_paid_id" ref="auction_expense_costs"/>
</record>
<record model="aie.category" id="aie_category_uncla_view">
<field name="name">Unclassifieds</field>
<field name="code">UNCLASS</field>
</record>
<record model="aie.category" id="aie_category_afrart_view">
<field name="name">African Arts</field>
<field name="code">AFART</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_argen_view">
<field name="name">Argenterie</field>
<field name="code">ARGENT</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_artfrom_view">
<field name="name">Art from the Ivory Coast</field>
<field name="code">ARTFORM</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_afrec_view">
<field name="name">African Arts</field>
<field name="code">AFRART</field>
<field name="parent_id" ref="aie_category_artfrom_view"/>
</record>
<record model="aie.category" id="aie_category_book_view">
<field name="name">Books, manuscripts, eso.</field>
<field name="code">BME</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_carpet_view">
<field name="name">Carpet and textilles</field>
<field name="code">CARPTEX</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_cartoon_view">
<field name="name">Cartoons</field>
<field name="code">CATOON</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<!-- End Of Auction Lots Category -->
<ir_set>
<field name="keys" eval="[('meta','res.partner'),('name','auction.seller.costs')]"/>
<field name="args" eval="[]"/>
<field name="name">account.seller.costs</field>
<field name="value" eval="tax_seller"/>
<field name="meta" eval="{'type':'many2one', 'string':'Seller Costs', 'relation':'account.tax'}"/>
</ir_set>
<record id="product.product_product_pc2" model="product.product">
<field name="list_price">770.0</field>
<field name="standard_price">700.0</field>
</record>
</data>
</openerp>
+360 -310
View File
@@ -2,6 +2,102 @@
<openerp>
<data noupdate="1">
<!-- demo data for Account -->
<record model="account.account.type" id="account.account_type_tax">
<field name="name">Tax</field>
<field name="code">tax</field>
<field name="close_method">unreconciled</field>
</record>
<record model="account.account" id="auction_income_view">
<field name="name">Auction Adjudications</field>
<field name="code">0</field>
<field name="type">view</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="0">
<value search="[('type','=','view')]" model="account.account"/>
</field>
<field name="user_type" ref="account.account_type_root"/>
</record>
<record model="account.account" id="auction_expense_view">
<field name="name">Auction Adjudication Expenses</field>
<field name="code">1</field>
<field name="type">view</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="0">
<value search="[('type','=','view')]" model="account.account"/>
</field>
<field name="user_type" ref="account.account_type_expense"/>
</record>
<record model="account.account" id="auction_income">
<field name="name">Auction Adjudications</field>
<field name="code">7x*</field>
<field name="user_type" ref="account.account_type_income"/>
<field name="type">receivable</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="auction_income_view"/>
</record>
<record model="account.account" id="auction_expense">
<field name="name">Auction Adjudication Expenses</field>
<field name="code">6x*</field>
<field name="user_type" ref="account.account_type_expense"/>
<field name="type">payable</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="auction_expense_view"/>
</record>
<record model="account.account" id="auction_income_costs">
<field name="name">Auction Buyer Costs</field>
<field name="code">8x*</field>
<field name="type">payable</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="auction_income_view"/>
<field name="user_type" ref="account.account_type_tax"/>
</record>
<record model="account.account" id="auction_expense_costs">
<field name="name">Auction Seller Costs</field>
<field name="code">9x*</field>
<field name="type">receivable</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="auction_expense_view"/>
<field name="user_type" ref="account.account_type_tax"/>
</record>
<record model="account.tax" id="tax_buyer_author">
<field name="name">Author rights (4%)</field>
<field name="type">percent</field>
<field name="applicable_type">code</field>
<field name="amount">0.04</field>
<field name="domain">sabam</field>
<field name="account_collected_id" ref="auction_income_costs"/>
<field name="account_paid_id" ref="auction_income_costs"/>
<field name="python_applicable">result = (price_unit&gt;=1250)</field>
</record>
<record model="account.tax" id="tax_buyer">
<field name="name">Buyer Costs (20%)</field>
<field name="type">percent</field>
<field name="amount">0.20</field>
<field name="domain">auction</field>
<field name="account_collected_id" ref="auction_income_costs"/>
<field name="account_paid_id" ref="auction_income_costs"/>
</record>
<record model="account.tax" id="tax_seller">
<field name="name">Seller Costs (12%)</field>
<field name="type">percent</field>
<field name="amount">-0.12</field>
<field name="domain">auction</field>
<field name="account_collected_id" ref="auction_expense_costs"/>
<field name="account_paid_id" ref="auction_expense_costs"/>
</record>
<!--demo data for the product-->
<record id="product.product_product_pc2" model="product.product">
<field name="list_price">770.0</field>
<field name="standard_price">700.0</field>
</record>
<!--demo data for the partner-->
@@ -10,52 +106,52 @@
</record>
<record id="res_partner_unknown_address_1" model="res.partner.address">
<field name="city">Bruxelles1</field>
<field name="name">Benoit Mortie1r1</field>
<field name="zip">1030</field>
<field name="country_id" model="res.country" search="[('name','=','Belgium')]"/>
<field name="city">Bruxelles1</field>
<field name="name">Benoit Mortie1r1</field>
<field name="zip">1030</field>
<field name="country_id" model="res.country" search="[('name','=','Belgium')]"/>
<field name="email">info@opensides.be</field>
<field name="phone">(+32)2 211 34 83</field>
<field name="street">Rue des Palais 44, bte 33</field>
<field name="type">default</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<field name="email">info@opensides.be</field>
<field name="phone">(+32)2 211 34 83</field>
<field name="street">Rue des Palais 44, bte 33</field>
<field name="type">default</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_2" model="res.partner.address">
<field name="city">Avignon CEDEX 091</field>
<field name="name">Laurent Jacot1</field>
<field name="zip">84911</field>
<field name="country_id" model="res.country" search="[('name','=','France')]"/>
<field name="email">contact@tecsas.fr</field>
<field name="phone">(+33)4.32.74.10.57</field>
<field name="street">85 rue du traite de Rome</field>
<field name="type">default</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_3" model="res.partner.address">
<field name="city">Louvain-la-Neuve</field>
<field name="name">Thomas Passot</field>
<field name="zip">1348</field>
<field name="country_id" model="res.country" search="[('name','=','Belgium')]"/>
<field name="email">info@mediapole.net</field>
<field name="phone">(+32).10.45.17.73</field>
<field name="street">Rue de l'Angelique, 1</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_2" model="res.partner.address">
<field name="city">Avignon CEDEX 091</field>
<field name="name">Laurent Jacot1</field>
<field name="zip">84911</field>
<field name="country_id" model="res.country" search="[('name','=','France')]"/>
<field name="email">contact@tecsas.fr</field>
<field name="phone">(+33)4.32.74.10.57</field>
<field name="street">85 rue du traite de Rome</field>
<field name="type">default</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_3" model="res.partner.address">
<field name="city">Louvain-la-Neuve</field>
<field name="name">Thomas Passot</field>
<field name="zip">1348</field>
<field name="country_id" model="res.country" search="[('name','=','Belgium')]"/>
<field name="email">info@mediapole.net</field>
<field name="phone">(+32).10.45.17.73</field>
<field name="street">Rue de l'Angelique, 1</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<!-- demo data for the auction_artist object-->
<record model="auction.artists" id="auction_art_1">
<field name="name">Philippe Lavilier</field>
<field name="birth_death_dates">1345-1450</field>
</record>
<record model="auction.artists" id="auction_art_2">
<field name="name">POREAU OSWALD</field>
<field name="birth_death_dates">1877-1955</field>
</record>
<!-- demo data for the account tax code-->
<record model="account.tax.code" id="account_tax_code_id1">
@@ -98,104 +194,102 @@
<field name="domain">sabam</field>
<field name="base_code_id" ref="account_tax_code_id5"/>
<field name="tax_code_id" ref="account_tax_code_id5"/>
</record>
<record id="auction_tax1" model="account.tax">
<field name="name">TVA</field>
<field name="amount">0.12</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id4"/>
<field name="tax_code_id" ref="account_tax_code_id4"/>
<field name="name">TVA</field>
<field name="amount">0.12</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id4"/>
<field name="tax_code_id" ref="account_tax_code_id4"/>
</record>
<record id="auction_tax2" model="account.tax">
<field name="name">TVA1</field>
<field name="amount">0.2</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id2"/>
<field name="tax_code_id" ref="account_tax_code_id2"/>
<field name="name">TVA1</field>
<field name="amount">0.2</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id2"/>
<field name="tax_code_id" ref="account_tax_code_id2"/>
</record>
<record id="auction_tax3" model="account.tax">
<field name="name">Buyer Costs</field>
<field name="amount">0.21</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
<field name="name">Buyer Costs</field>
<field name="amount">0.21</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
</record>
<record id="auction_tax4" model="account.tax">
<field name="name">Seller Costs1</field>
<field name="amount">-0.10</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
<field name="name">Seller Costs1</field>
<field name="amount">-0.10</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
</record>
<record id="auction_tax5" model="account.tax">
<field name="name">Seller Costs</field>
<field name="amount">-0.10</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id3"/>
<field name="tax_code_id" ref="account_tax_code_id3"/>
<field name="name">Seller Costs</field>
<field name="amount">-0.10</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id3"/>
<field name="tax_code_id" ref="account_tax_code_id3"/>
</record>
<!-- example for creating a demo data for the tax with basecode and tax code-->
<record id="auction_tax6" model="account.tax">
<field name="name">Frais de vente</field>
<field name="amount">-0.15</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
<field name="name">Frais de vente</field>
<field name="amount">-0.15</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
</record>
<record id="auction_tax20" model="account.tax">
<field name="name">Frais de vente</field>
<field name="amount">0</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id2"/>
<field name="tax_code_id" ref="account_tax_code_id2"/>
<record id="auction_tax20" model="account.tax">
<field name="name">Frais de vente</field>
<field name="amount">0</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id2"/>
<field name="tax_code_id" ref="account_tax_code_id2"/>
</record>
<record id="monproduit" model="product.product">
<field name="name">Oeuvres a 21%</field>
<field name="categ_id" ref="product.product_category_pc"/>
</record>
<!--===========================================================================================-->
<!-- start == demo data for the auction_lot_Category object-->
<record model="auction.lot.category" id="auction_cat_1">
<field name="name">painting</field>
<field name="name">Painting</field>
<field name="priority">1</field>
<field name="aie_categ">8</field>
<field name="aie_categ" ref="aie_category_paint_view"/>
</record>
<record model="auction.lot.category" id="auction_cat_2">
<field name="name">Furniture</field>
<field name="priority">2</field>
<field name="aie_categ">10</field>
<field name="aie_categ" ref="aie_category_furn_view"/>
</record>
<record model="auction.lot.category" id="auction_cat_3">
<field name="name">glass</field>
<field name="name">Glass</field>
<field name="priority">2</field>
<field name="aie_categ">25</field>
<field name="aie_categ" ref="aie_category_pcg_view"/>
</record>
<record model="auction.lot.category" id="auction_cat_4">
<field name="name">sculpture</field>
<field name="name">Sculpture</field>
<field name="priority">10</field>
<field name="aie_categ">18</field>
<field name="aie_categ" ref="aie_category_sbe_view"/>
</record>
<record model="auction.lot.category" id="auction_cat_5">
<field name="name">Jawellery</field>
<field name="priority">6</field>
<field name="aie_categ">15</field>
<field name="aie_categ" ref="aie_category_jew_view"/>
</record>
<!-- end == demo data for the auction_lot_Category-->
@@ -203,20 +297,18 @@
<!-- start== demo data for the auction_date-->
<record model="auction.dates" id="auction_date_1">
<field name="name">painting Exhibition</field>
<field name="expo1" eval="time.strftime('%Y-%m-01')" />
<field name="expo2" eval="time.strftime('%Y-%m-15')" />
<field name="auction1" eval="time.strftime('%Y-%m-20')" />
<field name="auction2" eval="time.strftime('%Y-%m-28')" />
<field name="buyer_costs" model="account.tax" search="[('name','=','Buyer Costs')]"></field>
<field name="seller_costs" model="account.tax" search="[('name','=','Seller Costs')]"></field>
<field name="acc_income" ref="account.a_sale"/>
<field name="acc_expense" ref="account.a_expense"/>
<field name="journal_id" ref="account.sales_journal"/>
<field name="journal_seller_id" ref="account.expenses_journal"/>
<field name="account_analytic_id" model="account.analytic.account" search="[('code','=','1')]"></field>
<field name="name">painting Exhibition</field>
<field name="expo1" eval="time.strftime('%Y-%m-01')" />
<field name="expo2" eval="time.strftime('%Y-%m-15')" />
<field name="auction1" eval="time.strftime('%Y-%m-20')" />
<field name="auction2" eval="time.strftime('%Y-%m-28')" />
<field name="buyer_costs" model="account.tax" search="[('name','=','Buyer Costs')]"></field>
<field name="seller_costs" model="account.tax" search="[('name','=','Seller Costs')]"></field>
<field name="acc_income" ref="account.a_sale"/>
<field name="acc_expense" ref="account.a_expense"/>
<field name="journal_id" ref="account.sales_journal"/>
<field name="journal_seller_id" ref="account.expenses_journal"/>
<field name="account_analytic_id" model="account.analytic.account" search="[('code','=','1')]"></field>
</record>
<record model="auction.dates" id="auction_date_2">
@@ -225,53 +317,47 @@
<field name="expo2" eval="time.strftime('%Y-%m-10')" />
<field name="buyer_costs" model="account.tax" search="[('name','=','Buyer Costs')]"></field>
<field name="seller_costs" model="account.tax" search="[('name','=','Seller Costs')]"></field>
<field name="auction1" eval="time.strftime('%Y-%m-14')" />
<field name="auction2" eval="time.strftime('%Y-%m-28')" />
<field name="acc_income" ref="account.a_sale"/>
<field name="acc_expense" ref="account.a_expense"/>
<field name="journal_id" ref="account.sales_journal"/>
<field name="journal_seller_id" ref="account.expenses_journal"/>
<field name="account_analytic_id" model="account.analytic.account" search="[('code','=','1')]"></field>
</record>
</record>
<!-- end == demo data for the auction_dates-->
<!-- start == demo data for the auction_deposit-->
<record model="auction.deposit" id="auction_deposit_1">
<field name="date_dep" eval="time.strftime('%Y')+'-04-01'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-01'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.deposit" id="auction_deposit_2">
<field name="date_dep" eval="time.strftime('%Y')+'-04-05'"/>
<field name="partner_id" model="res.partner" search="[('name','=','China Export')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-05'"/>
<field name="partner_id" model="res.partner" search="[('name','=','China Export')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.deposit" id="auction_deposit_3">
<field name="date_dep" eval="time.strftime('%Y')+'-04-10'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Agrolait')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-10'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Agrolait')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.deposit" id="auction_deposit_4">
<field name="date_dep" eval="time.strftime('%Y')+'-04-15'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Bank Wealthy and sons')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-15'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Bank Wealthy and sons')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.deposit" id="auction_deposit_5">
<field name="date_dep" eval="time.strftime('%Y')+'-04-12'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-12'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.lots" id="auction_deposit_1_lot_1">
@@ -434,7 +520,6 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_6_lot_1">
@@ -451,7 +536,6 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_6_lot_2">
@@ -468,11 +552,8 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_7_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Hardware photos</field>
@@ -487,12 +568,10 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_7_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="auction_id" ref="auction_date_1" />
<field name="name">Home Appliance photos</field>
<field name="lot_num">12</field>
<!--field name="lot_type">common</field-->
@@ -505,10 +584,8 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_8_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">mobile accesories photos</field>
@@ -527,7 +604,7 @@
<record model="auction.lots" id="auction_deposit_8_lot_2">
<field name="auction_id" ref="auction_date_2" />
<field name="name"> piques-cierges</field>
<field name="name">pikes-candles</field>
<field name="lot_num">14</field>
<!--field name="lot_type">common</field-->
<field name="lot_est1">30</field>
@@ -539,13 +616,11 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_9_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Service à café</field>
<field name="name">Coffee Service</field>
<field name="lot_num">15</field>
<!--field name="lot_type">common</field-->
<field name="lot_est1">10</field>
@@ -557,16 +632,11 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_9_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Pendule</field>
<field name="auction_id" ref="auction_date_1" />
<field name="name">Pendulum</field>
<field name="lot_num">16</field>
<field name="lot_est1">100</field>
<field name="lot_est2">200</field>
@@ -581,23 +651,22 @@
<record model="auction.lots" id="auction_deposit_10_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Cassolettes en marbre</field>
<field name="name">Cassolette marble</field>
<field name="lot_num">17</field>
<field name="lot_est1">400</field>
<field name="lot_est2">500</field>
<field name="obj_desc">marbre Saint Rémi</field>
<field name="obj_desc">Marble Saint Remi</field>
<field name="obj_ret">150</field>
<field name="obj_num">17</field>
<field name="obj_price">0</field>
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_10_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Tableau</field>
<field name="name">Table</field>
<field name="lot_num">18</field>
<field name="lot_est1">1600</field>
<field name="lot_est2">2200</field>
@@ -608,39 +677,26 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_11_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Vase</field>
<field name="auction_id" ref="auction_date_1" />
<field name="name">Yourself</field>
<field name="lot_num">19</field>
<field name="lot_est1">180</field>
<field name="lot_est2">220</field>
<field name="obj_desc">Rouge</field>
<field name="obj_desc">Red</field>
<field name="obj_ret">0</field>
<field name="obj_num">19</field>
<field name="obj_price">190.00</field>
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_12_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Appareil à photos</field>
<field name="auction_id" ref="auction_date_1" />
<field name="name">Digital photo</field>
<field name="lot_num">20</field>
<field name="lot_est1">160</field>
<field name="lot_est2">340</field>
@@ -651,22 +707,8 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.bid" id="auction_date_1_bid_1">
<field name="name">bid1</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
@@ -701,183 +743,191 @@
</record>
<record model="auction.bid" id="auction_date_1_bid_4">
<field name="name">bid4</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_1" />
<field name="name">bid4</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_1" />
</record>
<record model="auction.bid_line" id="auction_date_1_bid_4_bid_1_auction_bid_line1">
<field name="bid_id" ref="auction_date_1_bid_4" />
<field name="lot_id" ref="auction_deposit_2_lot_2" />
<field name="bid_id" ref="auction_date_1_bid_4" />
<field name="lot_id" ref="auction_deposit_2_lot_2" />
</record>
<record model="auction.bid" id="auction_date_1_bid_5">
<field name="name">bid5</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_1" />
<field name="name">bid5</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_1" />
</record>
<record model="auction.bid_line" id="auction_date_1_bid_5_auction_bid_line1">
<field name="bid_id" ref="auction_date_1_bid_5" />
<field name="lot_id" ref="auction_deposit_3_lot_1" />
<field name="bid_id" ref="auction_date_1_bid_5" />
<field name="lot_id" ref="auction_deposit_3_lot_1" />
</record>
<record model="auction.bid" id="auction_date_2_bid_1">
<field name="name">bid6</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid6</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_1_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_1" />
<field name="lot_id" ref="auction_deposit_3_lot_2" />
<field name="bid_id" ref="auction_date_2_bid_1" />
<field name="lot_id" ref="auction_deposit_3_lot_2" />
</record>
<record model="auction.bid" id="auction_date_2_bid_2">
<field name="name">bid7</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid7</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_2_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_2" />
<field name="lot_id" ref="auction_deposit_4_lot_1" />
<field name="bid_id" ref="auction_date_2_bid_2" />
<field name="lot_id" ref="auction_deposit_4_lot_1" />
</record>
<record model="auction.bid" id="auction_date_2_bid_3">
<field name="name">bid8</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid8</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_3_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_3" />
<field name="lot_id" ref="auction_deposit_4_lot_2" />
<field name="bid_id" ref="auction_date_2_bid_3" />
<field name="lot_id" ref="auction_deposit_4_lot_2" />
</record>
<record model="auction.bid" id="auction_date_2_bid_4">
<field name="name">bid9</field>
<field name="partner_id" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid9</field>
<field name="partner_id" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_4_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_4" />
<field name="lot_id" ref="auction_deposit_5_lot_1" />
<field name="bid_id" ref="auction_date_2_bid_4" />
<field name="lot_id" ref="auction_deposit_5_lot_1" />
</record>
<record model="auction.bid" id="auction_date_2_bid_5">
<field name="name">bid10</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid10</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_5_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_5" />
<field name="lot_id" ref="auction_deposit_5_lot_2" />
<field name="bid_id" ref="auction_date_2_bid_5" />
<field name="lot_id" ref="auction_deposit_5_lot_2" />
</record>
<!--demo data for the hr_employee-->
<record model="hr.employee" id="employee2">
<field name="name">Demo</field>
<record model="hr.employee" id="employee2">
<field name="name">Demo</field>
<!-- <field name="regime">45</field>-->
<field name="user_id" search="[('login','=','admin')]" model="res.users"/>
<field name="user_id" search="[('login','=','admin')]" model="res.users"/>
<!-- <field name="holiday_max">25</field>
<field name="workgroups" ref="timesheet_group1" />-->
</record>
<field name="workgroups" ref="timesheet_group1" />-->
</record>
<!--demo data for the hr_attendence for employee1 -->
<record model="hr.attendance" id="unknown1_emp1">
<field name="name" eval="time.strftime('%Y-%m-25 08:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp2">
<field name="name" eval="time.strftime('%Y-%m-25 9:21')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp3">
<field name="name" eval="time.strftime('%Y-%m-25 09:25')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp4">
<field name="name" eval="time.strftime('%Y-%m-25 11:54')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp5">
<field name="name" eval="time.strftime('%Y-%m-25 11:59')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp6">
<field name="name" eval="time.strftime('%Y-%m-25 13:31')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1"/>
</record>
<record model="hr.attendance" id="unknown1_emp7">
<field name="name" eval="time.strftime('%Y-%m-25 20:10')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp8">
<field name="name" eval="time.strftime('%Y-%m-25 21:34')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<!--demo data for the hr_attendence for employee1 -->
<!--demo data for the hr_attendence for employee2-->
<record model="hr.attendance" id="unknown2_emp1">
<field name="name" eval="time.strftime('%Y-%m-26 08:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp2">
<field name="name" eval="time.strftime('%Y-%m-26 9:21')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp3">
<field name="name" eval="time.strftime('%Y-%m-26 10:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp4">
<field name="name" eval="time.strftime('%Y-%m-26 12:54')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp5">
<field name="name" eval="time.strftime('%Y-%m-26 13:32')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp6">
<field name="name" eval="time.strftime('%Y-%m-26 16:31')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2"/>
</record>
<record model="hr.attendance" id="unknown2_emp7">
<field name="name" eval="time.strftime('%Y-%m-26 17:10')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp8">
<field name="name" eval="time.strftime('%Y-%m-26 22:34')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown1_emp1">
<field name="name" eval="time.strftime('%Y-%m-25 08:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp2">
<field name="name" eval="time.strftime('%Y-%m-25 9:21')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp3">
<field name="name" eval="time.strftime('%Y-%m-25 09:25')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp4">
<field name="name" eval="time.strftime('%Y-%m-25 11:54')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp5">
<field name="name" eval="time.strftime('%Y-%m-25 11:59')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp6">
<field name="name" eval="time.strftime('%Y-%m-25 13:31')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1"/>
</record>
<record model="hr.attendance" id="unknown1_emp7">
<field name="name" eval="time.strftime('%Y-%m-25 20:10')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp8">
<field name="name" eval="time.strftime('%Y-%m-25 21:34')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<!--demo data for the hr_attendence for employee2-->
<record model="hr.attendance" id="unknown2_emp1">
<field name="name" eval="time.strftime('%Y-%m-26 08:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp2">
<field name="name" eval="time.strftime('%Y-%m-26 9:21')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp3">
<field name="name" eval="time.strftime('%Y-%m-26 10:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
-<record model="hr.attendance" id="unknown2_emp4">
<field name="name" eval="time.strftime('%Y-%m-26 12:54')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp5">
<field name="name" eval="time.strftime('%Y-%m-26 13:32')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp6">
<field name="name" eval="time.strftime('%Y-%m-26 16:31')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2"/>
</record>
<record model="hr.attendance" id="unknown2_emp7">
<field name="name" eval="time.strftime('%Y-%m-26 17:10')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp8">
<field name="name" eval="time.strftime('%Y-%m-26 22:34')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
</data>
</data>
</openerp>
+30 -34
View File
@@ -3,7 +3,7 @@
<data>
<!--<delete model="ir.actions.report.xml" search="[('model','like','auction.')]"/>-->
<report string="Listing Huissiers"
<report string="Listing Huissiers"
model="auction.lots"
name="flagey.huissier"
xsl="auction/report/huissier.xsl"
@@ -13,7 +13,7 @@
/>
<report string="Artists Biography"
<report string="Artists Biography"
model="auction.artists"
name="report.auction.artists"
xml="auction/report/artists.xml"
@@ -29,14 +29,14 @@
id="art_auction"
multi="1"/>
-->
<report string="Bids phones"
<report string="Bids phones"
model="auction.lots"
name="bids.lots"
rml="auction/report/bids_lots.rml"
id="bid_phone"
multi="1"/>
<report string="Bids"
<report string="Bids"
model="auction.bid"
name="auction.bids"
rml="auction/report/auction_bids.rml"
@@ -53,7 +53,7 @@
id="v_report_barcode_lot"/>
<report string="Seller Labels"
<report string="Seller Labels"
model="auction.lots"
name="auction.seller_labels"
auto="False"
@@ -89,8 +89,7 @@
multi="1"/>
<report string="Lots List - Landscape"
<report string="Lots List - Landscape"
model="auction.lots"
name="report.auction.lots.list.landscape"
xml="auction/report/lots_list_landscape.xml"
@@ -98,16 +97,13 @@
id="lot_list_inv"
multi="1"/>
<report string="Lots List Inventory"
model="auction.lots"
name="lots.list.inventory"
rml="auction/report/lots_list_inventory.rml"
multi="1"/>
model="auction.lots"
name="lots.list.inventory"
rml="auction/report/lots_list_inventory.rml"
multi="1"/>
<report string="Lots List"
<report string="Lots List"
model="auction.lots"
name="report.auction.lots.list"
xml="auction/report/lots_list.xml"
@@ -135,16 +131,17 @@
auto="False"
multi="1"/>-->
<report string="Buyer Form"
<report string="Buyer Form"
id="buyer_form_id"
model="auction.lots"
name="report.auction.ach_bordereau"
xml="auction/report/ach_bordereau.xml"
xsl="auction/report/ach_bordereau.xsl"
multi="0"
header= "True"
/>
<report string="Deposits"
<report string="Deposits"
id="id_deposit"
model="auction.deposit"
name="report.auction.deposit"
@@ -158,7 +155,7 @@
name="auction.cat_flagy"
xsl="'auction/report/catalog2.xsl"/>-->
<report string="Seller Form"
<report string="Seller Form"
id="seller_lots_3"
model="auction.lots"
name="report.auction.vnd_bordereau"
@@ -166,7 +163,7 @@
xsl="auction/report/vnd_bordereau.xsl"
multi="1"/>
<report string="Seller List"
<report string="Seller List"
model="auction.lots"
multi="1"
id="seller_form_id"
@@ -175,7 +172,7 @@
xsl="auction/report/seller_list.xsl"/>
<report string="Buyer List"
<report string="Buyer List"
model="auction.lots"
name="buyer.list"
id="buy_id_list"
@@ -193,7 +190,7 @@
id="v_seller_list"
multi="1"/>
-->
<report string="Bids per lot (phone)"
<report string="Bids per lot (phone)"
model="auction.lots"
name="bids.phones.details"
rml="auction/report/bids_phones_details.rml"
@@ -208,19 +205,20 @@
xsl="auction/report/lots_bids_phone.xsl"
multi="1"/>-->
<report string="Auction's results"
model="auction.lots"
name="auction.result"
rml="auction/report/auction_result.rml"
multi="1"/>
<!-- temp -->
<report string="Results with buyer"
model="auction.lots"
name="report.auction.buyer.result"
rml="auction/report/auction_buyer_result.rml"
multi="1"
id="res_w_buyer"/>
<report string="Auction's results"
model="auction.lots"
name="auction.result"
rml="auction/report/auction_result.rml"
multi="1"/>
<report string="Results with buyer"
model="auction.lots"
name="report.auction.buyer.result"
rml="auction/report/auction_buyer_result.rml"
multi="1"
id="res_w_buyer"/>
<!-- <wizard
id="auction_catalog_flagy"
@@ -229,8 +227,6 @@
name="auction.catalog.flagey"
keyword="client_print_multi"/>-->
</data>
</openerp>
+20 -17
View File
@@ -1,30 +1,33 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
#
# Sequences for sale.order
#
<!-- Sequences for Auction deposit -->
<record model="ir.sequence.type" id="seq_type_auction_deposit">
<field name="name">Auction deposit</field>
<field name="code">auction.deposit</field>
<field name="name">Auction deposit</field>
<field name="code">auction.deposit</field>
</record>
<record model="ir.sequence" id="seq_sale_order">
<field name="name">Auction deposit</field>
<field name="code">auction.deposit</field>
<field name="prefix">AD/</field>
<field name="padding">3</field>
<field name="name">Auction deposit</field>
<field name="code">auction.deposit</field>
<field name="prefix">AD/</field>
<field name="padding">3</field>
</record>
<!-- Sequences for Auction Bid -->
<record model="ir.sequence.type" id="seq_type_bid">
<field name="name">Auction bid </field>
<field name="code">auction.bid</field>
<field name="name">Auction bid </field>
<field name="code">auction.bid</field>
</record>
<record model="ir.sequence" id="seq_auction_bid">
<field name="name">Auction bid</field>
<field name="code">auction.bid</field>
<field name="prefix">bid/</field>
<field name="padding">3</field>
<field name="name">Auction bid</field>
<field name="code">auction.bid</field>
<field name="prefix">bid/</field>
<field name="padding">3</field>
</record>
</data>
File diff suppressed because it is too large Load Diff
@@ -5,6 +5,7 @@
<field name="name">Auction manager</field>
</record>
<record model="ir.ui.view" id="board_auction_manager_form1">
<field name="name">board.auction.manager.form</field>
<field name="model">board.board</field>
@@ -13,8 +14,6 @@
<form string="Auction manager ">
<hpaned position="100">
<child1>
<action
string="Latest objects"
name="%(auction.action_report_latest_objects_manager_tree)d"
@@ -54,7 +53,6 @@
string="Objects by day"
name="%(auction.action_report_auction_object_date_tree)d"
view_mode="graph,tree" colspan="4" />
</child2>
</hpaned>
</form>
+2 -2
View File
@@ -4,7 +4,7 @@
<record model="board.note.type" id="note_auction_type">
<field name="name">Auction</field>
</record>
<record model="ir.ui.view" id="board_auction_manager_form">
<field name="name">board.auction.manager.form</field>
<field name="model">board.board</field>
@@ -58,7 +58,7 @@
<field name="usage">menu</field>
<field name="view_id" ref="board_auction_manager_form"/>
</record>
<menuitem name="Dashboard" id="menu_board_auction" parent="auction_report_menu" sequence="0"/>
<menuitem name="Dashboard" id="menu_board_auction" parent="auction.auction_report_menu" sequence="0"/>
<menuitem
name="Auction Member"
action="open_board_auction"
+1 -1
View File
@@ -32,7 +32,7 @@ import auction_objects
import buyer_form_report
import seller_form_report
import report_auction
import buyer_list
+1 -19
View File
@@ -14,38 +14,20 @@
<street2 type="field" name="address.street2"/>
<zip type="field" name="address.zip"/>
<city type="field" name="address.city"/>
<!--<country type="field" name="address.country.name"/>-->
<phone type="field" name="address.phone"/>
<mobile type="field" name="address.mobile"/>
</client_info>
<objects>
<cost type="call" name="compute_buyer_costs" args="">
<!--<name value="name"/>-->
<amount value="amount"/>
</cost>
<!--<cost type="field" name="auction_id.buyer_costs"/>
<name value="name"/>
<amount value="amount"/>
</cost>-->
<!--<cost type="call" name="compute_buyer_costs" args="">
<name value="name"/>
<amount value="amount"/>
</cost>-->
<object type="fields" name="obj_num,id">
<id type="field" name="id"/>
<barcode type="field" name="id" addchecksum="false" print-text="true"/>
<!--<barcode value="id" addchecksum="false" print-text="true"/>
-->
<cost type="call" name="compute_buyer_costs" args="">
<!--<id value="id"/>-->
<amount value="amount"/>
</cost>
<barcode type="field" name="id"/>
+3 -2
View File
@@ -1,8 +1,9 @@
<?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"/>
<!-- TOFIX: Path Problem -->
<xsl:import href="corporate_defaults.xsl"/>
<xsl:import href="rml_template.xsl"/>
+59 -157
View File
@@ -1,162 +1,64 @@
<?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: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" /> -->
<xsl:template match="/">
<xsl:call-template name="rml" />
</xsl:template>
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
<xsl:import href="../../base/report/rml_template.xsl"/>
<xsl:template match="/">
<xsl:call-template name="rml"/>
</xsl:template>
<xsl:template name="rml" match="/">
<document filename="example.pdf">
<template>
<pageTemplate id="first">
<frame id="first" x1="1cm" y1="2.5cm" width="19.0cm" height="23.0cm"/>
<pageGraphics>
<xsl:apply-imports />
</pageGraphics>
</pageTemplate>
</template>
<stylesheet>
<paraStyle name="normal" fontName="Times-Roman" fontSize="12" />
<paraStyle name="title" fontName="Times-Bold" fontSize="15" alignment="center" />
<paraStyle name="table_title" fontName="Times-Bold" fontSize="12" alignment="center" />
<paraStyle name="product1" fontName="Times-Roman" fontSize="8" />
<paraStyle name="categ" fontName="Times-Bold" fontSize="10" textColor="blue"/>
<paraStyle name="price" fontName="Times-Roman" fontSize="8" alignment="right" />
<xsl:template name="stylesheet">
<paraStyle name="login-title" fontName="Helvetica" fontSize="12"/>
<paraStyle name="login" fontName="Helvetica-Bold" fontSize="16"/>
<blockTableStyle id="main_title">
<blockAlignment value="CENTER" />
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#e6e6e6" />
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="objects">
<blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="-1,0"/>
<blockValign value="TOP"/>
<blockAlignment value="RIGHT" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEBELOW" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="object-totals">
<blockValign value="TOP"/>
<blockAlignment value="RIGHT"/>
<lineStyle kind="LINEABOVE" start="-1,0" stop="-1,0"/>
<lineStyle kind="LINEABOVE" start="-1,-1" stop="-1,-1"/>
</blockTableStyle>
</xsl:template>
<xsl:template name="story">
<xsl:apply-templates select="borderform-list"/>
</xsl:template>
<xsl:template match="borderform-list">
<xsl:apply-templates select="borderform">
<xsl:sort order="ascending" select="client_info/name"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="client_info">
<para>
<b>
<xsl:value-of select="title" />
<xsl:text> </xsl:text>
<xsl:value-of select="name"/>
</b>
</para>
<para><xsl:value-of select="street"/></para>
<para><xsl:value-of select="street2"/></para>
<para>
<xsl:value-of select="zip"/>
<xsl:text> </xsl:text>
<xsl:value-of select="city"/>
</para>
<!-- <para><xsl:value-of select="country"/></para>-->
</xsl:template>
<xsl:template match="borderform">
<xsl:apply-templates select="client_info"/>
<setNextTemplate name="other_pages"/>
<nextFrame/>
<para style="login-title" t="1">Plate Number:</para>
<para style="login"><xsl:value-of select="login"/></para>
<spacer length="1cm"/>
<para>
<b t="1">Document</b>: <xsl:text t="1">Buyer form</xsl:text>
</para><para>
<b t="1">Auction</b>: <xsl:value-of select="title"/>
</para>
<xsl:if test="client_info">
<para>
<b t="1">Customer Contact</b>:
<xsl:value-of select="client_info/phone"/>
<xsl:if test="number(string-length(client_info/mobile) &gt; 0) + number(string-length(client_info/phone) &gt; 0) = 2">
<xsl:text> - </xsl:text>
</xsl:if>
<xsl:value-of select="client_info/mobile"/>
</para><para>
<b t="1">Customer Reference</b>: <xsl:value-of select="client_info/ref"/>
</para>
</xsl:if>
<spacer length="1cm"/>
<xsl:apply-templates select="objects"/>
<setNextTemplate name="first_page"/>
<pageBreak/>
</xsl:template>
<xsl:template match="objects">
<blockTable colWidths="3.1cm,1.8cm,9.6cm,1.5cm,2.2cm" style="objects">
<tr>
<td/>
<td t="1">Cat. N.</td>
<td t="1">Description</td>
<td t="1">Paid</td>
<td t="1">Adj.(EUR)</td>
</tr>
<xsl:apply-templates select="object"/>
</blockTable>
<condPageBreak height="3.2cm"/>
<blockTable colWidths="3.1cm,1.8cm,9.6cm,1.5cm,2.2cm" style="object-totals">
<tr>
<td/>
<td/>
<td/>
<td t="1">Subtotal:</td>
<td><xsl:value-of select="format-number(sum(object[price != '']/price), '#,##0.00')"/></td>
</tr>
<xsl:apply-templates select="cost"/>
<tr>
<td/>
<td/>
<td/>
<td t="1">Total:</td>
<td><xsl:value-of select="format-number(sum(object[price != '']/price) + sum(cost/amount), '#,##0.00')"/></td>
</tr>
</blockTable>
</xsl:template>
<xsl:template match="cost">
<tr>
<td/>
<td/>
<td/>
<td><xsl:value-of select="name"/>:</td>
<td><xsl:value-of select="format-number(amount, '#,##0.00')"/></td>
</tr>
</xsl:template>
<xsl:template match="object">
<tr>
<td>
<xsl:if test="image">
<image width="2.5cm" height="2.2cm">
<xsl:attribute name="name"><xsl:value-of select="image"/></xsl:attribute>
</image>
</xsl:if>
</td>
<td><xsl:value-of select="ref"/></td>
<td>
<para>
<b><xsl:value-of select="title"/><xsl:text>. </xsl:text></b>
<xsl:value-of select="desc"/>
</para>
</td>
<td><xsl:if test="state='paid'"><xsl:text>X</xsl:text></xsl:if></td>
<td>
<xsl:if test="price!=''">
<xsl:value-of select="format-number(price, '#,##0.00')"/>
</xsl:if>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
<blockTableStyle id="product">
<blockAlignment value="LEFT" />
<xsl:for-each select="/report/title">
<xsl:variable name="col" select="attribute::number" />
<blockBackground>
<xsl:attribute name="colorName">#e6e6e6</xsl:attribute>
<xsl:attribute name="start">
<xsl:value-of select="$col" />
<xsl:text>,0</xsl:text>
</xsl:attribute>
<xsl:attribute name="stop">
<xsl:value-of select="$col" />
<xsl:text>,0</xsl:text>
</xsl:attribute>
</blockBackground>
</xsl:for-each>
<lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,-1" />
<lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
<lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
</stylesheet >
<story>
<xsl:call-template name="story"/>
</story>
</document>
</xsl:template>
+31 -33
View File
@@ -35,6 +35,7 @@ import base64
import wizard
import photo_shadow
from tools import config
import addons
def _to_unicode(s):
try:
@@ -64,16 +65,13 @@ def _to_decode(s):
class auction_catalog(report_rml):
def create_xml(self, cr, uid, ids, data, context):
xml = self.catalog_xml(cr, uid, ids, data, context)
temp=self.post_process_xml_data(cr, uid, xml, context)
temp = self.post_process_xml_data(cr, uid, xml, context)
return temp
def catalog_xml(self, cr, uid, ids, data, context, cwid="0"):
impl = minidom.getDOMImplementation()
doc = impl.createDocument(None, "report", None)
catalog=doc.createElement('catalog')
doc.documentElement.appendChild(catalog)
@@ -82,37 +80,38 @@ class auction_catalog(report_rml):
commdb='comm'
tab_avoid = []
tab_no_photo=[]
for id in ids:
lot_ids=pooler.get_pool(cr.dbname).get('auction.lots').search(cr, uid, [('auction_id', '=', id)])
ab=pooler.get_pool(cr.dbname).get('auction.lots').read(cr, uid, lot_ids, ['auction_id','name','lot_num','lot_est1','lot_est2'], context)
auction_dates_ids = [x["auction_id"][0] for x in ab]
auction_lot_pool = pooler.get_pool(cr.dbname).get('auction.lots')
auction_dates_pool = pooler.get_pool(cr.dbname).get('auction.dates')
for auction in auction_dates_pool.browse(cr, uid, ids, context=context):
auction_lot_ids = auction_lot_pool.search(cr, uid, [('auction_id', '=', auction.id)])
#for lot in auction_lot_pool.browse(cr, uid, auction_lot_ids, context=context):
# ab=pooler.get_pool(cr.dbname).get('auction.lots').read(cr, uid, lot_ids, ['auction_id','name','lot_num','lot_est1','lot_est2'], context)
#auction_dates_ids = [x["auction_id"][0] for x in ab]
res=pooler.get_pool(cr.dbname).get('auction.dates').read(cr, uid, ids, ['name','auction1','auction2'], context)
# name emelment
key = 'name'
categ = doc.createElement(key)
categ.appendChild(doc.createTextNode(_to_decode(res[0]["name"])))
categ.appendChild(doc.createTextNode(_to_decode(auction.name)))
catalog.appendChild(categ)
#Auctuion Date element
categ = doc.createElement("AuctionDate1")
categ.appendChild(doc.createTextNode(_to_decode(res[0]['auction1'])))
categ.appendChild(doc.createTextNode(_to_decode(auction.auction1)))
catalog.appendChild(categ)
# Action Date 2 element
categ = doc.createElement("AuctionDate2")
categ.appendChild(doc.createTextNode(_to_decode(res[0]['auction2'])))
categ.appendChild(doc.createTextNode(_to_decode(auction.auction2)))
catalog.appendChild(categ)
# promotion element
# promotion element
promo = doc.createElement('promotion1')
fp = file(config['addons_path']+'/auction/report/images/flagey_logo.jpg','r')
fp = file(addons.get_module_resource('auction','report', 'images', 'flagey_logo.jpg'),'r')
file_data = fp.read()
promo.appendChild(doc.createTextNode(base64.encodestring(file_data)))
catalog.appendChild(promo)
promo = doc.createElement('promotion2')
fp = file(config['addons_path']+'/auction/report/images/flagey_logo.jpg','r')
fp = file(addons.get_module_resource('auction','report', 'images', 'flagey_logo.jpg'),'r')
file_data = fp.read()
promo.appendChild(doc.createTextNode(base64.encodestring(file_data)))
catalog.appendChild(promo)
@@ -122,36 +121,30 @@ class auction_catalog(report_rml):
catalog.appendChild(products)
side = 0
length = 0
auction_ids = []
for test in ab:
if test.has_key('auction_id'):
auction_ids.append(test['auction_id'][0])
cr.execute('select * from auction_lots where auction_id IN %s',(tuple(auction_ids),))
res = cr.dictfetchall()
for cat in res:
product =doc.createElement('product')
for cat in auction_lot_pool.browse(cr, uid, auction_lot_ids, context=context):
product = doc.createElement('product')
products.appendChild(product)
if cat['obj_desc']:
if cat.obj_desc:
infos = doc.createElement('infos')
lines = re.split('<br/>|\n', _to_unicode(cat['obj_desc']))
lines = re.split('<br/>|\n', _to_unicode(cat.obj_desc))
for line in lines:
xline = doc.createElement('info')
xline.appendChild(doc.createTextNode(_to_decode(line)))
infos.appendChild(xline)
product.appendChild(infos)
if cat['lot_num']:
if cat.lot_num:
lnum = doc.createElement('lot_num')
lnum.appendChild(doc.createTextNode(_to_decode(str(cat['lot_num']))))
lnum.appendChild(doc.createTextNode(_to_decode(str(cat.lot_num))))
infos.appendChild(lnum)
if cat['image']:
if cat.image:
import random
import tempfile
limg = doc.createElement('photo_small')
file_name = tempfile.mktemp(prefix='openerp_auction_', suffix='.jpg')
fp = file(file_name, 'w')
content = base64.decodestring(cat['image'])
content = base64.decodestring(cat.image)
fp.write(content)
fp.close()
fp = file(file_name,'r')
@@ -164,10 +157,15 @@ class auction_catalog(report_rml):
limg.appendChild(doc.createTextNode(test_data))
infos.appendChild(limg)
for key in ('lot_est1','lot_est2'):
if cat.lot_est1:
ref2 = doc.createElement(key)
ref2.appendChild(doc.createTextNode( _to_decode(str(cat[key] or 0.0))))
ref2.appendChild(doc.createTextNode( _to_decode(str(cat.lot_est1 or 0.0))))
product.appendChild(ref2)
if cat.lot_est2:
ref2 = doc.createElement(key)
ref2.appendChild(doc.createTextNode( _to_decode(str(cat.lot_est2 or 0.0))))
product.appendChild(ref2)
oldlength = length
length += 2.0
if length>23.7:
@@ -180,7 +178,7 @@ class auction_catalog(report_rml):
ref4 = doc.createElement('side')
ref4.appendChild(doc.createTextNode( "1" ))
product.appendChild(ref4)
xml1 = doc.toxml()
xml1 = doc.toxml()
return xml1
auction_catalog('report.auction.cat_flagy', 'auction.dates','','addons/auction/report/catalog2.xsl')
+85 -8
View File
@@ -12,7 +12,7 @@
<!-- <fill color="(0.6,0.3,0.1)"/>-->
<image x="7cm" y="25cm" file="addons/auction/report/images/aeko_logo.jpg"/>
<image x="7cm" y="25cm" file="addons/auction/report/images/flagey_logo.jpg"/>
<image x="7cm" y="25cm" file="addons/auction/report/images/flagey_logo.jpg"/>
<lines>1cm 3.0cm 20cm 3.0cm</lines>
<setFont name="Helvetica" size="15"/>
<drawCentredString x="105mm" y="2.2cm">Hotel des ventes Flagey</drawCentredString>
@@ -20,7 +20,6 @@
<drawCentredString x="105mm" y="1.6cm">Rue du Nid, 4 - B-1050 Bruxelles - Tel: 02/644.97.67</drawCentredString>
<drawCentredString x="105mm" y="1.0cm">Web: Flagey.com - Mail: info@flagey.com - Fax: 02.646.32.35</drawCentredString>
<fill color="(0.2,0.2,0.2)"/>
<stroke color="(0.2,0.2,0.2)"/>
@@ -30,8 +29,8 @@
<pageTemplate id="first">
<pageGraphics>
<!-- <image x="1.0cm" y="27.3cm" file="/home/tiny/terp/4.2/server/bin/addons/auction/report/images/flagey_head.png"/>-->
- <image x="1.0cm" y="27.3cm" file="addons/auction/report/images/flagey_logo.jpg"/>
<drawRightString x="19.0cm" y="27.6cm"> Vente antiquitée le <xsl:value-of select="date:day-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:day-in-month(catalog/AuctionDate1)"/>&#160;<xsl:value-of select="date:month-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:year(catalog/AuctionDate1)"/></drawRightString>-->
- <image x="1.0cm" y="26.1cm" file="flagey_logo.jpg"/>
<drawRightString x="19.0cm" y="26.6cm"> Vente antiquitée le <xsl:value-of select="date:day-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:day-in-month(catalog/AuctionDate1)"/>&#160;<xsl:value-of select="date:month-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:year(catalog/AuctionDate1)"/></drawRightString>
<lineMode width="1mm"/>
<setFont name="Helvetica" size="26"/>
<!-- <drawString x="10mm" y="27.8cm">Flagey.com</drawString>-->
@@ -39,7 +38,7 @@
<stroke color="#2b24b6"/>
<lineMode width="0.5mm"/>
<lines>1cm 1.6cm 20cm 1.6cm</lines>
<lines>1.0cm 27.3cm 20cm 27.3cm</lines>
<lines>1.0cm 26.1cm 20cm 26.1cm</lines>
<setFont name="Helvetica" size="12"/>
<drawString x="10mm" y="1.0cm">www.flagey.com</drawString>
@@ -47,7 +46,7 @@
<drawRightString x="200mm" y="1.0cm">info@flagey.com</drawRightString>
</pageGraphics>
<frame id="column" x1="1cm" y1="1.5cm" width="9.4cm" height="25.5cm"/>
<frame id="column" x1="10.8cm" y1="1.5cm" width="9.4cm" height="25.5cm"/>
<frame id="column" x1="14.8cm" y1="1.5cm" width="9.4cm" height="25.5cm"/>
</pageTemplate>
</template>
<stylesheet>
@@ -62,6 +61,7 @@
<paraStyle name="homehead" fontName="Helvetica" fontSize="12" alignment="center"/>
<paraStyle name="artist" fontName="Helvetica-Bold"/>
<paraStyle name="prodtitle" fontName="Helvetica-BoldOblique" fontSize="8"/>
<paraStyle name="P2" rightIndent="13.0" leftIndent="11.0" fontName="Times-Roman" alignment="RIGHT"/>
<blockTableStyle id="infos">
<blockValign value="TOP"/>
<blockTopPadding value="0"/>
@@ -92,11 +92,88 @@
<lineStyle kind="LINEBELOW" start="0,0" stop="-1,0"/>
</blockTableStyle>
</stylesheet>
<images>
<image name="flagey_logo.jpg">/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABjAO0DASIA
AhEBAxEB/8QAGwAAAwADAQEAAAAAAAAAAAAAAAUGAwQHAgH/xABHEAABAwMBAggKBggFBQAAAAAB
AAIDBAURBhIhBxMVMUFRU9EWNWFxc4GSoaKxFCIyN4KRIzM2QnSys8EkUnLw8TRjwtLh/8QAFQEB
AQAAAAAAAAAAAAAAAAAAAAH/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwDfptuW
RsLRtOPMt3k+q7P4gta1eM4fxfIqlyOtVSPk+q7P4gjk+q7P4gnmD1FeS4DcSAVEJeT6rs/iCOT6
rs/iCdbbesL0N/MgR8n1XZ/EEcn1XZ/EE7LgDgnevo38wygR8n1XZ/EEcn1XZ/EE4fMyN2y44PP5
uhewQRkIEnJ9V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9V2fx
BHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9
V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEMtHUQxPlfHhjGlzjkbgFO1FbJNJlri1o5gCre4+
LKr0L/kVz9VVLavGcP4vkU9qInva4xv2XbOP99SQ2rxnD+L5FUqiJe0W9131dU2Wa5V8UsLGPJjq
HbO9oPX5Up1Vq+osOo57HRwskjpogRLONt7ztNGST51Q6U++O6egj/kaudcIX3l3L0Q/qMQX9OL7
PTxyh1INtoP6kdy9VEd7MJE7Wys6qeV0L/URu9yb23xbT+jC9y1LYd7/AKrNrY2ienGUEdqa9S2O
0UDKGOeVtSXCaaqcXyRuAzsg9C13XSoq7XaauoqaiJ1bMIswSub0dWcKk1BRR11tqIywOa+LaYcf
vg7vcSpCphNPYtMxOGC2ux7kDHXl6qNLT02n6KSSRk0RmlnmcXPc4NLhvPQMBUum55KmxUssrtp7
mAkqH4Yv24of4N39Mqz0p+zdH6MIHSEIQCEIQCEIQCEIQCEIQCEIQCEIQCEIQCEIQa1x8WVXoX/I
rn66BcfFlV6F/wAiufoKW1eM4fxfIqkU3avGcP4vkVSIEWlPvkunoI/5GqH4S7a+DXdXVte2TjWh
mw3eW/Wacn8lcaU++O6egj/kauecIEjm8JdyOA4tiBZtb9k7bRn3oOo0FRBFaIZZpo4o2xjae9wA
CT6uuVKNK000EuTUVW2zoLm42cjyLzHarrWWyIPrmSMLQdiWIObzcymNbW+4fS6evlIFKGMpxEz7
MTmuG4Dzb/Wg6PRAPoIQ7eCwZ/JTOtY2RGwNY0NH0/mHmCp6D/oIP9A+Smtc/rLB/H/2CCf4Yv24
of4N39Mq00mM6cogOcxhRfDF+3FD/Bu/plWWli5umqMt+0IxhBryaqopp69lMJpo6Ehsr2ENbnOO
c9GV8gu1wq4+NpKBuyeZz3uJ+akdY03Iemm2e15ibVSmWqlkadpx6G7ucBM+Dqrqn004qnuEQIEe
3uJ8qCioqq7TXGOjm4lssoLo2O3E9G48xx5ltxXWNtxlt1Q+NtTE7ZIa7IKVahmNPqzSskbsOdNI
04PR9VRuuauWi4Ubi6JxbgNfu69to/8AIoOs9ZJAAGSTzAJUb9an2youBq3ilieYmFmAZngZOzno
HWtHUtVONB10sBIlfA0ZHPguAPuJUBq+F1to9MW6IkQChkmd1Oe5riT8h6kFxb77W3eIS0FJswk7
nuJPz/8Ai3YLxLyJJcpnwtZFJxTwMuIf5v7eRfdGRiPTlCAMfVCiLnVii4PtR8c4jj7oWQ56SCSc
fmPzQP7xqN9it8NVV1Tqmetn/wALHHsgxx9bsDeT1J5Zb/TXOzG4vkbFCwEyPccBuFz7Ttu8LaeS
nq5XB8Ibh2N4yBkeRMbpaS+7WnRFtLmwOLZqojnO/cD6t/rQWNzvtvoLPHcpqh+zMNqCFv1S5ucb
R58BLo7zcqimNVFSCOna0vJdvy0bz5eZR2uaSVmsJImyiSljfFBFEw54tjd2/wDJdKidDyUYg5uH
QFuB05bhBh5SfTQ0s9TsGmqRmOZhyAeoor66rp4Q6liZIXZILsuB6ubCSycVbeCo0F4nZT3BpMtP
G931x1HHlWvoHUJulGKeR2XNaHNPuI9RBQUtkj1BeI4qniqD6E77UkZdkDp6UnfqqB9ykpaWOpke
xxaASOg4ORhU2jKsWjUdXZZDimqRx9ODzDP2m+o5UZri2v0trptdC3FPVHjBjm2h9oesb/UgpZa6
ojoXVIg3gZ2SM49W5K7tq2329zYpRViQ4wWtDQ8nqBycJ0J2VdJFsOAbMMl3+VuMk+oZU22ihvup
zVyRgxU+5jSNw6h6hhA0guT7jY6uR8D4/wBC/G2OfcVJK+r2tZa6oNAA4l/N5ioFBS2rxnD+L5FU
imrV4zh/F8iqXOECLSn3x3T0Ef8AI1c64QfvLuXoh/UYuk6Yhki4VrtWyN2KYQR5ldub9hvSudcI
cDhrytrQQ6CVrWsc05ydtp/sg6pbfFtP6MJbqG2zV9tdTxtDgZhL68YTG2EG20+D+4FtoMNIx0dL
Ex3O1oCmNc/rLB/H/wBgq1S+sKaarmsTYI3SObXAkNGcbkE1wxftxQ/wbv6ZVParpTWXQ0VxqyeK
hiB2RzuJ5gFN8L0Rl1bS1UZa+KOmcxxac4OwRj81v1NukuvB7RU0W9zXxylv+YDII9+fUg9v1U6K
yQXS92+Bzq+bi6ClLMhrel7id5/5Xiw3G96ijfPTuZR0e0Q0RtA3epPOEHSxuWnLNPR7PGUDWF0Q
Izs9O5aOgZI2abZGXBro3FrgdxB8qDHVwC1ai0/9JDamWeoeBI4bxjZ6fWo/hE+825+jH9RiuL3B
U3LVum200D3wwyOe6QDdvI/9Ug4ULA+LWMlxhmjkFSA3Ya4ZGHAn5ILeGOOayRRyjaY+INLcZzkc
ykNaMgltNDE+mcKija6Jjg9rnBpyObPUUzu90rKGzWuOi2RUGaMS7+ZuObyc625dN3GhPGT2iS5M
k+s0seAGjqxhBg0pc4+RKaEyRRujAaXSPAA8uOf3KV4QXUl0raK22hjp6enc5+wxpxJI45LneTuV
U211ZcS3SE7fNMB/ZMLfQ1ccoHg5LTOP75cHD1ndhAt0Tp6Sy250lTvqZztPK29O0wPDLWSyjeaa
N0ZPVsAf2KaUVxgrNpjHASMOHMyDhYZY/oeoaG7xkNfF+jeTzOYTzeo/NByvU+3Bwi3TAHGcfHsO
cM7OSeb3Lo0FvvBhY4XeUZAO5IuErTvE6ikvtK5slPK1pkDTktcHA7/VlWVunZPboJGOBa5gOfUg
lbpoh93n+kV1Y2aTGNqRgJwsum9IQWSuM8U5P1cBgGBg79wVNPMx7Hjb2Ym/rZBzNHUOsnoCTW+o
luV7lnZltOzcAObqA9QAQbl9ZLDFBdKcf4igfxoxzln74/Lf6lQauttHq7RkVdxjWmJomY/qwMrU
c0OaQQCCMEHpCjdR3ar09wdXe3MLtmOpbHA7/tvBI+WEGlY7uyHTskH0hs0wHFsweZnOfWdw8yrL
DRfRbe0vH6ST6zj51yvQNplqrtHCc8VTjbm8sh3kercPUu0NAa0AcwQa9x8WVXoX/Irn66BcfFlV
6F/yK5+gpbV4zh/F8intTHI5pdGWbWNwe3ISK1eM4fxfIqkQSl5tt8u1vFEXwxQh21iLLM+fCmmc
HlwbKJOOJI58yuOV1BCBHbqW6U8kbZOJbEBghgwniEIPj27TSM4z0pVVsurOMbRGBoe0tL9jDh5j
0JshBzCTg9uMk5ldUEvyTkyuPP8A8qwtFurqaBtNUiMwhuMNT9CCTvml6utJfS187HEYwJCClVqs
eoLQ57YwyfaP2p8Ox7l0FCCcprTc5ZTU1dYWTluzlh6OrzKPu/B/c6q4mo4+Sf62WiSU7LfVz+9d
TQglLPpasjhH0o/S6p2Nlmdlu455+jm51q3vXurKS7T0tvqKZ8bHENaGuOyBu6AqKtra2nrnMpgf
r0UrY8dEg3+9vMprQNM10VZNPh9RxpB2t5Ayg0W6/wBebW98WeoMf3J/ZuEy9x7cd9pg6Bw2eMiY
7Iz5MKk4mPP2G/ksVQ2MN2GxB8j/AKrGAc5Qcms1xqaHWMoO22KWrIaD0tcM/kuvOY2WLZe0Oa4b
wVGXOihr9U26Kma0spGNa57R9rZGCfzVqBgAIJm8aWfWMJpamWI9DQ8haNvob5a4hAKaOdo6Xu3f
kMBWqEEybbdrnstrZmwwjmjjGAPMAn1HRw0UAhhbho962Fhq6qKio56uckRQxukdjnIAzgIMyRan
po6uy1sEjGua1rJW5/zB24e8rWst+uF4tFZeZ6WKioIv1LnEkyeQ968VF1juNrdIwbLpXAbOd4wP
77XuQYtAWnk+ymV4/SzOLnEquWrboBT0EUYGMNC2kGtcfFlV6F/yK5+ugXHxZVehf8iufoKW1eM4
fxfIqkUhDcIbdUxzzbRAz9VoyTuIW/4X2/san2W96CgQp/wvt/Y1Pst70eF9v7Gp9lvegoEKf8L7
f2NT7Le9Hhfb+xqfZb3oKBCn/C+39jU+y3vR4X2/san2W96CgQp/wvt/Y1Pst70eF9v7Gp9lvego
EKf8L7f2NT7Le9Hhfb+xqfZb3oKBCn/C+39jU+y3vR4X2/san2W96BzPC5+y+KQxzM3tdjKknUlx
tF0lq2wlzZDl5iHP5x/s+VNPC+39jU+y3vQdX2888NT7Le9B4Go4tnEgqtrqZCB7z3LE64V1dmKh
o3xNeMOlkOXEeU9XkGFl8KrWTk00+f8AQ3vXoattwG6GpH4G96DdtNobQNMjztzv+05NFP8Ahfb+
xqfZb3o8L7f2NT7Le9BQIU/4X2/san2W96PC+39jU+y3vQUCwVlO2qpJIHAOa9paWu5iCk3hfb+x
qfZb3o8L7f2NT7Le9BK63F/koobTb4xSWqNgbxUbS456Tkc/uX3RtnuU0xkrWPZCHbX1xguPXjo8
3Qqg6ttzueCpPnY3vQNXW5owIakfgb3oKADAwF9U/wCF9v7Gp9lvejwvt/Y1Pst70De4+LKr0L/k
Vz9UdXqqhnpJoWxVAdJG5oJaMZIx1qbBBGRzIMFQ90lRIXHJDiPUsaEKqEIQgEIQgEIQgEIQgEIQ
gEIQgEIQgEIQgEIQgEIQgEIQgEIQgEIQgF7jcQCAUIQf/9k=
</image>
</images>
<story>
<para style="P2">
<font color="white"> </font>
</para>
<!--<setNextTemplate name="others"/>-->
<!-- <pageBreak/>-->
<spacer length="0.8cm"/>
<xsl:apply-templates select="catalog/products"/>
</story>
</document>
@@ -0,0 +1,96 @@
<?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:variable name="signature" select="//corporate-header/user/signature"/>
<xsl:variable name="title">Open ERP Report</xsl:variable>
<xsl:variable name="leftMargin">1cm</xsl:variable>
<xsl:variable name="rightMargin">1cm</xsl:variable>
<xsl:variable name="topMargin">1cm</xsl:variable>
<xsl:variable name="bottomMargin">1cm</xsl:variable>
<xsl:variable name="pageSize">21cm,29.7cm</xsl:variable>
<xsl:variable name="page_format">a4_letter</xsl:variable>
<xsl:template name="first_page_graphics_corporation">
<!--logo-->
<setFont name="Helvetica" size="14"/>
<fill color="black"/>
<stroke color="black"/>
<drawString x="1cm" y="27.6cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
<lines>1cm 28.4cm 20cm 28.4cm</lines>
<lines>1cm 25.4cm 7cm 25.4cm</lines>
<setFont name="Helvetica" size="10"/>
<drawRightString x="20cm" y="28.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
<drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString>
<drawString x="1cm" y="26.5cm">
<xsl:value-of select="//corporate-header/corporation/address/zip"/>
<xsl:text> </xsl:text>
<xsl:value-of select="//corporate-header/corporation/address/city"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="//corporate-header/corporation/address/country"/>
</drawString>
<drawString x="1cm" y="26cm">Phone:</drawString>
<drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString>
<drawString x="1cm" y="25.5cm">Mail:</drawString>
<drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString>
<!--page bottom-->
<lines>1.5cm 2.2cm 19.9cm 2.2cm</lines>
<drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
<drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
<drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>
</xsl:template>
<xsl:template name="other_pages_graphics_corporation">
<!--logo-->
<setFont name="Helvetica" size="14"/>
<fill color="black"/>
<stroke color="black"/>
<drawString x="1cm" y="27.6cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
<lines>1cm 25.4cm 20cm 25.4cm</lines>
<!-- <lines>1cm 25.7cm 7cm 25.7cm</lines>-->
<setFont name="Helvetica" size="10"/>
<drawRightString x="1cm" y="27.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
<drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString>
<drawString x="1cm" y="26.5cm">
<xsl:value-of select="//corporate-header/corporation/address/zip"/>
<xsl:text> </xsl:text>
<xsl:value-of select="//corporate-header/corporation/address/city"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="//corporate-header/corporation/address/country"/>
</drawString>
<drawString x="1cm" y="26cm">Phone:</drawString>
<drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString>
<drawString x="1cm" y="25.5cm">Mail:</drawString>
<drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString>
<!--page bottom-->
<lines>1.5cm 1.2cm 19.9cm 1.2cm</lines>
<drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
<drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
<!-- <drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>-->
</xsl:template>
<xsl:template name="first_page_frames">
<xsl:if test="$page_format='a4_normal'">
<frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22.0cm"/>
</xsl:if>
<xsl:if test="$page_format='a4_letter'">
<frame id="address" x1="11cm" y1="21.5cm" width="6cm" height="4cm"/>
<frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="17.5cm"/>
</xsl:if>
</xsl:template>
<xsl:template name="other_pages_frames">
<frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22cm"/>
</xsl:template>
</xsl:stylesheet>
+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"/>
+395
View File
@@ -0,0 +1,395 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx import DateTime
from osv import fields, osv, orm
from tools import config
from tools.translate import _
import ir
import netsvc
import os
import time
import tools
def _type_get(self, cr, uid, context=None):
if not context:
context = {}
obj = self.pool.get('auction.lot.category')
ids = obj.search(cr, uid, [])
res = obj.read(cr, uid, ids, ['name'], context)
res = [(r['name'], r['name']) for r in res]
return res
class report_auction(osv.osv):
"""Auction Report"""
_name = "report.auction"
_description = "Auction's Summary"
_auto = False
_columns = {
'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'buyer_login': fields.char('Buyer Login', size=64, readonly=True, select=1),
'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),
'lot_type': fields.selection(_type_get, 'Object category', size=64),
'avg_price':fields.float('Avg Adj.', 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),
'net_revenue':fields.float('Net Revenue', readonly=True),
'net_margin':fields.float('Net Margin', readonly=True),
'avg_estimation':fields.float('Avg estimation', readonly=True),
'user_id':fields.many2one('res.users', 'User', select=1),
'state': fields.selection((('draft', 'Draft'), ('unsold', 'Unsold'), ('sold', 'Sold')), 'State', readonly=True, select=1),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_auction')
cr.execute('''
create or replace view report_auction as (
select
min(al.id) as id,
al.ach_login as "buyer_login",
ad.auction1 as date,
al.state,
al.create_uid as user_id,
to_char(ad.auction1, 'YYYY') as year,
to_char(ad.auction1, 'MM') as month,
to_char(ad.auction1, 'YYYY-MM-DD') as day,
al.ach_uid as "buyer",
al.lot_type as lot_type,
ade.partner_id as seller,
ad.id as auction,
count(al.id) as "object",
sum(al.obj_price) as "total_price",
(sum(al.obj_price)/count(al.id)) as "avg_price",
sum(al.gross_revenue) as gross_revenue,
sum(al.net_revenue) as net_revenue,
avg(al.net_margin) as net_margin,
sum(al.lot_est1+al.lot_est2)/2 as avg_estimation
from
auction_lots al,
auction_dates ad,
auction_deposit ade
where
ad.id=al.auction_id and ade.id=al.bord_vnd_id
group by
ad.auction1,
al.ach_uid,
ad.id,
al.ach_login,
ade.partner_id,
al.state,
al.create_uid,
al.lot_type
)
''')
report_auction()
#==========================
#Others Report for Dashboard (Employee & Manager)
#==========================
class report_auction_object_date(osv.osv):
_name = "report.auction.object.date"
_description = "Objects per day"
_auto = False
_columns = {
'obj_num': fields.integer('# of Objects'),
'name': fields.date('Created date', select=2),
'month': fields.date('Month', select=1),
'user_id':fields.many2one('res.users', 'User',select=1),
}
#l.create_uid as user,
def init(self, cr):
cr.execute("""create or replace view report_auction_object_date as
(select
min(l.id) as id,
to_char(l.create_date, 'YYYY-MM-DD') as name,
to_char(l.create_date, 'YYYY-MM-01') as month,
count(l.obj_num) as obj_num,
l.create_uid as user_id
from
auction_lots l
group by
to_char(l.create_date, 'YYYY-MM-DD'),
to_char(l.create_date, 'YYYY-MM-01'),
l.create_uid
)
""")
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"
_auto = False
_columns = {
'name': fields.many2one('auction.dates','Auction date',readonly=True,select=1),
'state': fields.selection((('draft','Draft'),('close','Closed')),'Status', select=1),
'adj_total': fields.float('Total Adjudication'),
'date': fields.date('Date', readonly=True,select=1),
'user_id':fields.many2one('res.users', 'User',select=1)
}
def init(self, cr):
cr.execute("""
create or replace view report_auction_adjudication as (
select
l.id as id,
l.id as name,
sum(m.obj_price) as adj_total,
to_char(l.create_date, 'YYYY-MM-01') as date,
l.create_uid as user_id,
l.state
from
auction_dates l ,auction_lots m
where
m.auction_id=l.id
group by
l.id,l.state,l.name,l.create_uid,to_char(l.create_date, 'YYYY-MM-01')
)
""")
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),
'date': fields.date('Create Date', required=True),
'gross_revenue':fields.float('Gross revenue',readonly=True, select=True),
'net_revenue':fields.float('Net revenue',readonly=True, select=True),
'obj_margin':fields.float('Net margin', readonly=True, select=True),
'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),
}
def init(self, cr):
cr.execute('''create or replace view report_object_encoded_manager as
(select
min(al.id) as id,
to_char(al.create_date, 'YYYY-MM-DD') as date,
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,
SUM(al.gross_revenue) as "gross_revenue",
SUM(al.net_revenue) as "net_revenue",
SUM(al.net_revenue)/count(al.id) as "obj_margin",
COUNT(al.product_id) as obj_num,
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)
''')
report_object_encoded_manager()
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()
@@ -0,0 +1,668 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_report_auction_tree">
<field name="name">Auction's Summary</field>
<field name="model">report.auction</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Auction Summary tree view">
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="auction" select="1" invisible="1"/>
<field name="buyer_login" select="1" invisible="1"/>
<field name="buyer" select="1" invisible="1"/>
<field name="seller" invisible="1"/>
<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_price" select="1"/>
<field name="gross_revenue" />
<field name="net_revenue" />
<field name="net_margin" />
<field name="total_price" select="1"/>
</tree>
</field>
</record>
<record id="view_report_auction_search" model="ir.ui.view">
<field name="name">report.auction.search</field>
<field name="model">report.auction</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Auction Summary">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Auction in last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Auction in last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Auction during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-dolar"
string="Sold"
domain="[('state','=', 'sold')]"/>
<separator orientation="vertical"/>
<field name="auction"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Auction"
help="My Auction"
domain="[('user_id','=',uid)]"/>
</field>
<field name="object"/>
<field name="state"/>
<field name="lot_type"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="User" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
<filter string="Buyer" icon="terp-personal" name="buyer" context="{'group_by':'buyer'}"/>
<filter string="Seller" icon="terp-personal" name="seller" context="{'group_by':'seller'}"/>
<separator orientation="vertical"/>
<filter string="Auction" icon="terp-project" name="auction" context="{'group_by':'auction'}"/>
<separator orientation="vertical" />
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Type"
icon="terp-stock_symbol-selection"
help="Object Category" domain="[]"
context="{'group_by':'lot_type'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="view_report_auction_graph" model="ir.ui.view">
<field name="name">report.auction.graph</field>
<field name="model">report.auction</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Auction's Summary" type="bar">
<field name="auction"/>
<field name="total_price" operator="+"/>
<field name="avg_estimation" operator="+"/>
<field name="avg_price" operator="+"/>
<field name="gross_revenue" operator="+"/>
<field name="net_revenue" operator="+"/>
<field name="net_margin" operator="+"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction">
<field name="name">Auction's Summary</field>
<field name="res_model">report.auction</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<!-- <field name="domain">[('date','ilike',time.strftime('%Y-%m'))]</field>-->
<field name="search_view_id" ref="view_report_auction_search"/>
<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"/>
<!--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
==============================
<record model="ir.ui.view" id="view_report_auction_object_date_tree">
<field name="name">Objects by date</field>
<field name="model">report.auction.object.date</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Objects per Day">
<field name="month" select="1" />
<field name="user_id" select="1"/>
<field name="obj_num"/>
<field name="name" />
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_object_date_form">
<field name="name">Object date</field>
<field name="model">report.auction.object.date</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Objects per Day">
<field name="user_id" />
<field name="name" select="1"/>
<field name="obj_num" />
<field name="month" select="1"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_object_date_graph">
<field name="name">report.auction.object.date.graph</field>
<field name="model">report.auction.object.date</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Objects per day" type="bar">
<field name="name" select="1"/>
<field name="obj_num" operator="+"/>
<field name="user_id" group="True"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_object_date_tree_my">
<field name="res_model">report.auction.object.date</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','=',uid),('month','=',time.strftime('%Y-%m-01'))]</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_object_date_tree">
<field name="res_model">report.auction.object.date</field>
<field name="view_type">form</field>
<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
==============================
<record model="ir.ui.view" id="view_report_auction_adjudication_tree">
<field name="name">report.auction.adjudication.tree</field>
<field name="model">report.auction.adjudication</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Total adjudication">
<field name="name" select="1"/>
<field name="adj_total" select="1"/>
<field name="state" select="1"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_adjudication_graph">
<field name="name">report.auction.adjudication.graph</field>
<field name="model">report.auction.adjudication</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Total adjudication" type="bar">
<field name="name" select="1"/>
<field name="adj_total" select="1" />
<field name="user_id" group="True"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_adjudication_tree">
<field name="res_model">report.auction.adjudication</field>
<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>
<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_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"/>
<field name="adj" sum="Total adj."/>
<field name="obj_margin" />
<field name="net_revenue" sum="Total net rev."/>
<field name="gross_revenue" sum="Total gross rev."/>
<field name="date" select="1"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_object_encoded_manager_graph">
<field name="name">report.object.encoded.graph</field>
<field name="model">report.object.encoded.manager</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Object statistic" type="bar">
<field name="user_id" select="1"/>
<field name="obj_ret" operator="+" />
<field name="obj_num" operator="+" />
<field name="obj_margin" operator="+" />
<field name="net_revenue" operator="+" />
<field name="gross_revenue" operator="+" />
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_object_encoded_manager_tree">
<field name="res_model">report.object.encoded.manager</field>
<field name="view_type">form</field>
<field name="view_mode">tree</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>
+70
View File
@@ -0,0 +1,70 @@
<?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:template name="first_page_graphics_report"/>
<xsl:template name="other_pages_graphics_report"/>
<!--
<xsl:template name="first_page_graphics_corporation"/>
<xsl:template name="other_pages_graphics_corporation"/>
<xsl:template name="first_page_frames"/>
<xsl:template name="other_pages_frames"/>
-->
<xsl:template name="rml">
<document>
<template author="Generated by OpenERP, Fabien Pinckaers">
<xsl:attribute name="pageSize">
<xsl:value-of select="$pageSize"/>
</xsl:attribute>
<xsl:attribute name="leftMargin">
<xsl:value-of select="$leftMargin"/>
</xsl:attribute>
<xsl:attribute name="rightMargin">
<xsl:value-of select="$rightMargin"/>
</xsl:attribute>
<xsl:attribute name="topMargin">
<xsl:value-of select="$topMargin"/>
</xsl:attribute>
<xsl:attribute name="bottomMargin">
<xsl:value-of select="$bottomMargin"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="$title"/>
</xsl:attribute>
<pageTemplate id="first_page">
<pageGraphics>
<xsl:call-template name="first_page_graphics_corporation"/>
<xsl:call-template name="first_page_graphics_report"/>
</pageGraphics>
<xsl:call-template name="first_page_frames"/>
</pageTemplate>
<pageTemplate id="other_pages">
<pageGraphics>
<xsl:call-template name="other_pages_graphics_corporation"/>
<xsl:call-template name="other_pages_graphics_report"/>
</pageGraphics>
<xsl:call-template name="other_pages_frames"/>
</pageTemplate>
</template>
<stylesheet>
<xsl:call-template name="stylesheet"/>
</stylesheet>
<story>
<xsl:call-template name="story"/>
</story>
</document>
</xsl:template>
</xsl:stylesheet>
+2 -6
View File
@@ -8,12 +8,7 @@
"access_auction_bid","auction.bid","model_auction_bid","base.group_user",1,1,1,1
"access_auction_bid_line","auction.bid.line","model_auction_bid_line","base.group_user",1,1,1,1
"access_auction_lot_history","auction.lot.history","model_auction_lot_history","base.group_user",1,1,1,1
"access_report_buyer_auction","report.buyer.auction","model_report_buyer_auction","base.group_user",1,0,0,0
"access_report_buyer_auction2","report.buyer.auction2","model_report_buyer_auction2","base.group_user",1,0,0,0
"access_report_seller_auction","report.seller.auction","model_report_seller_auction","base.group_user",1,0,0,0
"access_report_seller_auction2","report.seller.auction2","model_report_seller_auction2","base.group_user",1,0,0,0
"access_report_auction_view","report.auction.view","model_report_auction_view","base.group_user",1,0,0,0
"access_report_auction_view2","report.auction.view2","model_report_auction_view2","base.group_user",1,0,0,0
"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
@@ -22,3 +17,4 @@
"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
8 access_auction_bid auction.bid model_auction_bid base.group_user 1 1 1 1
9 access_auction_bid_line auction.bid.line model_auction_bid_line base.group_user 1 1 1 1
10 access_auction_lot_history auction.lot.history model_auction_lot_history base.group_user 1 1 1 1
11 access_report_buyer_auction access_report_auction report.buyer.auction report.auction model_report_buyer_auction model_report_auction base.group_user 1 0 0 0
access_report_buyer_auction2 report.buyer.auction2 model_report_buyer_auction2 base.group_user 1 0 0 0
access_report_seller_auction report.seller.auction model_report_seller_auction base.group_user 1 0 0 0
access_report_seller_auction2 report.seller.auction2 model_report_seller_auction2 base.group_user 1 0 0 0
access_report_auction_view report.auction.view model_report_auction_view base.group_user 1 0 0 0
access_report_auction_view2 report.auction.view2 model_report_auction_view2 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
13 access_report_auction_estimation_adj_category report.auction.estimation.adj.category model_report_auction_estimation_adj_category base.group_user 1 0 0 0
14 access_report_auction_adjudication report.auction.adjudication model_report_auction_adjudication base.group_user 1 0 0 0
17 access_report_object_encoded report.object.encoded model_report_object_encoded base.group_user 1 0 0 0
18 access_report_object_encoded_manager report.object.encoded.manager model_report_object_encoded_manager base.group_user 1 0 0 0
19 access_report_unclassified_objects report.unclassified.objects model_report_unclassified_objects base.group_user 1 0 0 0
20 access_aie_category aie.category model_aie_category base.group_user 1 0 0 0
+38 -56
View File
@@ -18,12 +18,37 @@
warranty: 0.0
weight: 0.0
weight_net: 0.0
-
I create a new artist for an object.
-
!record {model: auction.artists, id: auction_artists_vincentvangogh0}:
birth_death_dates: 1853-1900
name: Vincent van Gogh
-
I modifying a expenses journal record for analytic journal.
-
!record {model: account.journal, id: account.expenses_journal}:
analytic_journal_id: account.exp
-
I modifying a sales journal record for analytic journal.
-
!record {model: account.journal, id: account.sales_journal}:
analytic_journal_id: account.cose_journal_sale
-
I'm creating new partner "Mark Johnson" with him email "info@mycustomer.com".
-
!record {model: res.partner, id: res_partner_markjohnson0}:
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
-
Now I want to associate an object with the auction so for that I create an auction "Antique furniture exhibition"
-
@@ -37,7 +62,8 @@
expo2: '2010-05-19'
journal_id: account.expenses_journal
journal_seller_id: account.sales_journal
name: Antique furniture exhibition
name: Antique furniture exhibition
-
An object is being deposited for an auction,I create a seller's deposit record.
-
@@ -45,12 +71,12 @@
date_dep: '2010-05-18'
method: keep
name: AD/006
partner_id: base.res_partner_4
partner_id: base.res_partner_9
-
I create a new object wooden-chair which is to be auctioned.
-
!record {model: auction.lots, id: auction_lots_woodenchair0}:
ach_uid: base.res_partner_2
ach_uid: res_partner_markjohnson0
artist_id: auction_artists_vincentvangogh0
auction_id: auction_dates_antiquefurnitureexhibition0
bord_vnd_id: auction_deposit_ad0
@@ -72,7 +98,7 @@
auction_id: auction_dates_antiquefurnitureexhibition0
contact_tel: (+32)2 211 34 83
name: bid/001
partner_id: auction.partner_record1
partner_id: res_partner_markjohnson0
-
I create a bid line.
-
@@ -87,7 +113,7 @@
!record {model: auction.bid, id: auction_bid_bid1}:
auction_id: auction_dates_antiquefurnitureexhibition0
name: bid/002
partner_id: base.res_partner_2
partner_id: res_partner_markjohnson0
-
I create a bid line.
-
@@ -104,62 +130,16 @@
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 Seller's Summary.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
auc_deposit_obj=self.pool.get('auction.deposit')
rep_sell_obj = self.pool.get('report.seller.auction')
ids =rep_sell_obj.search(cr, uid, [('auction', '=', auc_id.auction_id.id),('seller', '=',auc_id.bord_vnd_id.partner_id.id)])
assert ids, _('No record found!')
-
I check that a record gets created in the Seller's Revenues.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
auc_deposit_obj=self.pool.get('auction.deposit')
rep_sell_obj = self.pool.get('report.seller.auction2')
ids =rep_sell_obj.search(cr, uid, [('auction', '=', auc_id.auction_id.id),('seller', '=',auc_id.bord_vnd_id.partner_id.id)])
assert ids, _('No record found!')
-
I check that a record gets created in the Buyer's Summary.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id1=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
rep_buy_obj1 = self.pool.get('report.buyer.auction')
ids1=rep_buy_obj1.search(cr, uid, [('auction', '=', auc_id1.auction_id.id),('buyer', '=',auc_id1.ach_uid.id)])
assert ids1, _('No record found!')
-
I check that a record gets created in the Buyer's Revenue.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id1=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
rep_buy_obj1 = self.pool.get('report.buyer.auction2')
ids1=rep_buy_obj1.search(cr, uid, [('auction', '=', auc_id1.auction_id.id),('buyer', '=',auc_id1.ach_uid.id)])
assert ids1, _('No record found!')
-
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.view')
ids2=rep_auc_obj1.search(cr, uid, [('auction_id', '=', auc_id2.auction_id.id)])
assert ids2, _('No record found!')
-
I check that a record gets created in the Auction's Revenues.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id3=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
rep_auc_obj1 = self.pool.get('report.auction.view2')
ids3=rep_auc_obj1.search(cr, uid, [('auction', '=', auc_id3.auction_id.id)])
assert ids3, _('No record found!')
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.
-
@@ -174,6 +154,7 @@
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.
-
@@ -189,7 +170,7 @@
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
assert(auc_id.state == 'taken_away'), _('State not changed!')
-
I click on the "Close + Create all invoices" button
I click on the "Create all invoices" button
-
!python {model: auction.dates}: |
self.close(cr, uid, [ref("auction.auction_dates_antiquefurnitureexhibition0")],
@@ -202,3 +183,4 @@
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!')
+1 -56
View File
@@ -87,62 +87,7 @@
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
assert(auc_id.ach_uid), _('Buyer not assigned!')
-
I mark that a seller has been paid by using the "Mark as paid for seller" wizard.
-
!record {model: auction.payer.sel, id: auction_payer_sel_0}:
{}
-
I click on the "Pay" button.
-
!python {model: auction.payer.sel}: |
self.payer_sel(cr, uid, [ref("auction_payer_sel_0")], {"lang": "en_US", "tz":
False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")], "active_id": ref("auction_lots_painting0")})
-
I check that the Seller paid field is set to True.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
assert(auc_id.paid_vnd == True), _('Seller paid is not marked!')
-
I use the "Mark as taken away" wizard to indicate that an object is taken away.
-
!record {model: auction.lots.able, id: auction_lots_able_0}:
{}
-
Then I click on the "Able Taken away" wizard.
-
!python {model: auction.lots.able}: |
self.confirm_able(cr, uid, [ref("auction_lots_able_0")], {"lang":"en_US", "tz":
False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
"active_id": ref("auction_lots_painting0")})
-
I check that Taken away field is set to True.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
assert(auc_id.ach_emp == True), _('Taken away is not marked!')
-
I use the "Unmark as taken away" wizard to unmark the Taken Away field.
-
!record {model: auction.lots.enable, id: auction_lots_enable_0}:
confirm_en: 0.0
-
Then I click on the "Enable Taken away" button.
-
!python {model: auction.lots.enable}: |
self.confirm_enable(cr, uid, [ref("auction_lots_enable_0")], {"lang": "en_US",
"tz": False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
"active_id": ref("auction_lots_painting0"),})
-
I check that Taken away field is set to False.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
assert(auc_id.ach_emp == False), _('Taken away is marked!')
-
I create statement lines for an object's payment by using the "Pay objects of the buyer" wizard
-
+1 -5
View File
@@ -29,12 +29,8 @@ import auction_pay_buy
import auction_payer_sel
import auction_lots_sms_send
import auction_catalog_flagey_report
#import auction_lots_cancel
#import auction_transfer_unsold_object
#import auction_aie_send
#import auction_aie_send_result
import auction_lots_buyer_map
#import auction_lots_numerotate
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -11,11 +11,13 @@
<field name="arch" type="xml">
<form string="Catalog Flagey Report">
<label string="Print Auction Catalog Flagey Report..."/>
<group col="2" colspan="4">
<separator colspan="4" />
<group col="4" colspan="4">
<label string=" " colspan="2"/>
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="print_report" string="Ok"
colspan="1" type="object" icon="gtk-ok" />
<button name="print_report" string="Print"
colspan="1" type="object" icon="gtk-print" />
</group>
</form>
</field>
@@ -26,7 +28,7 @@
src_model="auction.dates"
view_mode="form"
target="new"
key2="client_action_multi"
key2="client_print_multi"
id="action_auction_catalog_flagey_wizard"/>
</data>
</openerp>
@@ -28,22 +28,14 @@ import tools
import wizard
class auction_lots_auction_move(osv.osv_memory):
"""Auction Move"""
_name = "auction.lots.auction.move"
_description = "Auction move "
_description = __doc__
_columns= {
'auction_id':fields.many2one('auction.dates', 'Auction Date', required=True),
}
# def _top(self, cr, uid, ids, context={}):
# refs = self.pool.get('auction.lots')
# rec_ids = refs.browse(cr, uid, context['active_ids'])
# for rec in rec_ids:
# if not rec.auction_id:
# raise osv.except_osv('Error !', 'You can not move a lot that has no auction date')
# return {}
def auction_move_set(self, cr, uid, ids, context={}):
def auction_move_set(self, cr, uid, ids, context=None):
"""
This Function update auction date on auction lots to given auction date.
erase the auction lots's object adjudication price and its buyer and change state to draft.
@@ -52,13 +44,14 @@ class auction_lots_auction_move(osv.osv_memory):
@param uid: the current user’s ID for security checks,
@param ids: List of auction lots auction move’s IDs.
"""
refs = self.pool.get('auction.lots')
if not context:
context={}
auction_bid_line_obj = self.pool.get('auction.bid_line')
auction_lot_history_obj = self.pool.get('auction.lot.history')
auction_lots_obj = self.pool.get('auction.lots')
rec_ids = refs.browse(cr, uid, context['active_ids'])
for datas in self.read(cr, uid, ids):
if not (datas['auction_id'] and len(context['active_ids'])) :
rec_ids = auction_lots_obj.browse(cr, uid, context.get('active_ids', []))
for current in self.browse(cr, uid, ids, context):
if not (current.auction_id and len(context.get('active_ids', []))):
return {}
# line_ids = auction_bid_line_obj.search(cr, uid, [('lot_id', 'in', context['active_ids'])])
@@ -70,7 +63,7 @@ class auction_lots_auction_move(osv.osv_memory):
'price': rec.obj_ret
})
up_auction = auction_lots_obj.write(cr, uid, [rec.id], {
'auction_id':datas['auction_id'],
'auction_id': current.auction_id.id,
'obj_ret': None,
'obj_price': None,
'ach_login': None,
@@ -7,14 +7,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Change Auction Date">
<group colspan="4" >
<label string="Warning, this will erase the object adjudication price and its buyer !" colspan="2"/>
<newline/>
<field name="auction_id"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<label string="Warning, this will erase the object adjudication price and its buyer!" colspan="4"/>
<newline/>
<separator string="" colspan="4"/>
<field name="auction_id"/>
<separator string="" colspan="4" />
<group colspan="4" col="4">
<label string=" " colspan="2"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-redo" string="Move to Auction date" name="auction_move_set" type="object"/>
</group>
</form>
+24 -20
View File
@@ -26,7 +26,6 @@ from osv import osv,fields
class wiz_auc_lots_buyer_map(osv.osv_memory):
_name = 'auction.lots.buyer_map'
_description = 'Map Buyer'
_columns = {
'ach_login': fields.char('Buyer Username', size=64, required=True),
'ach_uid': fields.many2one('res.partner','Buyer', required=True),
@@ -42,19 +41,17 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
ids = context and context.get('active_ids',False) or False
assert ids, _('Active IDs not Found')
res = super(wiz_auc_lots_buyer_map,self).default_get(cr, uid, fields, context)
cr.execute('select id from auction_lots where (ach_uid is null and ach_login is not null) ')
v_ids = [x[0] for x in cr.fetchall()]
for rec in self.pool.get('auction.lots').browse(cr, uid, v_ids, context):
auction_lots_obj = self.pool.get('auction.lots')
lots_ids = auction_lots_obj.search(cr, uid, [('ach_uid', '=', ''), ('ach_login', '!=', '')])
for rec in auction_lots_obj.browse(cr, uid, lots_ids, context):
if (not rec.ach_uid or not rec.ach_login):
res.update(self._start(cr, uid, ids, context))
return res
res.update(self._start(cr, uid, ids, context))
res.update(self._start(cr, uid, context.get('active_ids', []), context))
return res
res.update(self._start(cr, uid, context.get('active_ids', []), context))
return res
def _start(self, cr, uid, ids, context):
def _start(self, cr, uid, ids, context=None):
"""
Returns login if already there in the selected record.
@param self: The object pointer.
@@ -64,6 +61,8 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param context: A standard dictionary
@return: login field from current record.
"""
if not context:
context={}
lots_obj = self.pool.get('auction.lots')
for rec in lots_obj.browse(cr, uid, ids, context):
if (len(ids)==1) and (not rec.ach_uid and not rec.ach_login):
@@ -72,7 +71,7 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
return {'ach_login': rec.ach_login}
return {}
def buyer_map_set(self, cr, uid, ids, context):
def buyer_map_set(self, cr, uid, ids, context=None):
"""
To map the buyer and login name.
@param self: The object pointer.
@@ -80,16 +79,16 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param uid: ID of the user currently logged in
@param ids: List of ids
@param context: A standard dictionary
@return:
"""
rec_ids = context and context.get('active_ids',False) or False
if not context:
context={}
rec_ids = context and context.get('active_ids',[]) or []
assert rec_ids, _('Active IDs not Found')
datas = self.read(cr, uid, ids[0], ['ach_login','ach_uid'])
lots_obj = self.pool.get('auction.lots')
recs = lots_obj.browse(cr, uid, rec_ids, context)
for rec in recs:
if rec.ach_login==datas['ach_login']:
lots_obj.write(cr, uid, [rec.id], {'ach_uid': datas['ach_uid']}, context=context)
for current in self.browse(cr, uid, ids):
for lots in lots_obj.browse(cr, uid, rec_ids, context):
if lots.ach_login == current.ach_login:
lots_obj.write(cr, uid, [lots.id], {'ach_uid': current.ach_uid.id}, context=context)
return {}
def fields_view_get(self, cr, uid, view_id=None, view_type='form',
@@ -102,8 +101,12 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param context: A standard dictionary
@return: New arch of view.
"""
record_ids = context and context.get('active_ids', False) or False
if not context:
context={}
record_ids = context and context.get('active_ids', []) or []
res = super(wiz_auc_lots_buyer_map, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
if context.get('active_model','') != 'auction.lots':
return res
lots_obj = self.pool.get('auction.lots')
if record_ids:
try:
@@ -111,9 +114,10 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
if lots.ach_uid:
res['arch'] = """
<form title="Mapping Result">
<group col="2" colspan="2">
<group col="2" colspan="4">
<label string="All objects are assigned to buyers !"/>
<newline/>
<separator string="" colspan="4"/>
<button icon='gtk-cancel' special="cancel"
string="Done" />
</group>
@@ -10,15 +10,17 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Buyer Map" >
<separator string="Map " colspan="4"/>
<field name="ach_login" colspan="4"/>
<newline/>
<field name="ach_uid" colspan="4"/>
<separator colspan="4"/>
<group col="4" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Exit" />
<button icon='gtk-close' special="cancel"
string="Close" />
<button name="buyer_map_set" string="Update"
colspan="2" type="object" icon="gtk-go-forward" />
type="object" icon="gtk-go-forward" />
</group>
</form>
</field>
+4 -3
View File
@@ -29,7 +29,7 @@ class auction_lots_cancel(osv.osv):
_name = 'auction.lots.cancel'
_description = 'To cancel auction lots.'
def cancel(self, cr, uid, ids, context):
def cancel(self, cr, uid, ids, context=None):
"""
To cancel the auction lot
@@ -40,10 +40,11 @@ class auction_lots_cancel(osv.osv):
@param context: A standard dictionary
@return:
"""
if not context:
context={}
lots_obj = self.pool.get('auction.lots')
invoice_obj = self.pool.get('account.invoice')
lot = lots_obj.browse(cr, uid, context['active_id'], context)
lot = lots_obj.browse(cr, uid, context.get('active_id', False), context)
if lot.ach_inv_id:
supplier_refund_inv_id = invoice_obj.refund(cr, uid, [lot.ach_inv_id.id])
if lot.sel_inv_id:
@@ -1,27 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="name_form" model="ir.ui.view">
<field name="name">auction.lots.cancel.form</field>
<field name="model">auction.lots.cancel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cancel Payment">
<label string="Are you sure you want to refund this invoice ?"/>
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="cancel" string="Cancel Payment"
colspan="1" type="object" icon="gtk-ok" />
</form>
</field>
</record>
<act_window name="Cancel ittttttt"
res_model="auction.lots.cancel"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_cancel"/>
</data>
<data>
<record id="name_form" model="ir.ui.view">
<field name="name">auction.lots.cancel.form</field>
<field name="model">auction.lots.cancel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cancel Payment">
<label string="Are you sure you want to refund this invoice ?"/>
<button icon='gtk-close' special="cancel"
string="Close" />
<button name="cancel" string="Cancel Payment" colspan="1" type="object" icon="gtk-ok" />
</form>
</field>
</record>
<act_window name="Cancel"
res_model="auction.lots.cancel"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_cancel"/>
</data>
</openerp>
@@ -7,11 +7,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Confirm">
<group colspan="4" >
<separator string="Confirmation enable taken away" colspan="4"/>
<newline/>
</group>
<separator string="" colspan="4" />
<separator string="Confirmation Enable Taken away" colspan="4"/>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-goto-last" string="Enable Taken away" name="confirm_enable" type="object"/>
@@ -20,7 +16,6 @@
</field>
</record>
<act_window name="Unmark as taken away"
res_model="auction.lots.enable"
src_model="auction.lots"
@@ -28,7 +23,6 @@
target="new"
key2="client_action_multi"
id="action_auction_lots_enable"/>
</data>
</openerp>
@@ -34,14 +34,13 @@ class auction_lots_make_invoice(osv.osv_memory):
'amount': fields.float('Invoiced Amount', required =True, readonly=True),
'objects':fields.integer('# of objects', required =True, readonly=True),
'number':fields.char('Invoice Number', size=64),
}
_defaults = {
'number': lambda *a: False,
}
def default_get(self, cr, uid, fields, context):
def default_get(self, cr, uid, fields, context=None):
"""
To get default values for the object.
@param self: The object pointer.
@@ -51,16 +50,18 @@ class auction_lots_make_invoice(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
res = super(auction_lots_make_invoice, self).default_get(cr, uid, fields, context=context)
for lot in self.pool.get('auction.lots').browse(cr, uid, context.get('active_ids', [])):
if not context:
context={}
res = super(auction_lots_make_invoice, self).default_get(cr, uid, fields, context=context)
lots_obj = self.pool.get('auction.lots')
for lot in lots_obj.browse(cr, uid, context.get('active_ids', [])):
if 'amount' in fields:
res.update({'amount': lot.buyer_price})
res.update({'amount': lot.seller_price})
if 'objects' in fields:
res.update({'objects': len(context['active_ids'])})
res.update({'objects': len(context.get('active_ids', []))})
return res
def makeInvoices(self, cr, uid, ids, context):
def makeInvoices(self, cr, uid, ids, context=None):
"""
Seller invoice :Create an invoice.
@param cr: the current row, from the database cursor.
@@ -68,11 +69,13 @@ class auction_lots_make_invoice(osv.osv_memory):
@param ids: List of Auction lots make invoice’s IDs
@return: dictionary of account invoice form.
"""
if not context:
context={}
order_obj = self.pool.get('auction.lots')
mod_obj = self.pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
lots_ids = order_obj.seller_trans_create(cr, uid, context['active_ids'], context)
lots_ids = order_obj.seller_trans_create(cr, uid, context.get('active_ids', []), context)
return {
'domain': "[('id','in', ["+','.join(map(str, lots_ids))+"])]",
'name': 'Seller invoices',
@@ -21,8 +21,10 @@
from osv import fields, osv
class auction_lots_make_invoice_buyer(osv.osv_memory):
"""Make Invoice for Buyer"""
_name = "auction.lots.make.invoice.buyer"
_description = "Make invoice buyer "
_description = __doc__
_columns= {
'amount': fields.float('Invoiced Amount', required =True, readonly=True),
@@ -35,7 +37,7 @@ class auction_lots_make_invoice_buyer(osv.osv_memory):
'number': lambda *a: False,
}
def default_get(self, cr, uid, fields, context):
def default_get(self, cr, uid, fields, context=None):
"""
To get default values for the object.
@param self: The object pointer.
@@ -45,14 +47,17 @@ class auction_lots_make_invoice_buyer(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
if not context:
context={}
res = super(auction_lots_make_invoice_buyer, self).default_get(cr, uid, fields, context=context)
for lot in self.pool.get('auction.lots').browse(cr, uid, context.get('active_ids', [])):
lots_obj=self.pool.get('auction.lots')
for lot in lots_obj.browse(cr, uid, context.get('active_ids', [])):
if 'amount' in fields:
res.update({'amount': lot.buyer_price})
if 'buyer_id' in fields:
res.update({'buyer_id': lot.ach_uid and lot.ach_uid.id or False})
if 'objects' in fields:
res.update({'objects': len(context['active_ids'])})
res.update({'objects': len(context.get('active_ids', []))})
return res
def makeInvoices(self, cr, uid, ids, context):
@@ -67,12 +72,12 @@ class auction_lots_make_invoice_buyer(osv.osv_memory):
mod_obj = self.pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
lots = order_obj.browse(cr, uid, context['active_ids'])
for data in self.read(cr, uid, ids):
invoice_number = data['number']
lots = order_obj.browse(cr, uid, context.get('active_ids', []))
for current in self.browse(cr, uid, ids, context):
invoice_number = current.number
for lot in lots:
up_auction = order_obj.write(cr, uid, [lot.id], {'ach_uid': data['buyer_id']})
lots_ids = order_obj.lots_invoice(cr, uid, context['active_ids'], context, data['number'])
up_auction = order_obj.write(cr, uid, [lot.id], {'ach_uid': current.buyer_id.id})
lots_ids = order_obj.lots_invoice(cr, uid, context.get('active_ids', []), context, current.number)
return {
'domain': "[('id','in', ["+','.join(map(str, lots_ids))+"])]",
'name': 'Buyer invoices',
@@ -16,8 +16,8 @@
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Create invoices" name="makeInvoices" type="object"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-yes" string="Create invoices" name="makeInvoices" type="object"/>
</group>
</form>
</field>
@@ -29,8 +29,7 @@
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_make_invoice_buyer"/>
id="action_auction_lots_make_invoice_buyer"/>
</data>
</openerp>
@@ -14,8 +14,8 @@
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Create invoices" name="makeInvoices" type="object"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-yes" string="Create invoices" name="makeInvoices" type="object"/>
</group>
</form>
</field>
+1 -11
View File
@@ -21,11 +21,7 @@
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_lots_sms_send(osv.osv_memory):
@@ -36,7 +32,7 @@ class auction_lots_sms_send(osv.osv_memory):
'user':fields.char('Login', size=64, required=True),
'password':fields.char('Password', size=64, required=True),
'text':fields.text('SMS Message', required=True)
}
}
def sms_send(self, cr, uid, ids, context):
"""
@@ -65,12 +61,6 @@ class auction_lots_sms_send(osv.osv_memory):
tools.smssend(data['user'], data['password'], data['app_id'], unicode(data['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
if to:
tools.smssend(data['user'], data['password'], data['app_id'], unicode(data['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
#
auction_lots_sms_send()
@@ -9,17 +9,16 @@
<form string="SMS - Gateway: clickatell','Bulk SMS send">
<group colspan="4" >
<separator string="SMS - Gateway: clickatell','Bulk SMS send" colspan="4"/>
<field name="app_id"/>
<newline/>
<field name="app_id" colspan="4"/>
<field name="user"/>
<field name="password"/>
<newline/>
<field name="text" colspan="3"/>
<separator string="SMS Text" colspan="4" />
<field name="text" colspan="4" nolabel="1"/>
</group>
<separator string="" colspan="4" />
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-go-back" string="Send SMS" name="sms_send" type="object"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-go-forward" string="Send SMS" name="sms_send" type="object"/>
</group>
</form>
</field>
+9 -10
View File
@@ -27,7 +27,6 @@ import tools
class auction_pay_buy(osv.osv_memory):
_name = "auction.pay.buy"
_description = "Pay buy"
_columns= {
'amount': fields.float('Amount paid', digits= (16, 2)),
'buyer_id':fields.many2one('res.partner', 'Buyer'),
@@ -39,7 +38,7 @@ class auction_pay_buy(osv.osv_memory):
'total': fields.float('Amount paid', digits = (16, 2), readonly =True),
}
def default_get(self, cr, uid, fields, context):
def default_get(self, cr, uid, fields, context=None):
"""
To get default values for the object.
@param self: The object pointer.
@@ -49,8 +48,11 @@ class auction_pay_buy(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
res = super(auction_pay_buy, self).default_get(cr, uid, fields, context=context)
for lot in self.pool.get('auction.lots').browse(cr, uid, context.get('active_ids', [])):
if not context:
context={}
res = super(auction_pay_buy, self).default_get(cr, uid, fields, context=context)
auction_lots_obj= self.pool.get('auction.lots')
for lot in auction_lots_obj.browse(cr, uid, context.get('active_ids', [])):
if 'amount' in fields:
res.update({'amount': lot.buyer_price})
if 'buyer_id' in fields:
@@ -73,22 +75,20 @@ class auction_pay_buy(osv.osv_memory):
for datas in self.read(cr, uid, ids):
if not abs(datas['total'] - (datas['amount'] + datas['amount2'] + datas['amount3'])) <0.01:
rest = datas['total']-(datas['amount'] + datas['amount2'] + datas['amount3'])
rest = datas['total'] - (datas['amount'] + datas['amount2'] + datas['amount3'])
raise osv.except_osv('Payment aborted !', 'You should pay all the total: "%.2f" are missing to accomplish the payment.' %(round(rest, 2)))
lots = lot_obj.browse(cr, uid, context['active_ids'], context)
ref_bk_s = bank_statement_line_obj
for lot in lots:
if datas['buyer_id']:
lot_obj.write(cr, uid, [lot.id], {'ach_uid':datas['buyer_id']})
lot_obj.write(cr, uid, [lot.id], {'ach_uid': datas['buyer_id']})
if not lot.auction_id:
raise osv.except_osv('Error !', 'No auction date for "%s": Please set one.'%(lot.name))
lot_obj.write(cr, uid, [lot.id], {'is_ok':True})
for st, stamount in [('statement_id1', 'amount'), ('statement_id2', 'amount2'), ('statement_id3', 'amount3')]:
if datas[st]:
new_id = ref_bk_s.create(cr, uid, {
new_id = bank_statement_line_obj.create(cr, uid, {
'name':'Buyer:'+ str(lot.ach_login or '')+', auction:'+ lots[0].auction_id.name,
'date': time.strftime('%Y-%m-%d'),
'partner_id': datas['buyer_id'] or False,
@@ -100,7 +100,6 @@ class auction_pay_buy(osv.osv_memory):
for lot in lots:
lot_obj.write(cr, uid, [lot.id], {'statement_id':[(4, new_id)]})
return {}
auction_pay_buy()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -8,6 +8,7 @@
<field name="arch" type="xml">
<form string="Pay objects">
<group colspan="4" >
<separator string="Pay Objects" colspan="4" />
<field name="amount"/>
<field name="statement_id1" domain="[('state','=','draft')]"/>
<field name="amount2"/>
@@ -20,7 +21,7 @@
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-yes" string="Pay" name="pay_and_reconcile" type="object"/>
</group>
</form>
+1 -1
View File
@@ -26,7 +26,7 @@ class auction_payer(osv.osv_memory):
_description = "Auction payer"
def payer(self, cr, uid, ids, context):
self.pool.get('auction.lots').write(cr, uid, context['active_ids'], {'is_ok':True, 'state':'paid'})
self.pool.get('auction.lots').write(cr, uid, context.get('active_ids', []), {'is_ok':True, 'state':'paid'})
return {}
auction_payer()
+8 -6
View File
@@ -38,20 +38,22 @@ class auction_taken(osv.osv_memory):
}
def _to_xml(s):
return s.replace('&','&amp;').replace('<','&lt;').replace('>','&gt;')
return s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
def process(self, cr, uid, ids, context):
def process(self, cr, uid, ids, context=None):
"""
Update Auction lots state to taken_away.
This Function update Auction lots state to taken_away.
@param cr: the current row, from the database cursor.
@param uid: the current user’s ID for security checks.
@param ids: List of Auction taken’s IDs
@return: dictionary of lot_ids fields with empty list
"""
if not context:
context={}
lot_obj = self.pool.get('auction.lots')
for data in self.read(cr, uid, ids):
if data['lot_ids']:
lot_obj.write(cr, uid, data['lot_ids'], {'state':'taken_away'})
for current in self.browse(cr, uid, ids, context):
for lot in current.lot_ids:
lot_obj.write(cr, uid, lot.id, {'state':'taken_away'})
return {'lot_ids': []}
auction_taken()
+3 -12
View File
@@ -8,11 +8,11 @@
<field name="arch" type="xml">
<form string="Mark Lots">
<group colspan="4" >
<label string="Select lots which are Sold" colspan="4"/>
<separator string="Select lots which are Sold" colspan="4"/>
<field name="lot_ids" nolabel="1" colspan="4" domain="[('state','=','sold')]"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<group colspan="4">
<button icon="gtk-ok" string="OK" name="process" type="object" />
</group>
</form>
@@ -27,16 +27,7 @@
<field name="view_id" ref="view_auction_taken"/>
<field name="target">new</field>
</record>
<!-- <menuitem name="Tools Bar Codes"
id="auction_outils_menu"
parent="auction_menu_root" sequence="5"
/>
<menuitem name="Deliveries Management"
action="action_auction_taken"
id="menu_wizard_emporte"
parent="auction_outils_menu"
/> -->
</data>
</openerp>
+11 -11
View File
@@ -23,18 +23,18 @@
<attribute name="string">Install Generic Modules</attribute>
</separator>
<group colspan="8">
<field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="misc_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="misc_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<separator string="Install Specific Business Modules" colspan="4"/>
<field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="profile_auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
</group>
</data>
</field>
+1 -1
View File
@@ -82,7 +82,7 @@ class base_setup_installer(osv.osv_memory):
help="Installs a preselected set of OpenERP "
"applications which will help you manage your association "
"more efficiently."),
'profile_auction':fields.boolean('Auction Houses',
'auction':fields.boolean('Auction Houses',
help="Installs a preselected set of OpenERP "
"applications selected to help you manage your auctions "
"as well as the business processes around them."),