diff --git a/agreement_sale/README.rst b/agreement_sale/README.rst new file mode 100644 index 00000000..c73fc7ed --- /dev/null +++ b/agreement_sale/README.rst @@ -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 `_. +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Akretion + +Contributors +~~~~~~~~~~~~ + +* Alexis de Lattre + +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 `__: + +|maintainer-alexis-via| |maintainer-bealdav| + +This module is part of the `OCA/contract `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/agreement_sale/__init__.py b/agreement_sale/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/agreement_sale/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/agreement_sale/__manifest__.py b/agreement_sale/__manifest__.py new file mode 100644 index 00000000..e186f0f0 --- /dev/null +++ b/agreement_sale/__manifest__.py @@ -0,0 +1,28 @@ +# © 2017 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Agreement Sale', + 'summary': "Agreement on sales", + 'version': '12.0.1.0.0', + 'category': 'Contract', + 'author': 'Akretion, ' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/oca/contract', + 'license': 'AGPL-3', + 'depends': [ + 'sale', + 'agreement', + ], + 'data': [ + 'security/ir.model.access.csv', + 'views/agreement.xml', + ], + 'demo': [], + 'development_status': 'Beta', + 'maintainers': [ + 'alexis-via', + 'bealdav', + ], + 'installable': True, +} diff --git a/agreement_sale/models/__init__.py b/agreement_sale/models/__init__.py new file mode 100644 index 00000000..8a0dc04e --- /dev/null +++ b/agreement_sale/models/__init__.py @@ -0,0 +1 @@ +from . import sale diff --git a/agreement_sale/models/sale.py b/agreement_sale/models/sale.py new file mode 100644 index 00000000..f78bd4ae --- /dev/null +++ b/agreement_sale/models/sale.py @@ -0,0 +1,14 @@ +# © 2017 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from odoo import models, fields + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + agreement_id = fields.Many2one( + comodel_name='agreement', string='Agreement', ondelete='restrict', + track_visibility='onchange', readonly=True, + states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}) diff --git a/agreement_sale/readme/CONTRIBUTORS.rst b/agreement_sale/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..ff65d68c --- /dev/null +++ b/agreement_sale/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Alexis de Lattre diff --git a/agreement_sale/readme/DESCRIPTION.rst b/agreement_sale/readme/DESCRIPTION.rst new file mode 100644 index 00000000..3f041755 --- /dev/null +++ b/agreement_sale/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds *Agreement* field to Sales Orders diff --git a/agreement_sale/readme/ROADMAP.rst b/agreement_sale/readme/ROADMAP.rst new file mode 100644 index 00000000..1edf6e09 --- /dev/null +++ b/agreement_sale/readme/ROADMAP.rst @@ -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 diff --git a/agreement_sale/security/ir.model.access.csv b/agreement_sale/security/ir.model.access.csv new file mode 100644 index 00000000..89ad9808 --- /dev/null +++ b/agreement_sale/security/ir.model.access.csv @@ -0,0 +1,2 @@ +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 \ No newline at end of file diff --git a/agreement_sale/static/description/icon.png b/agreement_sale/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/agreement_sale/static/description/icon.png differ diff --git a/agreement_sale/static/description/index.html b/agreement_sale/static/description/index.html new file mode 100644 index 00000000..304bdb8e --- /dev/null +++ b/agreement_sale/static/description/index.html @@ -0,0 +1,430 @@ + + + + + + +Agreement Sale + + + +
+

Agreement Sale

+ + +

Beta License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runbot

+

This module adds Agreement field to Sales Orders

+

Table of contents

+ +
+

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. +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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

Current maintainers:

+

alexis-via bealdav

+

This module is part of the OCA/contract project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/agreement_sale/views/agreement.xml b/agreement_sale/views/agreement.xml new file mode 100644 index 00000000..43a2ea5d --- /dev/null +++ b/agreement_sale/views/agreement.xml @@ -0,0 +1,8 @@ + + + + + + +