<menuitem name="Purchases"
id="base.menu_purchase_root"
groups="group_purchase_manager,group_purchase_user"
- sequence="40"/>
+ sequence="60"/>
<menuitem id="menu_procurement_management" name="Purchase"
parent="base.menu_purchase_root" sequence="1" />
<menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
parent="menu_procurement_management_product"/>
- <!-- Purchase order Read/Unread actions -->
- <record id="actions_server_purchase_order_unread" model="ir.actions.server">
- <field name="name">Mark unread</field>
- <field name="condition">True</field>
- <field name="type">ir.actions.server</field>
- <field name="model_id" ref="model_purchase_order"/>
- <field name="state">code</field>
- <field name="code">self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context)</field>
- </record>
- <record id="action_purchase_order_unread" model="ir.values">
- <field name="name">action_purchase_order_unread</field>
- <field name="action_id" ref="actions_server_purchase_order_unread"/>
- <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_purchase_order_unread'))" />
- <field name="key">action</field>
- <field name="model_id" ref="model_purchase_order" />
- <field name="model">purchase.order</field>
- <field name="key2">client_action_multi</field>
- </record>
-
- <record id="actions_server_purchase_order_read" model="ir.actions.server">
- <field name="name">Mark read</field>
- <field name="condition">True</field>
- <field name="type">ir.actions.server</field>
- <field name="model_id" ref="model_purchase_order"/>
- <field name="state">code</field>
- <field name="code">self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context)</field>
- </record>
- <record id="action_purchase_order_read" model="ir.values">
- <field name="name">action_purchase_order_read</field>
- <field name="action_id" ref="actions_server_purchase_order_read"/>
- <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_purchase_order_read'))" />
- <field name="key">action</field>
- <field name="model_id" ref="model_purchase_order" />
- <field name="model">purchase.order</field>
- <field name="key2">client_action_multi</field>
- </record>
-
<record model="ir.ui.view" id="purchase_order_calendar">
<field name="name">purchase.order.calendar</field>
<field name="model">purchase.order</field>
<field name="arch" type="xml">
<form string="Purchase Order" version="7.0">
<header>
- <button name="wkf_send_rfq" states="draft" string="Send RFQ" type="object" context="{'send_rfq':True}" class="oe_highlight"/>
+ <button name="wkf_send_rfq" states="draft" string="Send by EMail" type="object" context="{'send_rfq':True}" class="oe_highlight"/>
+ <button name="wkf_send_rfq" states="sent" string="Send by EMail" type="object" context="{'send_rfq':True}"/>
+ <button name="print_quotation" string="Print" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
+ <button name="print_quotation" string="Print" type="object" states="sent" groups="base.group_user"/>
<button name="purchase_confirm" states="draft" string="Confirm Order"/>
<button name="purchase_confirm" states="sent" string="Confirm Order" class="oe_highlight"/>
<button name="wkf_send_rfq" states="confirmed" string="Resend Purchase Order" type="object" class="oe_highlight"/>
- <button name="action_cancel" states="except_picking,except_invoice" string="Cancel" type="object" />
+ <button name="action_cancel" states="approved,except_picking,except_invoice" string="Cancel" type="object" />
<button name="picking_ok" states="except_picking" string="Manually Corrected"/>
<button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
<button name="purchase_approve" states="confirmed" string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>
<sheet>
<div class="oe_title">
<h1>
- <label string="Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
+ <label string="Request for Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
<label string="Purchase Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
<field name="name" class="oe_inline" readonly="1"/>
</h1>
<field name="partner_ref"/>
<field domain="[('type','=','purchase')]" name="pricelist_id" groups="product.group_purchase_pricelist" on_change="onchange_pricelist(pricelist_id, context)"/>
<field name="currency_id" invisible='1'/>
+ <field name="journal_id" invisible='1'/>
</group>
<group>
<field name="date_order"/>
<page string="Purchase Order">
<field name="order_line">
<tree string="Purchase Order Lines" editable="bottom">
- <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
+ <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<field name="name"/>
<field name="date_planned"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
</group>
<div class="oe_clear"/>
- <label for="notes"/>
- <field name="notes"/>
+ <field name="notes" class="oe_inline" placeholder="Terms and conditions..."/>
</page>
- <page string="Incoming Shipments">
+ <page string="Incoming Shipments & Invoices">
<group>
<group>
- <field name="dest_address_id" string="Customer Address" on_change="onchange_dest_address_id(dest_address_id)"/>
+ <field name="dest_address_id" string="Customer Address" on_change="onchange_dest_address_id(dest_address_id)" groups="stock.group_locations"/>
<field name="minimum_planned_date"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="shipped" groups="base.group_no_one"/>
<group>
<field name="invoice_method"/>
<field name="invoiced"/>
- <field name="fiscal_position"/>
+ <field name="payment_term_id" widget="selection"/>
+ <field name="fiscal_position" attrs="{'readonly': [('invoiced','=', True)]}" />
<!-- We do not need these fields anymore, the information is in open chatter -->
<field name="validator" groups="base.group_no_one"/>
<field name="date_approve" groups="base.group_no_one"/>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
<sheet>
<group>
<group>
- <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
+ <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<label for="product_qty"/>
<div>
<field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)" class="oe_inline"/>
<field name="name">purchase.order.line.tree</field>
<field name="model">purchase.order.line</field>
<field name="arch" type="xml">
- <tree string="Purchase Order Lines">
+ <tree string="Purchase Order Lines" create="false">
<field name="order_id"/>
<field name="name"/>
<field name="partner_id" string="Supplier" />
<field name="model">purchase.order.line</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
- <form string="Purchase Order Line" version="7.0">
+ <form string="Purchase Order Line" version="7.0" create="false">
<sheet>
<label for="order_id" class="oe_edit_only"/>
<h1>
- <field name="order_id" class="oe_inline"/>
+ <field name="order_id" class="oe_inline" domain="[('invoice_method','=','manual')]" />
<label string="," attrs="{'invisible':[('date_order','=',False)]}"/>
<field name="date_order" class="oe_inline"/>
</h1>
<field name="inherit_id" ref="account.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='property_account_expense']" position="replace" >
- <field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" />
+ <field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" groups="account.group_account_user"/>
</xpath>
<xpath expr="//field[@name='supplier_taxes_id']" position="replace" >
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags" attrs="{'readonly':[('purchase_ok','=',0)]}"/>