Skip to content

Commit

Permalink
ADD report_c module
Browse files Browse the repository at this point in the history
  • Loading branch information
bealdav committed Jan 1, 2025
1 parent 13a2ab9 commit d0f9416
Show file tree
Hide file tree
Showing 10 changed files with 535 additions and 0 deletions.
2 changes: 2 additions & 0 deletions optional_c/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"partner_pricelist_search",
"web_environment_ribbon",
"web_favicon",
"web_no_bubble",
"web_tree_many2one_clickable",
],
"installable": True,
}
55 changes: 55 additions & 0 deletions report_c/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
==============
Reports Custom
==============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:15a528ba9d8c399e44827049538255b077d2d16addb29128718a375cdfffc553
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-Akretion%2Fsnjb-lightgray.png?logo=github
:target: https://github.com/Akretion/snjb/tree/18.0/report_c
:alt: Akretion/snjb

|badge1| |badge2| |badge3|

custom reports

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/Akretion/snjb/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/Akretion/snjb/issues/new?body=module:%20report_c%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Akretion

Maintainers
~~~~~~~~~~~

This module is part of the `Akretion/snjb <https://github.com/Akretion/snjb/tree/18.0/report_c>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions report_c/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
13 changes: 13 additions & 0 deletions report_c/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Reports Custom",
"author": "Akretion",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"category": "Reporting",
"depends": [
"base_c",
],
"data": [
"views/sale_rpt.xml",
],
}
1 change: 1 addition & 0 deletions report_c/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale
15 changes: 15 additions & 0 deletions report_c/models/sale.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from odoo import fields, models


class SaleOrder(models.Model):
_inherit = "sale.order"

vendor_phone = fields.Char(compute="_compute_vendor_phone")

def _compute_vendor_phone(self):
for rec in self:
phone = rec.user_id and rec.user_id.mobile or rec.user_id.phone or ""
if phone:
rec.vendor_phone = f" 📞 {phone}"
else:
rec.vendor_phone = False
3 changes: 3 additions & 0 deletions report_c/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions report_c/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom reports
Loading

0 comments on commit d0f9416

Please sign in to comment.