[DEL] purchase_analytic_plans: deprecated module
Reason: complete rewrite of the Sale module. Invoicing is now managed through Sale. Responsible: fp, dbo, nim
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Init Sales
|
||||
#----------------------------------------------------------
|
||||
|
||||
import purchase_analytic_plans
|
||||
@@ -1,22 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
|
||||
{
|
||||
'name': 'Purchase Analytic Plans',
|
||||
'version': '1.0',
|
||||
'category': 'Purchase Management',
|
||||
'description': """
|
||||
The base module to manage analytic distribution and purchase orders.
|
||||
====================================================================
|
||||
|
||||
Allows the user to maintain several analysis plans. These let you split a line
|
||||
on a vendor purchase order into several accounts and analytic plans.
|
||||
""",
|
||||
'website': 'https://www.odoo.com/page/purchase',
|
||||
'depends': ['purchase', 'account_analytic_plans'],
|
||||
'data': ['purchase_analytic_plans_view.xml', 'res_config.xml'],
|
||||
'demo': [],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
|
||||
class purchase_order_line(osv.osv):
|
||||
_name='purchase.order.line'
|
||||
_inherit='purchase.order.line'
|
||||
_columns = {
|
||||
'analytics_id':fields.many2one('account.analytic.plan.instance','Analytic Distribution'),
|
||||
}
|
||||
|
||||
|
||||
class purchase_order(osv.osv):
|
||||
_name='purchase.order'
|
||||
_inherit='purchase.order'
|
||||
|
||||
def _prepare_inv_line(self, cr, uid, account_id, order_line, context=None):
|
||||
res = super(purchase_order, self)._prepare_inv_line(cr, uid, account_id, order_line, context=context)
|
||||
res['analytics_id'] = order_line.analytics_id.id
|
||||
return res
|
||||
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="purchase_order_line_form_inherit">
|
||||
<field name="name">purchase.order.line.form.inherit</field>
|
||||
<field name="model">purchase.order.line</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_analytic_id" position="replace">
|
||||
<field name="analytics_id" groups="purchase.group_analytic_accounting" context="{'journal_id':parent.journal_id, 'model': 'purchase_order'}" domain="[('plan_id','<>',False)]"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="purchase_order_form_analytic_inherit">
|
||||
<field name="name">purchase.order.form.analytic.inherit</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_analytic_id" position="replace">
|
||||
<field name="analytics_id" groups="purchase.group_analytic_accounting" context="{'journal_id':parent.journal_id}" domain="[('plan_id','<>',False)]"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- inherited view to make the purchase order lines list in the form non-editable
|
||||
for the members of some usability groups -->
|
||||
<record id="view_purchase_order_form_editable_list" model="ir.ui.view">
|
||||
<field name="name">purchase.order.form.editable.list</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product.group_uom'), ref('purchase.group_analytic_accounting')])]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='order_line']/tree" position="attributes">
|
||||
<attribute name="editable"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<!-- Replace analytic_id with analytics_id in account.invoice.line -->
|
||||
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="invoice_supplier_form_inherit">
|
||||
<field name="name">account.invoice.supplier.form.inherit</field>
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_analytic_id" position="replace">
|
||||
<field name="analytics_id" domain="[('plan_id','<>',False)]" context="{'journal_id':parent.journal_id}" groups="analytic.group_analytic_accounting"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="base.group_user" model="res.groups">
|
||||
<field name="implied_ids" eval="[(4, ref('purchase.group_analytic_accounting'))]"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user