~openerp-community/openobject-addons/trunk-addons-community

« back to all changes in this revision

Viewing changes to product_loan/stock_data.xml

  • Committer: Alexis de Lattre
  • Date: 2014-01-20 16:28:33 UTC
  • Revision ID: alexis@via.ecp.fr-20140120162833-wozad66s7ln25ec2
Enhance the code ; the generation of the return picking is now inheritable. The return stock move is now linked to the out stock move (move_dest_id)
Small update to coding style.
Loan IN and OUT are now regular M2O fields and not properties (warning : it requires data migration).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<openerp>
3
 
    <data>
4
 
        <record id="loan_in" model="stock.location">
5
 
            <field name="name">loan_in</field>
6
 
            <field name="location_id">9</field><!-- TODO weak -->
7
 
            <field name="usage">internal</field>
8
 
        </record>
9
 
 
10
 
        <record id="loan_out" model="stock.location">
11
 
            <field name="name">loan_out</field>
12
 
            <field name="location_id">9</field><!-- TODO weak -->
13
 
            <field name="usage">customer</field>
14
 
        </record>
15
 
 
16
 
        <record forcecreate="True" id="property_stock_loan_inside_location" model="ir.property">
17
 
            <field name="name">property_stock_loan_inside_location</field>
18
 
            <field name="fields_id" search="[('model','=','stock.warehouse'),('name','=','property_stock_loan_inside_location')]"/>
19
 
            <field eval="'stock.location,'+str(loan_in)" name="value"/>
20
 
        </record>
21
 
 
22
 
        <record forcecreate="True" id="property_stock_loan_outside_location" model="ir.property">
23
 
            <field name="name">property_stock_loan_outside_location</field>
24
 
            <field name="fields_id" search="[('model','=','stock.warehouse'),('name','=','property_stock_loan_outside_location')]"/>
25
 
            <field eval="'stock.location,'+str(loan_out)" name="value"/>
26
 
        </record>
27
 
    </data>
 
3
<data noupdate="1">
 
4
 
 
5
 
 
6
<record id="loan_in" model="stock.location">
 
7
    <field name="name">Loan In</field>
 
8
    <field name="location_id" ref="stock.stock_location_company"/>
 
9
    <field name="usage">internal</field>
 
10
</record>
 
11
 
 
12
<record id="loan_out" model="stock.location">
 
13
    <field name="name">Loan Out</field>
 
14
    <field name="location_id" ref="stock.stock_location_company"/>
 
15
    <field name="usage">customer</field>
 
16
</record>
 
17
 
 
18
<record id="stock.warehouse0" model="stock.warehouse">
 
19
    <field name="loan_in_location_id" ref="loan_in"/>
 
20
    <field name="loan_out_location_id" ref="loan_out"/>
 
21
</record>
 
22
 
 
23
 
 
24
</data>
28
25
</openerp>