[imp] add batches to Sale Orders
This commit is contained in:
parent
13c83e31c8
commit
c49967c40f
7 changed files with 29 additions and 10 deletions
|
|
@ -37,6 +37,7 @@ Changelog
|
||||||
:0.0.1: Initial module.
|
:0.0.1: Initial module.
|
||||||
:1.0.0: Add Multi Company ability
|
:1.0.0: Add Multi Company ability
|
||||||
:1.0.1: rename product creation methode
|
:1.0.1: rename product creation methode
|
||||||
|
:1.1.0: Make validity_date persistent, add batches to SO views
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"author": "BAKEUP",
|
"author": "BAKEUP",
|
||||||
"website": "https://www.bakeup.org",
|
"website": "https://www.bakeup.org",
|
||||||
"category": "Sale",
|
"category": "Sale",
|
||||||
"version": "16.0.1.0.1",
|
"version": "16.0.1.1.0",
|
||||||
"depends": ["sale", "product"],
|
"depends": ["sale", "product"],
|
||||||
"data": [
|
"data": [
|
||||||
"data/ir_sequence_data.xml",
|
"data/ir_sequence_data.xml",
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ from odoo.exceptions import UserError
|
||||||
class SaleOrder(models.Model):
|
class SaleOrder(models.Model):
|
||||||
_inherit = "sale.order"
|
_inherit = "sale.order"
|
||||||
|
|
||||||
batch_id = fields.Many2one("sale.order.batch", copy=False, check_company=True)
|
batch_id = fields.Many2one("sale.order.batch", copy=False, check_company=True, domain="[('state','!=','closed')]")
|
||||||
|
|
||||||
def action_add_to_batch(self):
|
def action_add_to_batch(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
:0.0.1: Initial module.
|
:0.0.1: Initial module.
|
||||||
:1.0.0: Add Multi Company ability
|
:1.0.0: Add Multi Company ability
|
||||||
:1.0.1: rename product creation methode
|
:1.0.1: rename product creation methode
|
||||||
|
:1.1.0: Make validity_date persistent, add batches to SO views
|
||||||
|
|
@ -398,6 +398,8 @@ anymore as log as they are part of a batch. Only Sale Orders in state Qutotation
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="field"><th class="field-name">1.0.1:</th><td class="field-body">rename product creation methode</td>
|
<tr class="field"><th class="field-name">1.0.1:</th><td class="field-body">rename product creation methode</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="field"><th class="field-name">1.1.0:</th><td class="field-body">Make validity_date persistent, add batches to SO views</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -99,11 +99,8 @@
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="Sale Orders" name="orders">
|
<page string="Sale Orders" name="orders">
|
||||||
<field
|
<field name="sale_order_ids">
|
||||||
name="sale_order_ids"
|
<tree delete="0">
|
||||||
domain="[('state','in',['draft','sent']),('batch_id','=',False)]"
|
|
||||||
>
|
|
||||||
<tree>
|
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="partner_id"/>
|
<field name="partner_id"/>
|
||||||
<field name="date_order"/>
|
<field name="date_order"/>
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,14 @@
|
||||||
name="attrs"
|
name="attrs"
|
||||||
>{'invisible': ['|',('batch_id','!=',False),('state', 'not in', ['draft'])]}</attribute>
|
>{'invisible': ['|',('batch_id','!=',False),('state', 'not in', ['draft'])]}</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<group name="partner_details" position="inside">
|
||||||
|
<field name="batch_id"/>
|
||||||
|
</group>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="view_order_list_inherit_batch" model="ir.ui.view">
|
<record id="view_quatation_tree_inherit_batch" model="ir.ui.view">
|
||||||
<field name="name">sale.order.list.view.inherited</field>
|
<field name="name">sale.order.tree.inherited.batch</field>
|
||||||
<field name="model">sale.order</field>
|
<field name="model">sale.order</field>
|
||||||
<field name="inherit_id" ref="sale.view_quotation_tree"/>
|
<field name="inherit_id" ref="sale.view_quotation_tree"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
|
@ -49,6 +52,21 @@
|
||||||
<button type="object" name="action_add_to_batch" string="Add to Batch"/>
|
<button type="object" name="action_add_to_batch" string="Add to Batch"/>
|
||||||
</header>
|
</header>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='name']" position="after">
|
||||||
|
<field name="batch_id"/>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_order_tree_inherit_batch" model="ir.ui.view">
|
||||||
|
<field name="name">sale.order.tree.inherited.batch</field>
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale.view_order_tree"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='name']" position="after">
|
||||||
|
<field name="batch_id"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue