Amit Bhavsar (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-usability2-asset_demodata-amb into
lp:~openerp-dev/openobject-addons/trunk-usability2.
Requested reviews:
Amit (Open ERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-usability2-asset_demodata-amb/+merge/79082
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-usability2-asset_demodata-amb/+merge/79082
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-usability2.
=== modified file 'account_asset/account_asset.py'
--- account_asset/account_asset.py 2011-09-15 16:50:00 +0000
+++ account_asset/account_asset.py 2011-10-12 09:08:43 +0000
@@ -206,6 +206,10 @@
'parent_id': fields.many2one('account.asset.asset', 'Parent Asset', readonly=True, states={'draft':[('readonly',False)]}),
'child_ids': fields.one2many('account.asset.asset', 'parent_id', 'Children Assets'),
'purchase_date': fields.date('Purchase Date', required=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'asset_type': fields.selection([('sale','Sale'),('purchase','Purchase'),('both','Both')],'Asset Type',\
+ help="Sale in indicate that your Asset is Salable.\n"
+ "Purchase is indicate that your Asset is purchasable.\n"
+ "Both are indicate that your Asset is Salable and purchasable."),
'state': fields.selection([('draft','Draft'),('open','Running'),('close','Close')], 'State', required=True,
help="When an asset is created, the state is 'Draft'.\n" \
"If the asset is confirmed, the state goes in 'Running' and the depreciation lines can be posted in the accounting.\n" \
=== modified file 'account_asset/account_asset_demo.xml'
--- account_asset/account_asset_demo.xml 2011-07-11 22:47:50 +0000
+++ account_asset/account_asset_demo.xml 2011-10-12 09:08:43 +0000
@@ -20,6 +20,7 @@
<record id="account_asset_asset_vehicles0" model="account.asset.asset">
<field eval="2000.0" name="salvage_value"/>
<field name="state">open</field>
+ <field name="asset_type">sale</field>
<field eval="12" name="method_period"/>
<field eval="10" name="method_number"/>
<field name="name">CEO's Car</field>
@@ -31,6 +32,7 @@
<field name="method_end">2014-08-11</field>
<field eval="0.0" name="salvage_value"/>
<field name="method_time">end</field>
+ <field name="asset_type">sale</field>
<field name="name">V6 Engine and 10 inches tires</field>
<field eval="2800.0" name="purchase_value"/>
<field name="category_id" ref="account_asset_category_fixedassets0"/>
@@ -41,6 +43,7 @@
<field eval="1" name="prorata"/>
<field eval="100000.0" name="salvage_value"/>
<field name="state">open</field>
+ <field name="asset_type">both</field>
<field eval="12" name="method_period"/>
<field eval="20" name="method_number"/>
<field name="purchase_date">2011-01-01</field>
=== modified file 'account_asset/account_asset_invoice.py'
--- account_asset/account_asset_invoice.py 2011-10-02 17:31:16 +0000
+++ account_asset/account_asset_invoice.py 2011-10-12 09:08:43 +0000
@@ -24,6 +24,12 @@
class account_invoice(osv.osv):
_inherit = 'account.invoice'
+ _columns = {
+ 'asset_type': fields.selection([('sale','Sale'),('purchase','Purchase'),('both','Both')],'Asset Type',\
+ help="Sale in indicate that your Asset is Salable.\n"
+ "Purchase is indicate that your Asset is purchasable.\n"
+ "Both are indicate that your Asset is Salable and purchasable."),
+ }
def line_get_convert(self, cr, uid, x, part, date, context=None):
res = super(account_invoice, self).line_get_convert(cr, uid, x, part, date, context=context)
res['asset_id'] = x.get('asset_id', False)
=== modified file 'account_asset/account_asset_view.xml'
--- account_asset/account_asset_view.xml 2011-10-02 17:31:16 +0000
+++ account_asset/account_asset_view.xml 2011-10-12 09:08:43 +0000
@@ -90,6 +90,7 @@
<field name="value_residual"/>
<field name="currency_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
+ <field name="asset_type"/>
</group>
<notebook colspan="4">
<page string="General">
@@ -212,6 +213,21 @@
</field>
</record>
+ # ------------------------------------------------------
+ # Account invoice
+ # ------------------------------------------------------
+ <record id="view_account_invoice_search_inherit" model="ir.ui.view">
+ <field name="name">account.invoice.search.inherit</field>
+ <field name="model">account.invoice</field>
+ <field name="type">search</field>
+ <field name="inherit_id" ref="account.view_account_invoice_filter"/>
+ <field name="arch" type="xml">
+ <xpath expr="group/field[@name='period_id']" position="after">
+ <field name="asset_type"/>
+ </xpath>
+ </field>
+ </record>
+
<!--
Asset History
-->
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp