[MIG] sale_stock_usability_akretion: migrate to 18
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
# Copyright 2015-2024 Akretion France (https://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Sale Stock Usability',
|
'name': 'Sale Stock Usability',
|
||||||
'version': '16.0.1.0.0',
|
'version': '18.0.1.0.0',
|
||||||
'category': 'Sales Management',
|
'category': 'Sales Management',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Small usability improvements to the sale_stock module',
|
'summary': 'Small usability improvements to the sale_stock module',
|
||||||
@@ -23,11 +23,10 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
|||||||
'website': 'https://github.com/akretion/odoo-usability',
|
'website': 'https://github.com/akretion/odoo-usability',
|
||||||
'depends': ['sale_stock'],
|
'depends': ['sale_stock'],
|
||||||
'data': [
|
'data': [
|
||||||
'views/sale_order.xml',
|
|
||||||
'views/sale_report.xml',
|
'views/sale_report.xml',
|
||||||
'views/procurement_group.xml',
|
'views/procurement_group.xml',
|
||||||
'views/stock_move.xml',
|
'views/stock_move.xml',
|
||||||
'views/stock_picking.xml',
|
'views/stock_picking.xml',
|
||||||
],
|
],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2024 Akretion France (http://www.akretion.com)
|
# Copyright 2024 Akretion France (https://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Copyright 2015-2020 Akretion France (http://www.akretion.com)
|
# Copyright 2015-2024 Akretion France (https://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import api, fields, models
|
from odoo import fields, models
|
||||||
from odoo.tools import float_compare, float_round
|
from odoo.tools import float_compare, float_round
|
||||||
|
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ class SaleOrder(models.Model):
|
|||||||
'Product Unit of Measure')
|
'Product Unit of Measure')
|
||||||
for line in self.order_line:
|
for line in self.order_line:
|
||||||
if (
|
if (
|
||||||
line.product_id.type in ('product', 'consu') and
|
line.product_id.type == 'consu' and
|
||||||
float_compare(
|
float_compare(
|
||||||
line.product_uom_qty, line.qty_delivered,
|
line.product_uom_qty, line.qty_delivered,
|
||||||
precision_digits=prec) > 0):
|
precision_digits=prec) > 0):
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2024 Akretion France (http://www.akretion.com)
|
# Copyright 2024 Akretion France (https://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
Copyright 2015-2024 Akretion France (https://www.akretion.com/)
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<record id="view_order_form" model="ir.ui.view">
|
|
||||||
<field name="name">sale_stock_usability.order.form</field>
|
|
||||||
<field name="model">sale.order</field>
|
|
||||||
<field name="inherit_id" ref="sale_stock.view_order_form_inherit_sale_stock"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<!-- move warehouse_id to the top, not hidden in the 2nd tab -->
|
|
||||||
<xpath expr="//group[@name='sale_shipping']/field[@name='warehouse_id' and @force_save='1']" position="replace"/>
|
|
||||||
<group name="order_details" position="inside">
|
|
||||||
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" force_save="1"/>
|
|
||||||
</group>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2024 Akretion France (http://www.akretion.com/)
|
Copyright 2024 Akretion France (https://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
Copyright 2015-2024 Akretion France (https://www.akretion.com/)
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -12,9 +12,9 @@
|
|||||||
<field name="model">stock.move</field>
|
<field name="model">stock.move</field>
|
||||||
<field name="inherit_id" ref="stock.view_move_form"/>
|
<field name="inherit_id" ref="stock.view_move_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="origin" position="after">
|
<group name="origin_grp" position="inside">
|
||||||
<field name="sale_line_id" readonly="1"/>
|
<field name="sale_line_id" readonly="1"/>
|
||||||
</field>
|
</group>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
Copyright 2015-2024 Akretion France (https://www.akretion.com/)
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="origin" position="before">
|
<field name="origin" position="before">
|
||||||
<field name="sale_id" readonly="1" attrs="{'invisible': [('sale_id', '=', False)]}"/>
|
<field name="sale_id" readonly="1" invisible="not sale_id"/>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
Reference in New Issue
Block a user