Compare commits
2 Commits
14.0-remov
...
14.0-fix_s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a69567fdf | ||
|
|
4204c43beb |
@@ -5,7 +5,6 @@
|
||||
from odoo import api, fields, models
|
||||
from odoo.tools import float_is_zero
|
||||
from odoo.tools.misc import format_date
|
||||
from odoo.osv import expression
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
@@ -50,11 +49,11 @@ class AccountMove(models.Model):
|
||||
def _compute_has_attachment(self):
|
||||
iao = self.env['ir.attachment']
|
||||
for move in self:
|
||||
if iao.search_count([
|
||||
if iao.search([
|
||||
('res_model', '=', 'account.move'),
|
||||
('res_id', '=', move.id),
|
||||
('type', '=', 'binary'),
|
||||
('company_id', '=', move.company_id.id)]):
|
||||
('company_id', '=', move.company_id.id)], limit=1):
|
||||
move.has_attachment = True
|
||||
else:
|
||||
move.has_attachment = False
|
||||
@@ -158,24 +157,6 @@ class AccountMove(models.Model):
|
||||
for x in sales]
|
||||
inv.sale_dates = ", ".join(dates)
|
||||
|
||||
# allow to manually create moves not only in general journals,
|
||||
# but also in cash journal and check journals (= bank journals not linked to a bank account)
|
||||
@api.depends('company_id', 'invoice_filter_type_domain')
|
||||
def _compute_suitable_journal_ids(self):
|
||||
for move in self:
|
||||
if move.invoice_filter_type_domain:
|
||||
super(AccountMove, move)._compute_suitable_journal_ids()
|
||||
else:
|
||||
company_id = move.company_id.id or self.env.company.id
|
||||
domain = expression.AND([
|
||||
[('company_id', '=', company_id)],
|
||||
expression.OR([
|
||||
[('type', 'in', ('general', 'cash'))],
|
||||
[('type', '=', 'bank'), ('bank_account_id', '=', False)]
|
||||
])
|
||||
])
|
||||
move.suitable_journal_ids = self.env['account.journal'].search(domain)
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = 'account.move.line'
|
||||
@@ -195,8 +176,6 @@ class AccountMoveLine(models.Model):
|
||||
matched_credit_ids = fields.One2many(string='Partial Reconcile Credit')
|
||||
reconcile_string = fields.Char(
|
||||
compute='_compute_reconcile_string', string='Reconcile', store=True)
|
||||
# for optional display in tree view
|
||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
||||
|
||||
def show_account_move_form(self):
|
||||
self.ensure_one()
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
<field name="matching_number" optional="hide"/>
|
||||
<field name="reconcile_string" optional="show"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='product_id']" position="after">
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -61,36 +58,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_move_line_filter" model="ir.ui.view">
|
||||
<field name="name">account_usability.account_move_line_search</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="unposted" position="before">
|
||||
<filter name="current_year" string="Current Year" domain="[('date', '>=', (context_today().strftime('%Y-01-01'))), ('date', '<=', (context_today().strftime('%Y-12-31')))]"/>
|
||||
<filter name="previous_year" string="Previous Year" domain="[('date', '>=', (context_today() + relativedelta(day=1, month=1, years=-1)).strftime('%Y-%m-%d')), ('date', '<=', (context_today() + relativedelta(day=31, month=12, years=-1)).strftime('%Y-%m-%d'))]"/>
|
||||
<separator/>
|
||||
</filter>
|
||||
<field name="partner_id" position="after">
|
||||
<field name="reconcile_string" />
|
||||
<field name="debit" filter_domain="['|', ('debit', '=', self), ('credit', '=', self)]" string="Debit or Credit"/>
|
||||
</field>
|
||||
<filter name="unreconciled" position="before">
|
||||
<filter name="reconciled" string="Fully Reconciled" domain="[('full_reconcile_id', '!=', False)]"/>
|
||||
</filter>
|
||||
<filter name="unreconciled" position="attributes">
|
||||
<attribute name="string">Unreconciled or Partially Reconciled</attribute>
|
||||
</filter>
|
||||
<!--
|
||||
<field name="name" position="attributes">
|
||||
<attribute name="string">Name or Reference</attribute>
|
||||
</field> -->
|
||||
<field name="partner_id" position="attributes">
|
||||
<attribute name="domain">['|', ('parent_id', '=', False), ('is_company', '=', True)]</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account.action_move_journal_line" model="ir.actions.act_window">
|
||||
<field name="context">{'default_move_type': 'entry', 'view_no_maturity': True}</field>
|
||||
<!-- Remove 'search_default_misc_filter': 1 -->
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
<xpath expr="//field[@name='child_ids']/form//field[@name='title']" position="attributes">
|
||||
<attribute name="attrs"></attribute>
|
||||
</xpath>
|
||||
<!-- Show double VAT partner even when not in editable mode -->
|
||||
<div attrs="{'invisible': [('same_vat_partner_id', '=', False)]}" position="attributes">
|
||||
<attribute name="class">alert alert-warning</attribute>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -10,3 +10,17 @@ class PurchaseOrder(models.Model):
|
||||
|
||||
picking_type_id = fields.Many2one(tracking=True)
|
||||
incoterm_id = fields.Many2one(tracking=True)
|
||||
|
||||
# inherit compute method of the field delivery_partner_id
|
||||
# defined in purchase_usability
|
||||
@api.depends('dest_address_id', 'picking_type_id')
|
||||
def _compute_delivery_partner_id(self):
|
||||
for o in self:
|
||||
delivery_partner_id = False
|
||||
if o.dest_address_id:
|
||||
delivery_partner_id = o.dest_address_id
|
||||
elif (
|
||||
o.picking_type_id.warehouse_id and
|
||||
o.picking_type_id.warehouse_id.partner_id):
|
||||
delivery_partner_id = o.picking_type_id.warehouse_id.partner_id
|
||||
o.delivery_partner_id = delivery_partner_id
|
||||
|
||||
@@ -14,6 +14,15 @@ class PurchaseOrder(models.Model):
|
||||
payment_term_id = fields.Many2one(tracking=True)
|
||||
fiscal_position_id = fields.Many2one(tracking=True)
|
||||
partner_ref = fields.Char(tracking=True)
|
||||
# the field 'delivery_partner_id' is used in report
|
||||
# the compute method of that field is inherited in purchase_stock_usability
|
||||
delivery_partner_id = fields.Many2one(
|
||||
'res.partner', compute='_compute_delivery_partner_id')
|
||||
|
||||
@api.depends('dest_address_id')
|
||||
def _compute_delivery_partner_id(self):
|
||||
for order in self:
|
||||
order.delivery_partner_id = order.dest_address_id
|
||||
|
||||
def print_order(self):
|
||||
report = self.env.ref('purchase.action_report_purchase_order')
|
||||
@@ -62,10 +71,3 @@ class PurchaseOrder(models.Model):
|
||||
# {'subtotal': 8932.23},
|
||||
# ]
|
||||
return res
|
||||
|
||||
|
||||
class PurchaseOrderLine(models.Model):
|
||||
_inherit = 'purchase.order.line'
|
||||
|
||||
# for optional display in tree view
|
||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
<xpath expr="//field[@name='order_line']/form//field[@name='analytic_tag_ids']" position="attributes">
|
||||
<attribute name="groups">analytic.group_analytic_tags</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="after">
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@ class SaleOrder(models.Model):
|
||||
fiscal_position_id = fields.Many2one(tracking=True)
|
||||
# for reports
|
||||
has_discount = fields.Boolean(compute='_compute_has_discount')
|
||||
has_attachment = fields.Boolean(
|
||||
compute='_compute_has_attachment',
|
||||
search='_search_has_attachment')
|
||||
|
||||
@api.depends('order_line.discount')
|
||||
def _compute_has_discount(self):
|
||||
@@ -37,30 +34,6 @@ class SaleOrder(models.Model):
|
||||
break
|
||||
order.has_discount = has_discount
|
||||
|
||||
def _compute_has_attachment(self):
|
||||
iao = self.env['ir.attachment']
|
||||
for order in self:
|
||||
if iao.search_count([
|
||||
('res_model', '=', 'sale.order'),
|
||||
('res_id', '=', order.id),
|
||||
('type', '=', 'binary'),
|
||||
('company_id', '=', order.company_id.id)]):
|
||||
order.has_attachment = True
|
||||
else:
|
||||
order.has_attachment = False
|
||||
|
||||
def _search_has_attachment(self, operator, value):
|
||||
att_order_ids = {}
|
||||
if operator == '=':
|
||||
search_res = self.env['ir.attachment'].search_read([
|
||||
('res_model', '=', 'sale.order'),
|
||||
('type', '=', 'binary'),
|
||||
('res_id', '!=', False)], ['res_id'])
|
||||
for att in search_res:
|
||||
att_order_ids[att['res_id']] = True
|
||||
res = [('id', value and 'in' or 'not in', list(att_order_ids))]
|
||||
return res
|
||||
|
||||
# for report
|
||||
def py3o_lines_layout(self):
|
||||
self.ensure_one()
|
||||
@@ -93,21 +66,27 @@ class SaleOrder(models.Model):
|
||||
class SaleOrderLine(models.Model):
|
||||
_inherit = 'sale.order.line'
|
||||
|
||||
# for optional display in tree view
|
||||
product_barcode = fields.Char(
|
||||
related='product_id.barcode', string="Product Barcode")
|
||||
|
||||
@api.onchange('product_uom', 'product_uom_qty')
|
||||
def product_uom_change(self):
|
||||
# When the user has manually set a custom price
|
||||
# he is often upset when Odoo changes it when he changes the qty
|
||||
# So we add a warning in which we recall the old price.
|
||||
PricelistItem = self.env['product.pricelist.item']
|
||||
res = {}
|
||||
old_price = self.price_unit
|
||||
super().product_uom_change()
|
||||
new_price = self.price_unit
|
||||
pricelist_item = PricelistItem.browse(False)
|
||||
if self.product_id:
|
||||
product_context = dict(self.env.context,
|
||||
partner_id=self.order_id.partner_id.id,
|
||||
date=self.order_id.date_order,
|
||||
uom=self.product_uom.id)
|
||||
price, rule_id = self.order_id.pricelist_id.with_context(
|
||||
product_context).get_product_price_rule(self.product_id, self.product_uom_qty or 1.0, self.order_id.partner_id)
|
||||
pricelist_item = PricelistItem.browse(rule_id)
|
||||
prec = self.env['decimal.precision'].precision_get('Product Price')
|
||||
if float_compare(old_price, new_price, precision_digits=prec):
|
||||
if pricelist_item.base != 'supplierinfo' and float_compare(old_price, new_price, precision_digits=prec):
|
||||
pricelist = self.order_id.pricelist_id
|
||||
res['warning'] = {
|
||||
'title': _('Price updated'),
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
<field name="date_order" position="after">
|
||||
<field name="client_order_ref"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='order_line']/tree/field[@name='product_template_id']" position="after">
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -65,10 +62,6 @@
|
||||
<filter name="order_month" position="after">
|
||||
<filter string="State" name="state_groupby" context="{'group_by': 'state'}"/>
|
||||
</filter>
|
||||
<filter name="activities_upcoming_all" position="after">
|
||||
<separator/>
|
||||
<filter name="no_attachment" string="Missing Attachment" domain="[('has_attachment', '=', False)]"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Akretion France (http://www.akretion.com)
|
||||
# Copyright 2019-2020 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).
|
||||
|
||||
@@ -15,13 +15,14 @@ Stock Account Usability
|
||||
|
||||
The usability enhancements include:
|
||||
|
||||
- show to_refund on stock.move form view
|
||||
NONE
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['stock_account', 'stock_usability'],
|
||||
'data': ['views/stock_move.xml'],
|
||||
'installable': True,
|
||||
'depends': ['stock_account'],
|
||||
'data': [
|
||||
],
|
||||
'installable': False,
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2021 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_move_form" model="ir.ui.view">
|
||||
<field name="name">stock_account_usability.stock.move.form</field>
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock_usability.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="price_unit" position="after">
|
||||
<field name="to_refund" readonly="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
2
stock_account_usability/wizard/__init__.py
Normal file
2
stock_account_usability/wizard/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import stock_return_picking
|
||||
from . import stock_quantity_history
|
||||
@@ -1,2 +1 @@
|
||||
from . import models
|
||||
from .post_install import create_config_parameter_immediate_tranfer
|
||||
|
||||
@@ -38,6 +38,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
||||
'views/procurement_scheduler_log.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'post_init_hook': 'create_config_parameter_immediate_tranfer',
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -5,5 +5,5 @@ from . import stock_warehouse_orderpoint
|
||||
from . import stock_quant
|
||||
from . import procurement_group
|
||||
from . import procurement_scheduler_log
|
||||
from . import product
|
||||
from . import product_template
|
||||
from . import res_partner
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# Copyright 2016-2021 Akretion France
|
||||
# @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 ProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
tracking = fields.Selection(tracking=True)
|
||||
sale_delay = fields.Float(tracking=True)
|
||||
# the 'stock' module adds 'product' in type...
|
||||
# but forgets to make it the default
|
||||
type = fields.Selection(default='product')
|
||||
|
||||
def action_view_stock_move(self):
|
||||
action = self.env.ref('stock.stock_move_action').sudo().read()[0]
|
||||
action['domain'] = [('product_id.product_tmpl_id', 'in', self.ids)]
|
||||
action['context'] = {'search_default_done': True}
|
||||
return action
|
||||
|
||||
|
||||
class ProductProduct(models.Model):
|
||||
_inherit = 'product.product'
|
||||
|
||||
def action_view_stock_move(self):
|
||||
action = self.env.ref('stock.stock_move_action').sudo().read()[0]
|
||||
action['domain'] = [('product_id', 'in', self.ids)]
|
||||
action['context'] = {'search_default_done': True}
|
||||
return action
|
||||
15
stock_usability/models/product_template.py
Normal file
15
stock_usability/models/product_template.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright 2016-2020 Akretion France
|
||||
# @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 ProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
tracking = fields.Selection(tracking=True)
|
||||
sale_delay = fields.Float(tracking=True)
|
||||
# the 'stock' module adds 'product' in type...
|
||||
# but forgets to make it the default
|
||||
type = fields.Selection(default='product')
|
||||
@@ -2,7 +2,7 @@
|
||||
# @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, _
|
||||
from odoo import models, _
|
||||
from odoo.exceptions import UserError
|
||||
import logging
|
||||
|
||||
@@ -12,9 +12,6 @@ logger = logging.getLogger(__name__)
|
||||
class StockMove(models.Model):
|
||||
_inherit = 'stock.move'
|
||||
|
||||
# for optional display in tree view
|
||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
||||
|
||||
# def name_get(self):
|
||||
# '''name_get of stock_move is important for the reservation of the
|
||||
# quants: so want to add the name of the customer and the expected date
|
||||
@@ -40,7 +37,7 @@ class StockMove(models.Model):
|
||||
picking = move.picking_id
|
||||
if picking:
|
||||
product = move.product_id
|
||||
picking.message_post(body=_(
|
||||
picking.message_post(_(
|
||||
"Product <a href=# data-oe-model=product.product "
|
||||
"data-oe-id=%d>%s</a> qty %s %s <b>unreserved</b>")
|
||||
% (product.id, product.display_name,
|
||||
@@ -52,9 +49,6 @@ class StockMove(models.Model):
|
||||
class StockMoveLine(models.Model):
|
||||
_inherit = 'stock.move.line'
|
||||
|
||||
# for optional display in tree view
|
||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
||||
|
||||
# TODO: I think it's not complete
|
||||
def button_do_unreserve(self):
|
||||
for moveline in self:
|
||||
@@ -66,7 +60,7 @@ class StockMoveLine(models.Model):
|
||||
picking = moveline.move_id.picking_id
|
||||
if picking:
|
||||
product = moveline.product_id
|
||||
picking.message_post(body=_(
|
||||
picking.message_post(_(
|
||||
"Product <a href=# data-oe-model=product.product "
|
||||
"data-oe-id=%d>%s</a> qty %s %s <b>unreserved</b>")
|
||||
% (product.id, product.display_name,
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Copyright 2021 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).
|
||||
|
||||
import logging
|
||||
from odoo import SUPERUSER_ID, api
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def create_config_parameter_immediate_tranfer(cr, registry):
|
||||
with api.Environment.manage():
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
ico = env["ir.config_parameter"]
|
||||
conf_param = ico.search([('key', '=', 'stock.no_default_immediate_tranfer')])
|
||||
if not conf_param:
|
||||
ico.create({
|
||||
'key': 'stock.no_default_immediate_tranfer',
|
||||
'value': 'True',
|
||||
})
|
||||
logger.info(
|
||||
'ir.config_parameter stock.no_default_immediate_tranfer created')
|
||||
else:
|
||||
logger.info(
|
||||
'ir.config_parameter stock.no_default_immediate_tranfer '
|
||||
'already exists')
|
||||
@@ -19,38 +19,5 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_form_view_procurement_button" model="ir.ui.view">
|
||||
<field name="name">stock_usability.product.template.form</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_view_stock_move_lines" position="before">
|
||||
<button string="Stock Moves"
|
||||
type="object"
|
||||
name= "action_view_stock_move"
|
||||
attrs="{'invisible': [('type', 'not in', ('product', 'consu'))]}"
|
||||
groups="stock.group_stock_user"
|
||||
class="oe_stat_button" icon="fa-exchange"
|
||||
/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_form_view_procurement_button" model="ir.ui.view">
|
||||
<field name="name">stock_usability.product.product.form</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_view_stock_move_lines" position="before">
|
||||
<button string="Stock Moves"
|
||||
type="object"
|
||||
name= "action_view_stock_move"
|
||||
attrs="{'invisible': [('type', 'not in', ('product', 'consu'))]}"
|
||||
groups="stock.group_stock_user"
|
||||
class="oe_stat_button" icon="fa-exchange"
|
||||
/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
<attribute name="decoration-info">product_qty > theoretical_qty</attribute>
|
||||
<attribute name="decoration-danger">product_qty < theoretical_qty</attribute>
|
||||
</tree>
|
||||
<field name="location_id" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -58,9 +58,6 @@
|
||||
states="partially_available,assigned"
|
||||
icon="fa-ban"/>
|
||||
</field>
|
||||
<field name="product_id" position="after">
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -81,20 +78,6 @@
|
||||
states="partially_available,assigned"
|
||||
icon="fa-ban"/>
|
||||
</field>
|
||||
<field name="product_id" position="after">
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- View embedded in picking -->
|
||||
<record id="view_stock_move_line_detailed_operation_tree" model="ir.ui.view">
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="after">
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -30,12 +30,9 @@
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='location_id']" position="replace"/>
|
||||
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='location_dest_id']" position="replace"/>
|
||||
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='name']" position="replace"/>
|
||||
<xpath expr="//field[@name='move_ids_without_package']/tree/field[@name='product_id']" position="after">
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
<field name="name" optional="hide"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" optional="show"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" optional="show"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='move_ids_without_package']/tree/button[@name='action_assign_serial']" position="after">
|
||||
<button type="object" name="button_do_unreserve" string="Unreserve"
|
||||
@@ -43,6 +40,15 @@
|
||||
states="partially_available,assigned"
|
||||
icon="fa-ban"/>
|
||||
</xpath>
|
||||
<!-- STOCK MOVE LINE -->
|
||||
<!--
|
||||
<xpath expr="//field[@name='move_line_ids_without_package']/tree/field[@name='location_id']" position="attributes">
|
||||
<attribute name="attrs">{}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='move_line_ids_without_package']/tree/field[@name='location_dest_id']" position="attributes">
|
||||
<attribute name="attrs">{}</attribute>
|
||||
</xpath>
|
||||
-->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user