Skip to content
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

[14.0][ADD] purchase_report_date_planned #215

Open
wants to merge 4 commits into
base: 14.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions purchase_report_date_planned/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions purchase_report_date_planned/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2024 Akretion (https://www.akretion.com).
# @author Mathieu Delva <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Report Date Planned",
"version": "14.0.1.1.0",
"author": "Akretion ,Odoo Community Association (OCA)",
"maintainers": ["mathieudelva"],
"website": "https://github.com/OCA/purchase-workflow",
"category": "Purchase",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"purchase_usability",
],
"data": [
"views/purchase_report.xml",
],
}
1 change: 1 addition & 0 deletions purchase_report_date_planned/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import purchase_report
15 changes: 15 additions & 0 deletions purchase_report_date_planned/models/purchase_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from odoo import fields, models


class PurchaseReport(models.Model):
_inherit = "purchase.report"

date_planned = fields.Datetime(store=True)

def _select(self):
select_str = super(PurchaseReport, self)._select()
bealdav marked this conversation as resolved.
Show resolved Hide resolved
return select_str + ", l.date_planned as date_planned"

def _group_by(self):
group_by_str = super(PurchaseReport, self)._group_by()
return group_by_str + ", l.date_planned"
1 change: 1 addition & 0 deletions purchase_report_date_planned/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Mathieu Delva <[email protected]>
1 change: 1 addition & 0 deletions purchase_report_date_planned/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module add the field date_planned on purchase report model, purchase report tree view and add a filter that allows you to display orders that are late for delivery
Loading