Skip to content

Commit

Permalink
Merge PR #398 into 13.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Mar 10, 2021
2 parents 92736b6 + 896f04b commit 590f98c
Show file tree
Hide file tree
Showing 19 changed files with 838 additions and 0 deletions.
92 changes: 92 additions & 0 deletions agreement_sale/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
==============
Agreement Sale
==============

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-OCA%2Fcontract-lightgray.png?logo=github
:target: https://github.com/OCA/contract/tree/12.0/agreement_sale
:alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_sale
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/110/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds *Agreement* field to Sales Orders

**Table of contents**

.. contents::
:local:

Known issues / Roadmap
======================

Features to evaluate before implementation

* add smart button on agreement to access implied sales
* add module agreement_account: agreement_sale'll depends on it

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20agreement_sale%0Aversion:%2012.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

Contributors
~~~~~~~~~~~~

* Alexis de Lattre <[email protected]>

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

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via
.. |maintainer-bealdav| image:: https://github.com/bealdav.png?size=40px
:target: https://github.com/bealdav
:alt: bealdav

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via| |maintainer-bealdav|

This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/12.0/agreement_sale>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions agreement_sale/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions agreement_sale/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# © 2017 Akretion (Alexis de Lattre <[email protected]>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Agreement Sale",
"summary": "Agreement on sales",
"version": "13.0.1.0.0",
"category": "Contract",
"author": "Akretion, " "Odoo Community Association (OCA)",
"website": "https://github.com/oca/contract",
"license": "AGPL-3",
"depends": ["sale_management", "agreement"],
"data": [
"security/ir.model.access.csv",
"views/agreement.xml",
"views/sale_order.xml",
"views/res_config_settings.xml",
],
"development_status": "Beta",
"maintainers": ["alexis-via", "bealdav"],
"installable": True,
}
65 changes: 65 additions & 0 deletions agreement_sale/i18n/agreement_sale.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * agreement_sale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: agreement_sale
#: model:ir.model.fields,field_description:agreement_sale.field_sale_order__agreement_id
msgid "Agreement"
msgstr ""

#. module: agreement_sale
#: model:ir.model.fields,field_description:agreement_sale.field_sale_order__agreement_type_id
msgid "Agreement Type"
msgstr ""

#. module: agreement_sale
#: model_terms:ir.ui.view,arch_db:agreement_sale.res_config_settings_view_form
msgid "Agreement types"
msgstr ""

#. module: agreement_sale
#: model_terms:ir.ui.view,arch_db:agreement_sale.res_config_settings_view_form
msgid "Agreements"
msgstr ""

#. module: agreement_sale
#: model:ir.model,name:agreement_sale.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: agreement_sale
#: model_terms:ir.ui.view,arch_db:agreement_sale.res_config_settings_view_form
msgid "Have a special kind of agreements which act as templates"
msgstr ""

#. module: agreement_sale
#: model_terms:ir.ui.view,arch_db:agreement_sale.res_config_settings_view_form
msgid "Manage agreements by types"
msgstr ""

#. module: agreement_sale
#: model:ir.model,name:agreement_sale.model_sale_order
msgid "Sale Order"
msgstr ""

#. module: agreement_sale
#: model:ir.model.fields,field_description:agreement_sale.field_res_config_settings__group_use_agreement_template
msgid "Use agreement template"
msgstr ""

#. module: agreement_sale
#: model:ir.model.fields,field_description:agreement_sale.field_res_config_settings__group_use_agreement_type
msgid "Use agreement types"
msgstr ""

73 changes: 73 additions & 0 deletions agreement_sale/i18n/zh_CN.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * agreement_sale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-09-04 18:23+0000\n"
"Last-Translator: 黎伟杰 <[email protected]>\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\n"

#. module: agreement_sale
#: model:ir.model.fields,field_description:agreement_sale.field_sale_order__agreement_id
msgid "Agreement"
msgstr "协议"

#. module: agreement_sale
#: model:ir.model.fields,field_description:agreement_sale.field_sale_order__agreement_type_id
#, fuzzy
#| msgid "Agreement"
msgid "Agreement Type"
msgstr "协议"

#. module: agreement_sale
#: model_terms:ir.ui.view,arch_db:agreement_sale.res_config_settings_view_form
#, fuzzy
#| msgid "Agreement"
msgid "Agreement types"
msgstr "协议"

#. module: agreement_sale
#: model_terms:ir.ui.view,arch_db:agreement_sale.res_config_settings_view_form
#, fuzzy
#| msgid "Agreement"
msgid "Agreements"
msgstr "协议"

#. module: agreement_sale
#: model:ir.model,name:agreement_sale.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: agreement_sale
#: model_terms:ir.ui.view,arch_db:agreement_sale.res_config_settings_view_form
msgid "Have a special kind of agreements which act as templates"
msgstr ""

#. module: agreement_sale
#: model_terms:ir.ui.view,arch_db:agreement_sale.res_config_settings_view_form
msgid "Manage agreements by types"
msgstr ""

#. module: agreement_sale
#: model:ir.model,name:agreement_sale.model_sale_order
msgid "Sale Order"
msgstr "销售订单"

#. module: agreement_sale
#: model:ir.model.fields,field_description:agreement_sale.field_res_config_settings__group_use_agreement_template
msgid "Use agreement template"
msgstr ""

#. module: agreement_sale
#: model:ir.model.fields,field_description:agreement_sale.field_res_config_settings__group_use_agreement_type
msgid "Use agreement types"
msgstr ""
2 changes: 2 additions & 0 deletions agreement_sale/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import sale
from . import res_config_settings
12 changes: 12 additions & 0 deletions agreement_sale/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from odoo import fields, models


class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

group_use_agreement_type = fields.Boolean(
"Use agreement types", implied_group="agreement.group_use_agreement_type"
)
group_use_agreement_template = fields.Boolean(
"Use agreement template", implied_group="agreement.group_use_agreement_template"
)
29 changes: 29 additions & 0 deletions agreement_sale/models/sale.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# © 2017 Akretion (Alexis de Lattre <[email protected]>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


from odoo import fields, models


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

agreement_id = fields.Many2one(
comodel_name="agreement",
string="Agreement",
ondelete="restrict",
track_visibility="onchange",
readonly=True,
copy=False,
states={"draft": [("readonly", False)], "sent": [("readonly", False)]},
)

agreement_type_id = fields.Many2one(
comodel_name="agreement.type",
string="Agreement Type",
ondelete="restrict",
track_visibility="onchange",
readonly=True,
copy=True,
states={"draft": [("readonly", False)], "sent": [("readonly", False)]},
)
1 change: 1 addition & 0 deletions agreement_sale/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Alexis de Lattre <[email protected]>
1 change: 1 addition & 0 deletions agreement_sale/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module adds *Agreement* field to Sales Orders
4 changes: 4 additions & 0 deletions agreement_sale/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Features to evaluate before implementation

* add smart button on agreement to access implied sales
* add module agreement_account: agreement_sale'll depends on it
4 changes: 4 additions & 0 deletions agreement_sale/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
agreement.access_agreement_full,Full access on agreement grp,agreement.model_agreement,sales_team.group_sale_manager,1,1,1,1
agreement_sale.access_agreement_type_full,Full access on agreement type grp,agreement.model_agreement_type,sales_team.group_sale_manager,1,1,1,1
agreement_sale.access_agreement_type_read,Read access on agreement grp,agreement.model_agreement_type,base.group_user,1,0,0,0
Binary file added agreement_sale/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 590f98c

Please sign in to comment.