Compare commits
2 commits
8b9995526e
...
6125515772
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6125515772 | ||
|
|
f5670906f9 |
2 changed files with 2 additions and 8 deletions
|
|
@ -8,6 +8,7 @@ from odoo import models
|
||||||
|
|
||||||
class StockMoveLine(models.Model):
|
class StockMoveLine(models.Model):
|
||||||
_inherit = "stock.move.line"
|
_inherit = "stock.move.line"
|
||||||
|
_order = "product_categ_id, product_id, picking_partner_id, id"
|
||||||
|
|
||||||
product_categ_id = fields.Many2one(
|
product_categ_id = fields.Many2one(
|
||||||
comodel_name="product.category",
|
comodel_name="product.category",
|
||||||
|
|
@ -17,13 +18,6 @@ class StockMoveLine(models.Model):
|
||||||
readonly=True,
|
readonly=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
product_categ_complete_name = fields.Char(
|
|
||||||
string="Product Category Path",
|
|
||||||
related="product_id.categ_id.complete_name",
|
|
||||||
store=True,
|
|
||||||
readonly=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
product_default_code = fields.Char(
|
product_default_code = fields.Char(
|
||||||
string="Product Code",
|
string="Product Code",
|
||||||
related="product_id.default_code",
|
related="product_id.default_code",
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
<field name="inherit_id" ref="stock_picking_batch.view_move_line_tree"/>
|
<field name="inherit_id" ref="stock_picking_batch.view_move_line_tree"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//list" position="attributes">
|
<xpath expr="//list" position="attributes">
|
||||||
<attribute name="default_order">product_categ_complete_name,product_id,picking_partner_id</attribute>
|
<attribute name="default_order">product_categ_id,product_id,picking_partner_id</attribute>
|
||||||
<attribute name="class">o_batch_move_line_list</attribute>
|
<attribute name="class">o_batch_move_line_list</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='product_id']" position="before">
|
<xpath expr="//field[@name='product_id']" position="before">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue