Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 5 additions & 5 deletions spreadsheet_oca/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===============
Spreadsheet Oca
===============
Expand All @@ -17,7 +13,7 @@ Spreadsheet Oca
.. |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/license-AGPL--3-blue.png
.. |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-OCA%2Fspreadsheet-lightgray.png?logo=github
Expand Down Expand Up @@ -129,6 +125,10 @@ Contributors

- Chris Mann

- `Mind And Go <https://mind-and-go.com>`__

- Florent THOMAS

Maintainers
-----------

Expand Down
1 change: 1 addition & 0 deletions spreadsheet_oca/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from . import spreadsheet_abstract
from . import spreadsheet_spreadsheet_tag
from . import spreadsheet_spreadsheet
from . import spreadsheet_oca_revision
from . import ir_websocket
Expand Down
1 change: 1 addition & 0 deletions spreadsheet_oca/models/spreadsheet_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class SpreadsheetAbstract(models.AbstractModel):
_inherit = ["bus.listener.mixin"]

name = fields.Char(required=True)
active = fields.Boolean(default=True)
spreadsheet_binary_data = fields.Binary(
string="Spreadsheet file",
default=lambda self: self._empty_spreadsheet_data_base64(),
Expand Down
7 changes: 6 additions & 1 deletion spreadsheet_oca/models/spreadsheet_spreadsheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@

class SpreadsheetSpreadsheet(models.Model):
_name = "spreadsheet.spreadsheet"
_inherit = "spreadsheet.abstract"
_inherit = ["spreadsheet.abstract", "mail.thread", "mail.activity.mixin"]
_description = "Spreadsheet"

filename = fields.Char(compute="_compute_filename")
badge_image = fields.Image("Badge Background", max_width=1024, max_height=1024)
owner_id = fields.Many2one(
"res.users", required=True, default=lambda r: r.env.user.id
)
Expand Down Expand Up @@ -51,6 +52,10 @@ class SpreadsheetSpreadsheet(models.Model):
" if this company is in the current companies.",
)

spreadsheet_tag_ids = fields.Many2many(
string="Tags", comodel_name="spreadsheet.spreadsheet.tag"
)

@api.depends("name")
def _compute_filename(self):
for record in self:
Expand Down
24 changes: 24 additions & 0 deletions spreadsheet_oca/models/spreadsheet_spreadsheet_tag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2022 CreuBlanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from random import randint

from odoo import fields, models


class SpreadsheetSpreadsheetTags(models.Model):
_name = "spreadsheet.spreadsheet.tag"
_description = "Spreadsheet Tag"

def _get_default_color(self):
return randint(1, 11)

name = fields.Char(required=True, translate=True)
color = fields.Integer(
default=_get_default_color,
help="Transparent tags are not visible in the kanban view",
)

_sql_constraints = [
("name_uniq", "unique (name)", "A tag with the same name already exists."),
]
4 changes: 3 additions & 1 deletion spreadsheet_oca/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
- [Tecnativa](https://www.tecnativa.com):
- Carlos Roca
- [Open User Systems](https://www.openusersystems.com):
- Chris Mann
- Chris Mann
- [Mind And Go](https://mind-and-go.com)
- Florent THOMAS
2 changes: 2 additions & 0 deletions spreadsheet_oca/security/ir.model.access.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ access_spreadsheet_oca_revision,access_spreadsheet_oca_revision,model_spreadshee
spreadsheet_oca.access_spreadsheet_spreadsheet_import,access_spreadsheet_spreadsheet_import,spreadsheet_oca.model_spreadsheet_spreadsheet_import,base.group_user,1,1,1,1
access_spreadsheet_import_mode,access_spreadsheet_oca_revision,model_spreadsheet_spreadsheet_import_mode,base.group_user,1,0,0,0
access_spreadsheet_select_row_number,access_spreadsheet_select_row_number,model_spreadsheet_select_row_number,base.group_user,1,1,1,1
access_spreadsheet_spreadsheet_tag,access_spreadsheet_spreadsheet_tag,model_spreadsheet_spreadsheet_tag,spreadsheet_oca.group_user,1,0,0,0
access_spreadsheet_spreadsheet_manager_tag,access_spreadsheet_spreadsheet_manager_tag,model_spreadsheet_spreadsheet_tag,spreadsheet_oca.group_manager,1,1,1,1
45 changes: 20 additions & 25 deletions spreadsheet_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>Spreadsheet Oca</title>
<style type="text/css">

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z 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 @@ -275,7 +274,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: gray; } /* line numbers */
pre.code .ln { color: grey; } /* 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 @@ -301,7 +300,7 @@
span.pre {
white-space: pre }

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

span.section-subtitle {
Expand Down Expand Up @@ -360,21 +359,16 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="spreadsheet-oca">
<h1 class="title">Spreadsheet Oca</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="spreadsheet-oca">
<h1>Spreadsheet Oca</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f8b48998ef7617cf97ee2e3c0daadd27813e81ead8d6075887c2908fab079672
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/spreadsheet/tree/18.0/spreadsheet_oca"><img alt="OCA/spreadsheet" src="https://img.shields.io/badge/github-OCA%2Fspreadsheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_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/spreadsheet&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<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/spreadsheet/tree/18.0/spreadsheet_oca"><img alt="OCA/spreadsheet" src="https://img.shields.io/badge/github-OCA%2Fspreadsheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_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/spreadsheet&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds a functionality for adding and editing Spreadsheets
using Odoo CE.</p>
<p>It is an alternative to the proprietary module <tt class="docutils literal">spreadsheet_edition</tt>
Expand All @@ -397,9 +391,9 @@ <h1>Spreadsheet Oca</h1>
</ul>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<div class="section" id="create-a-new-spreadsheet">
<h3><a class="toc-backref" href="#toc-entry-2"><strong>Create a new spreadsheet</strong></a></h3>
<h2><a class="toc-backref" href="#toc-entry-2"><strong>Create a new spreadsheet</strong></a></h2>
<ul class="simple">
<li>Go to ‘Spreadsheet’ menu</li>
<li>Click on ‘Create’</li>
Expand Down Expand Up @@ -447,29 +441,29 @@ <h3><a class="toc-backref" href="#toc-entry-2"><strong>Create a new spreadsheet<
</div>
</div>
<div class="section" id="development">
<h2><a class="toc-backref" href="#toc-entry-3">Development</a></h2>
<h1><a class="toc-backref" href="#toc-entry-3">Development</a></h1>
<p>If you want to develop custom business functions, you can add others,
based on the file
<a class="reference external" href="https://github.com/odoo/odoo/blob/16.0/addons/spreadsheet_account/static/src/accounting_functions.js">https://github.com/odoo/odoo/blob/16.0/addons/spreadsheet_account/static/src/accounting_functions.js</a></p>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/spreadsheet/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/spreadsheet/issues/new?body=module:%20spreadsheet_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
<h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-6">Authors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
<ul class="simple">
<li>CreuBlanca</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<ul class="simple">
<li>Enric Tobella</li>
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
Expand All @@ -480,14 +474,16 @@ <h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
<li>Chris Mann</li>
</ul>
</li>
<li><a class="reference external" href="https://mind-and-go.com">Mind And Go</a><ul>
<li>Florent THOMAS</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
<h2><a class="toc-backref" href="#toc-entry-8">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 All @@ -496,6 +492,5 @@ <h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
</div>
</div>
</div>
</div>
</body>
</html>
Loading