stock_usability: Add product_barcode on orderpoint tree view (optional hide)
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# @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, models
|
from odoo import api, fields, models
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -11,6 +11,8 @@ logger = logging.getLogger(__name__)
|
|||||||
class StockWarehouseOrderpoint(models.Model):
|
class StockWarehouseOrderpoint(models.Model):
|
||||||
_inherit = 'stock.warehouse.orderpoint'
|
_inherit = 'stock.warehouse.orderpoint'
|
||||||
|
|
||||||
|
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _procure_orderpoint_confirm(
|
def _procure_orderpoint_confirm(
|
||||||
self, use_new_cursor=False, company_id=False, raise_user_error=True):
|
self, use_new_cursor=False, company_id=False, raise_user_error=True):
|
||||||
|
|||||||
@@ -22,6 +22,9 @@
|
|||||||
<field name="model">stock.warehouse.orderpoint</field>
|
<field name="model">stock.warehouse.orderpoint</field>
|
||||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable" />
|
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
<field name="product_id" position="after">
|
||||||
|
<field name="product_barcode" optional="hide"/>
|
||||||
|
</field>
|
||||||
<field name="trigger" position="attributes">
|
<field name="trigger" position="attributes">
|
||||||
<attribute name="optional">show</attribute>
|
<attribute name="optional">show</attribute>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
Reference in New Issue
Block a user