carrier_id not readonly on done picking (add tracking on it)
fix for formatLang inherit in base_usability
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import stock
|
||||
|
||||
@@ -24,6 +24,7 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
||||
'data': [
|
||||
'delivery_view.xml',
|
||||
'sale_view.xml',
|
||||
'stock_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
12
delivery_usability/stock.py
Normal file
12
delivery_usability/stock.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2018 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class StockPicking(models.Model):
|
||||
_inherit = 'stock.picking'
|
||||
|
||||
carrier_id = fields.Many2one(track_visibility='onchange')
|
||||
23
delivery_usability/stock_view.xml
Normal file
23
delivery_usability/stock_view.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="view_picking_withcarrier_out_form" model="ir.ui.view">
|
||||
<field name="name">delivery_usability.stock.picking.form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="delivery.view_picking_withcarrier_out_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="carrier_id" position="attributes">
|
||||
<!-- Sometimes we have to modify carrier_id when state is done
|
||||
so remove readonly when state = done from view and add tracking on_change in
|
||||
field definition -->
|
||||
<attribute name="attrs">{}</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user