Compare commits
No commits in common. "612551577253eb8dd378e28a2e2908809143203b" and "8b9995526e17f10f72a99e97505debd61c7bfabf" have entirely different histories.
6125515772
...
8b9995526e
2 changed files with 8 additions and 2 deletions
|
|
@ -8,7 +8,6 @@ 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",
|
||||||
|
|
@ -18,6 +17,13 @@ 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_id,product_id,picking_partner_id</attribute>
|
<attribute name="default_order">product_categ_complete_name,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