Files
odoo-usability/purchase_suggest/wizard/purchase_suggest_view.xml
Alexis de Lattre b217a504e6 Convert M2O fields to M2M
Add explainations to the user about the algo
Update translation files
2015-05-28 18:03:27 +02:00

121 lines
4.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="purchase_suggest_generate_form" model="ir.ui.view">
<field name="name">purchase_suggest_generate.form</field>
<field name="model">purchase.suggest.generate</field>
<field name="arch" type="xml">
<form string="Generate Purchase Suggestions">
<p>This wizard will generate purchase suggestions based on the following rules:</p>
<ol>
<li>it will search all the re-ordering rules linked to the selected stock location, limited to the product categories and the suppliers if some were selected</li>
<li>if the quantity on hand + incoming quantity - outgoing quantity + quantity in draft purchase orders is strictly inferior to the minimum stock level, it will create a purchase suggestion line</li>
</ol>
<p>The purchase suggestion lines display as much information as possible to help you take the decision on the quantity that you would like to re-order. When you have decided the quantity you want to re-order, enter that value in the last column.</p>
<p>Once you have entered a Quantity to Order for all the lines you would like to re-order, select all the lines and click on <i>More</i> > <i>Create Purchase Orders</i>.</p>
<group name="name">
<field name="categ_ids" widget="many2many_tags"/>
<field name="seller_ids" widget="many2many_tags"/>
<field name="location_id"/>
</group>
<footer>
<button type="object" name="run" string="Generate" class="oe_highlight"/>
<button special="cancel" string="Cancel" class="oe_link"/>
</footer>
</form>
</field>
</record>
<record id="purchase_suggest_generate_action" model="ir.actions.act_window">
<field name="name">Purchase Suggestions</field>
<field name="res_model">purchase.suggest.generate</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="purchase_suggest_generate_menu"
action="purchase_suggest_generate_action"
parent="purchase.menu_procurement_management"
sequence="14"/>
<record id="purchase_suggest_tree" model="ir.ui.view">
<field name="name">purchase_suggest.tree</field>
<field name="model">purchase.suggest</field>
<field name="arch" type="xml">
<tree string="Purchase Suggestions" editable="bottom">
<field name="seller_id"/>
<field name="product_id"/>
<field name="qty_available"/>
<field name="incoming_qty"/>
<field name="outgoing_qty"/>
<field name="draft_po_qty"/>
<field name="min_qty"/>
<field name="last_po_date" widget="date"/>
<field name="last_po_qty"/>
<field name="qty_to_order"/>
</tree>
</field>
</record>
<record id="purchase_suggest_search" model="ir.ui.view">
<field name="name">purchase_suggest.search</field>
<field name="model">purchase.suggest</field>
<field name="arch" type="xml">
<search string="Purchase Suggestions">
<field name="seller_id"/>
<field name="product_id"/>
<group string="Group By" name="groupby">
<filter name="seller_groupby" string="Seller" context="{'group_by': 'seller_id'}"/>
</group>
</search>
</field>
</record>
<record id="purchase_suggest_action" model="ir.actions.act_window">
<field name="name">Purchase Suggestions</field>
<field name="res_model">purchase.suggest</field>
<field name="view_mode">tree</field>
<field name="target">new</field>
</record>
<record id="purchase_suggest_po_create_form" model="ir.ui.view">
<field name="name">purchase_suggest_po_create.form</field>
<field name="model">purchase.suggest.po.create</field>
<field name="arch" type="xml">
<form string="Create Purchase Orders">
<p class="oe_grey">
Click on the red button below to create the purchase orders.
</p>
<footer>
<button type="object" name="create_po"
string="Create Purchase Orders" class="oe_highlight"/>
<button special="cancel" string="Cancel" class="oe_link"/>
</footer>
</form>
</field>
</record>
<act_window id="purchase_suggest_po_create_action"
multi="True"
key2="client_action_multi"
name="Create Purchase Orders"
res_model="purchase.suggest.po.create"
src_model="purchase.suggest"
view_mode="form"
target="new" />
</data>
</openerp>