-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0] [ADD] foodhub_picking_operations #122
base: 16.0
Are you sure you want to change the base?
Conversation
1d111be
to
8e5d42c
Compare
_order = "product_category,product_default_code" | ||
|
||
product_category = fields.Many2one(related="product_id.categ_id", store=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will sort by the id
of the category, not by its name. is it on purpose? otherwise, it should be like this:
_order = "product_category,product_default_code" | |
product_category = fields.Many2one(related="product_id.categ_id", store=True) | |
_order = "product_category_name,product_default_code" | |
product_category_name = fields.Many2one(related="product_id.categ_id.name", store=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory I agree with you, but in practice it works ! checkout out this delivery, on the picking operations, valdibela is sorted last, while it's id is 3 (lower than the id from tierra y liberdad). Unless the sorting is descending ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I will only keep the sorting for move lines, not moves
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad: i just checked, and indeed, odoo does it better than i think: if a many2one field is used in _order
, it will correctly use the ordering of that model, automatically joining with all needed tables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the stock
module, the file is called report_stockpicking_operations.xml
. i think it can be simply named report_picking.xml
, as this is also the name of the report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why _operations
in the module name? suggestion: foodhub_custom_stock_picking
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, dropped the custom because it's useless I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then i think foodhub_stock_picking
is better, because picking
alone is a little strange.
foodhub_picking_operations/reports/report_picking_operations.xml
Outdated
Show resolved
Hide resolved
foodhub_picking_operations/reports/report_picking_operations.xml
Outdated
Show resolved
Hide resolved
Co-authored-by: hugues de keyzer <[email protected]>
Co-authored-by: hugues de keyzer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then i think foodhub_stock_picking
is better, because picking
alone is a little strange.
_order = "product_category,product_default_code" | ||
|
||
product_category = fields.Many2one(related="product_id.categ_id", store=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad: i just checked, and indeed, odoo does it better than i think: if a many2one field is used in _order
, it will correctly use the ordering of that model, automatically joining with all needed tables.
from odoo import fields, models | ||
|
||
|
||
class StockMove(models.Model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class StockMove(models.Model): | |
class StockMoveLine(models.Model): |
# Copyright 2020 Coop IT Easy SCRL fs | ||
# Robin Keunen <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like a copy-pasting: the year, the company name and the contributor are incorrect. as you are changing this, please adopt the reuse syntax:
# Copyright 2020 Coop IT Easy SCRL fs | |
# Robin Keunen <[email protected]> | |
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | |
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | |
# | |
# SPDX-License-Identifier: AGPL-3.0-or-later |
@@ -0,0 +1,14 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing copyright:
{ | |
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | |
# | |
# SPDX-License-Identifier: AGPL-3.0-or-later | |
{ |
@@ -0,0 +1 @@ | |||
from . import models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing copyright:
from . import models | |
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | |
# | |
# SPDX-License-Identifier: AGPL-3.0-or-later | |
from . import models |
@@ -0,0 +1 @@ | |||
from . import stock_move_line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing copyright:
from . import stock_move_line | |
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | |
# | |
# SPDX-License-Identifier: AGPL-3.0-or-later | |
from . import stock_move_line |
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing copyright:
<?xml version="1.0" encoding="utf-8" ?> | |
<odoo> | |
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- | |
SPDX-FileCopyrightText: 2024 Coop IT Easy SC | |
SPDX-License-Identifier: AGPL-3.0-or-later | |
--> | |
<odoo> |
<xpath expr="//div[@name='div_origin']/strong[2]" position="attributes"> | ||
<attribute name="class">invisible</attribute> | ||
</xpath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<xpath expr="//div[@name='div_origin']/strong[2]" position="attributes"> | |
<attribute name="class">invisible</attribute> | |
</xpath> | |
<xpath expr="//div[@name='div_origin']/strong[2]" position="attributes"> | |
<attribute name="invisible">1</attribute> | |
</xpath> |
https://gestion.coopiteasy.be/web#id=12186&action=475&active_id=478&model=project.task&view_type=form&menu_id=536