[MERGE] misc fixes addons 10, purchase, account

bzr revid: fp@tinyerp.com-20120926072239-wy398z8cwk0qiq0t
This commit is contained in:
Fabien Pinckaers 2012-09-26 09:22:39 +02:00
commit 64cfc71038
8 changed files with 48 additions and 6 deletions

View File

@ -262,6 +262,7 @@ account_analytic_plan_instance()
class account_analytic_plan_instance_line(osv.osv):
_name = "account.analytic.plan.instance.line"
_description = "Analytic Instance Line"
_rec_name = "analytic_account_id"
_columns = {
'plan_id': fields.many2one('account.analytic.plan.instance', 'Plan Id'),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, domain=[('type','<>','view')]),

View File

@ -71,6 +71,7 @@
</group>
<notebook>
<page string="Payment Information">
<label for="line_dr_ids" attrs="{'invisible': [('type', '=', 'receipt')]}"/>
<field name="line_dr_ids" attrs="{'invisible': [('type', '=', 'receipt')]}" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Open Supplier Journal Entries" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
@ -84,6 +85,7 @@
<field name="amount" sum="Total Allocation"/>
</tree>
</field>
<label for="line_cr_ids" attrs="{'invisible': [('type', '=', 'payment')]}"/>
<field name="line_cr_ids" attrs="{'invisible': [('type', '=', 'payment')]}" context="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Open Customer Journal Entries" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
@ -155,6 +157,7 @@
</group>
<notebook>
<page string="Payment Information">
<label for="line_dr_ids"/>
<field name="line_dr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
<tree string="Supplier Invoices and Outstanding transactions" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
@ -170,6 +173,7 @@
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)"/>
</tree>
</field>
<label for="line_cr_ids" attrs="{'invisible': [('pre_line','=',False)]}"/>
<field name="line_cr_ids" attrs="{'invisible': [('pre_line','=',False)]}" context="{'journal_id':journal_id, 'partner_id':partner_id}">
<tree string="Credits" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
@ -328,6 +332,7 @@
<notebook>
<page string="Payment Information" groups="base.group_user">
<label for="line_cr_ids"/>
<field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Invoices and outstanding transactions" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
@ -344,6 +349,7 @@
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation"/>
</tree>
</field>
<label for="line_dr_ids" attrs="{'invisible': [('pre_line','=',False)]}"/>
<field name="line_dr_ids" attrs="{'invisible': [('pre_line','=',False)]}" context="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Credits" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"

View File

@ -179,7 +179,7 @@ class purchase_order(osv.osv):
'shipped_rate': fields.function(_shipped_rate, string='Received', type='float'),
'invoiced': fields.function(_invoiced, string='Invoice Received', type='boolean', help="It indicates that an invoice has been paid"),
'invoiced_rate': fields.function(_invoiced_rate, string='Invoiced', type='float'),
'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Bases on incoming shipments')], 'Invoicing Control', required=True,
'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Based on incoming shipments')], 'Invoicing Control', required=True,
help="Based on Purchase Order lines: place individual lines in 'Invoice Control > Based on P.O. lines' from where you can selectively create an invoice.\n" \
"Based on generated invoice: create a draft invoice you can validate later.\n" \
"Bases on incoming shipments: let you create an invoice when receptions are validated."

View File

@ -367,7 +367,7 @@
<field name="name">Quotations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="context">{}</field>
<field name="context">{'search_default_draft': 1, 'search_default_to_approve': 1}</field>
<field name="domain">[('state','in',('draft','sent','confirmed'))]</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="search_view_id" ref="view_purchase_order_filter"/>

View File

@ -13,5 +13,30 @@
</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" domain="[('plan_id','&lt;&gt;',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>
</data>
</openerp>

View File

@ -3,7 +3,7 @@
<data>
<record id="purchase_waiting" model="ir.actions.act_window">
<field name="name">Purchase Order Waiting Approval</field>
<field name="name">Purchase Orders Waiting Approval</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
@ -17,7 +17,7 @@
<field name="inherit_id" ref="purchase.board_purchase_form"/>
<field name="arch" type="xml">
<xpath expr="/form/board/column/action[@string='Request for Quotations']" position="after">
<action name="%(purchase_waiting)d" string="Purchase Order Waiting Approval"/>
<action name="%(purchase_waiting)d" string="Purchase Orders Waiting Approval"/>
</xpath>
</field>
</record>

View File

@ -32,7 +32,7 @@ When a purchase order is created, you now have the opportunity to save the
related requisition. This new object will regroup and will allow you to easily
keep track and order all your purchase orders.
""",
'depends' : ['purchase','mrp'],
'depends' : ['purchase'],
'demo': ['purchase_requisition_demo.xml'],
'data': ['security/purchase_tender.xml',
'wizard/purchase_requisition_partner_view.xml',

View File

@ -21,7 +21,7 @@
</record>
<act_window name="Create invoice"
<act_window name="Create Invoice"
res_model="stock.invoice.onshipping"
src_model="stock.picking.out"
key2="client_action_multi"
@ -30,5 +30,15 @@
view_type="form"
target="new"
id="action_stock_invoice_onshipping"/>
<act_window name="Create Draft Invoices"
res_model="stock.invoice.onshipping"
src_model="stock.picking.in"
key2="client_action_multi"
multi="True"
view_mode="form"
view_type="form"
target="new"
id="action_stock_invoice_onshipping"/>
</data>
</openerp>