Skip to content

Commit

Permalink
[IMP]sale_subscription_views:add graph and pivot view
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 16, 2024
1 parent c71c9e7 commit 242f249
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
3 changes: 2 additions & 1 deletion subscription_oca/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Subscription management
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7f85e1d860d2d5332db014c46c57b9bece8f76a849049bda632499d422ba6dd8
!! source digest: sha256:d716d20a1c312963f761974a2718d705b0dd8be880331f236a0c6013597bda41
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -81,6 +81,7 @@ Contributors

* Carlos Martínez <[email protected]>
* Carolina Ferrer <[email protected]>
* Germán López <[email protected]>


* `Ooops404 <https://www.ooops404.com>`__:
Expand Down
1 change: 1 addition & 0 deletions subscription_oca/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* Carlos Martínez <[email protected]>
* Carolina Ferrer <[email protected]>
* Germán López <[email protected]>


* `Ooops404 <https://www.ooops404.com>`__:
Expand Down
15 changes: 10 additions & 5 deletions subscription_oca/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -8,10 +9,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +276,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +302,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -366,7 +368,7 @@ <h1 class="title">Subscription management</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7f85e1d860d2d5332db014c46c57b9bece8f76a849049bda632499d422ba6dd8
!! source digest: sha256:d716d20a1c312963f761974a2718d705b0dd8be880331f236a0c6013597bda41
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/contract/tree/16.0/subscription_oca"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-subscription_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/contract&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows creating subscriptions that generate recurring invoices or orders. It also enables the sale of products that generate subscriptions.</p>
Expand Down Expand Up @@ -429,6 +431,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul class="simple">
<li>Carlos Martínez &lt;<a class="reference external" href="mailto:carlos&#64;domatix.com">carlos&#64;domatix.com</a>&gt;</li>
<li>Carolina Ferrer &lt;<a class="reference external" href="mailto:carolina&#64;domatix.com">carolina&#64;domatix.com</a>&gt;</li>
<li>Germán López &lt;<a class="reference external" href="mailto:german&#64;domatix.com">german&#64;domatix.com</a>&gt;</li>
<li><a class="reference external" href="https://www.ooops404.com">Ooops404</a>:<ul>
<li>Ilyas &lt;<a class="reference external" href="mailto:irazor147&#64;gmail.com">irazor147&#64;gmail.com</a>&gt;</li>
</ul>
Expand All @@ -438,7 +441,9 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
Expand Down
25 changes: 24 additions & 1 deletion subscription_oca/views/sale_subscription_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,29 @@
</field>
</record>

<record id="sale_subscription_pivot" model="ir.ui.view">
<field name="name">sale.subscription.pivot</field>
<field name="model">sale.subscription</field>
<field name="arch" type="xml">
<pivot string="Subscription OCA Pivot">
<field name="date_order" type="row" />
<field name="stage_id" type="col" />
<field name="amount_total" type="measure" />
</pivot>
</field>
</record>

<record id="sale_subscription_graph" model="ir.ui.view">
<field name="name">sale.subscription.graph</field>
<field name="model">sale.subscription</field>
<field name="arch" type="xml">
<graph string="Subscription OCA Graph">
<field name="partner_id" />
<field name="amount_total" type="measure" />
</graph>
</field>
</record>

<record id="view_sale_order_pending_filter" model="ir.ui.view">
<field name="name">sale.order.pending.filter</field>
<field name="model">sale.subscription</field>
Expand Down Expand Up @@ -414,7 +437,7 @@
<record id="sale_subscription_action" model="ir.actions.act_window">
<field name="name">Subscriptions</field>
<field name="res_model">sale.subscription</field>
<field name="view_mode">tree,kanban,form</field>
<field name="view_mode">tree,kanban,form,pivot,graph</field>
</record>

<record id="subscription_product_template_action" model="ir.actions.act_window">
Expand Down

0 comments on commit 242f249

Please sign in to comment.