From 1fab2daecaaa4e2fd3f276abb429d036b426649f Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Thu, 10 Jan 2019 09:35:34 -0600 Subject: [PATCH 01/11] [ADD] agreement_sale --- agreement_sale/README.rst | 130 +++++++++++++++++++++ agreement_sale/__init__.py | 3 + agreement_sale/__manifest__.py | 26 +++++ agreement_sale/models/__init__.py | 6 + agreement_sale/models/agreement.py | 10 ++ agreement_sale/models/sale_order.py | 49 ++++++++ agreement_sale/readme/CONFIGURE.rst | 6 + agreement_sale/readme/CONTRIBUTORS.rst | 2 + agreement_sale/readme/CREDITS.rst | 4 + agreement_sale/readme/DESCRIPTION.rst | 5 + agreement_sale/readme/ROADMAP.rst | 1 + agreement_sale/readme/USAGE.rst | 14 +++ agreement_sale/static/description/icon.png | Bin 0 -> 6755 bytes agreement_sale/views/agreement.xml | 25 ++++ agreement_sale/views/sale_order.xml | 23 ++++ 15 files changed, 304 insertions(+) create mode 100644 agreement_sale/README.rst create mode 100644 agreement_sale/__init__.py create mode 100644 agreement_sale/__manifest__.py create mode 100644 agreement_sale/models/__init__.py create mode 100644 agreement_sale/models/agreement.py create mode 100644 agreement_sale/models/sale_order.py create mode 100644 agreement_sale/readme/CONFIGURE.rst create mode 100644 agreement_sale/readme/CONTRIBUTORS.rst create mode 100644 agreement_sale/readme/CREDITS.rst create mode 100644 agreement_sale/readme/DESCRIPTION.rst create mode 100644 agreement_sale/readme/ROADMAP.rst create mode 100644 agreement_sale/readme/USAGE.rst create mode 100644 agreement_sale/static/description/icon.png create mode 100644 agreement_sale/views/agreement.xml create mode 100644 agreement_sale/views/sale_order.xml diff --git a/agreement_sale/README.rst b/agreement_sale/README.rst new file mode 100644 index 00000000..4509bf13 --- /dev/null +++ b/agreement_sale/README.rst @@ -0,0 +1,130 @@ +========== +Agreements +========== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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/11.0/agreement + :alt: OCA/contract +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement + :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/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to manage agreements, letter of intent and contract content. +The module is meant to be used by the legal team of a company and to allow them +to define sections, clauses and templates with their respective content that can +be dynamic. + +Based on the template, an agreement can be created and the pdf document generated. + +The agreement would go through a workflow to finally become a contract with the +customer signature. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure this module: + +* Go to Agreement > Configuration > Templates +* Create a new template with sections and clauses and their respective content +* Go to Agreement > Configuration > Stages +* Create and reorder stages to match your process + +Usage +===== + +To use this module: + +* Go to Agreement > Agrements +* Create a new agreement +* Select a template +* Follow the process to get the required approval +* Send the invitation to the customer to review and sign the agreement + +Known issues / Roadmap +====================== + +* Split the module to remove the dependencies on sale and account and provide + the same feature in extra modules (agreement_sale, agreement_account, + agreement_purchase) + +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 +~~~~~~~ + +* Pavlov Media +* Open Source Integrators + +Contributors +~~~~~~~~~~~~ + +* Patrick Wilson +* Bhavesh Odedra +* Wolfgang Hall +* Maxime Chambreuil +* Sandip Mangukiya + +Other credits +~~~~~~~~~~~~~ + +The development of this module has been financially supported by: + +* Pavlov Media +* Open Source Integrators + +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-max3903| image:: https://github.com/max3903.png?size=40px + :target: https://github.com/max3903 + :alt: max3903 + +Current `maintainer `__: + +|maintainer-max3903| + +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..7fab5e1c --- /dev/null +++ b/agreement_sale/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import models diff --git a/agreement_sale/__manifest__.py b/agreement_sale/__manifest__.py new file mode 100644 index 00000000..bb7b0ac2 --- /dev/null +++ b/agreement_sale/__manifest__.py @@ -0,0 +1,26 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +{ + 'name': 'Agreement - Sale', + 'summary': 'Create an agreement when the sales order is confirmed', + 'version': '11.0.0.0.1', + 'license': 'AGPL-3', + 'author': 'Open Source Integrators, Odoo Community Association (OCA)', + 'category': 'Agreement', + 'website': 'https://github.com/OCA/contract', + 'depends': [ + 'agreement', + 'sale', + ], + 'data': [ + 'views/agreement.xml', + 'views/sale_order.xml' + ], + 'installable': True, + 'development_status': 'Beta', + 'maintainers': [ + 'osi-scampbell', + 'max3903', + ], +} diff --git a/agreement_sale/models/__init__.py b/agreement_sale/models/__init__.py new file mode 100644 index 00000000..87270557 --- /dev/null +++ b/agreement_sale/models/__init__.py @@ -0,0 +1,6 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import ( + sale_order, + agreement, +) diff --git a/agreement_sale/models/agreement.py b/agreement_sale/models/agreement.py new file mode 100644 index 00000000..157fc158 --- /dev/null +++ b/agreement_sale/models/agreement.py @@ -0,0 +1,10 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class Agreement(models.Model): + _inherit = 'agreement' + + sale_id = fields.Many2one('sale.order', string='Sales Order') diff --git a/agreement_sale/models/sale_order.py b/agreement_sale/models/sale_order.py new file mode 100644 index 00000000..e0ae0706 --- /dev/null +++ b/agreement_sale/models/sale_order.py @@ -0,0 +1,49 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import api, fields, models + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + agreement_template_id = fields.Many2one( + 'agreement', + string="Agreement Template", + domain="[('is_template', '=', True)]") + agreement_id = fields.Many2one('agreement', string="Agreement") + + @api.multi + def _action_confirm(self): + res = super(SaleOrder, self)._action_confirm() + for order in self: + if order.agreement_template_id: + order.agreement_id = order.agreement_template_id.copy(default={ + 'name': order.name, + 'is_template': False, + 'sale_id': order.id, + 'partner_id': order.partner_id.id, + 'analytic_account_id': + order.analytic_account_id and + order.analytic_account_id.id or False, + }) + for line in self.order_line: + # Create agreement line + self.env['agreement.line'].create({ + 'product_id': line.product_id.id, + 'name': line.name, + 'agreement_id': order.agreement_id.id, + 'qty': line.product_uom_qty, + 'sale_line_id': line.id, + 'uom_id': line.product_uom.id + }) + # If the product sold has a BOM, create a service profile + bom = self.env['mrp.bom'].search( + [('product_tmpl_id', '=', + line.product_id.product_tmpl_id.id)]) + if bom: + self.env['agreement.serviceprofile'].create({ + 'name': line.name, + 'agreement_id': order.agreement_id.id, + }) + return res diff --git a/agreement_sale/readme/CONFIGURE.rst b/agreement_sale/readme/CONFIGURE.rst new file mode 100644 index 00000000..3871fc34 --- /dev/null +++ b/agreement_sale/readme/CONFIGURE.rst @@ -0,0 +1,6 @@ +To configure this module: + +* Go to Agreement > Configuration > Templates +* Create a new template with sections and clauses and their respective content +* Go to Agreement > Configuration > Stages +* Create and reorder stages to match your process diff --git a/agreement_sale/readme/CONTRIBUTORS.rst b/agreement_sale/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..db3894ee --- /dev/null +++ b/agreement_sale/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Steven Campbell +* Maxime Chambreuil diff --git a/agreement_sale/readme/CREDITS.rst b/agreement_sale/readme/CREDITS.rst new file mode 100644 index 00000000..0543afe7 --- /dev/null +++ b/agreement_sale/readme/CREDITS.rst @@ -0,0 +1,4 @@ +The development of this module has been financially supported by: + +* Pavlov Media +* Open Source Integrators diff --git a/agreement_sale/readme/DESCRIPTION.rst b/agreement_sale/readme/DESCRIPTION.rst new file mode 100644 index 00000000..642b7de2 --- /dev/null +++ b/agreement_sale/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +Odoo Sales App does not support the management of legal content for agreements +and contracts. It's also not integrated with the Agreement App. + +This module is for companies that needs their customer to sign an agreement +with all the legal information based on the selected agreement template. diff --git a/agreement_sale/readme/ROADMAP.rst b/agreement_sale/readme/ROADMAP.rst new file mode 100644 index 00000000..294d0acd --- /dev/null +++ b/agreement_sale/readme/ROADMAP.rst @@ -0,0 +1 @@ +The roadmap is documented on https://github.com/OCA/contract/issues. \ No newline at end of file diff --git a/agreement_sale/readme/USAGE.rst b/agreement_sale/readme/USAGE.rst new file mode 100644 index 00000000..259af0b9 --- /dev/null +++ b/agreement_sale/readme/USAGE.rst @@ -0,0 +1,14 @@ +To use this module: + +* Go to Sales +* Create or select a quotation +* Set the agreement template and add some products +* Confirm the quotation. An agreement is created and linked to the sales order: + + * the agreement template is copied into an agreement with a copy of the + sections, clauses, recitals and appendices + * all the sales order lines are added as agreement lines + * the products on the SO with BOM are added as service profile on the agreement + * the customer information is set from the sales order + * the eventual analytic account linked to the sales order is set on the agreement + * the agreement is linked to the sales order and vice versa diff --git a/agreement_sale/static/description/icon.png b/agreement_sale/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..23ce93135053c48a74469807879f2805b12382ad GIT binary patch literal 6755 zcmV-p8l2^cP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vG&=l}pD=mCOb1snhX8Td&=K~#8N-CKFQ zBvp0(s=Io9`)n{X!YCjrLL4@uLLx?^7>Nlg;0OWKpNe}Tf-$lvB8s2}{h8qK3&9P6 zA)<*}0!9po;{xiS0)rw5Gt55ky?(Ek>Z-1M-??>PSHF1!0kiLh2wasDW7Mv0M0u zAiRJ^rHqA4zG5Ljk*y(xm+2{|26%Krt8`xQhXRsC)@DI(@bcpppYg!>v;++1pP(b zB62H-0kN3ksaS zR}aWD)l0;!XGCohU_SQS-CoR|NhIdH`PiGAGavhN=hn!rHy`_k8N??N6qOqcfEdVw zYK|$D#GZf7Gu%fHdYr?({Mo+@_XY!NOCXPXgWMR+(PN&k`H&?-_G#d?mP(6sE#^fQ20q0-8j1dCw}k zkNIsfAY={-+|HERRq|lXT!gdv#KlNdZY2*$l4K6eI%=noM#Knb7R#__Ub83iBR9sa zFLdiVCFRHD>9SKnDWkpcn%?@EO&5gVpby@rj9@?sHi^Q-qQSKUjyWwxW|ca#UuB0u zRG>iA2Tk&I&2eY0T1Cbf)pL%s{Ilq|(Hd)o!Q4DO^FtI$#ekTn?LZ?-MFvJyxORb_ z>t+tZ9t!Y8RHmF5#}bqqAx+Q;hf(QH(*?Vjj4BulV;sJs&UBLV$q{GRIwmk5wUTaI zPKj<^&w^?pE1F~K3_{l~y0WhELE1URYE6NS;p8;#;^$jB*xl)2=}?K=p}@_W(I;w+ zfU*gTRDkHrhv0w@`Rni?$knwyx?Sx)Em}l5YM@yh!_LMGKJX_)IODm?c{&tPQ6zQr zD6zX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!flKaQ@u9aDx3+q{^aUN|P z(adDlAp^=S6kt`xZoZ+OJ^D6V+pS@*p;B*!1Qrt*G`%M}58wz5vH-@4Tto(AicN#)*iZ~mu;Cdk z)Xj^Q)v@V!mIvEw^UyT!=aR5T`%b|WCdK#B+?GNKxxj+x`wdk$;^Nm1$4qMH8M-N^ zl0gBIt{&SlPM&0JodR0G5#~Ha{~TDLQlFVosJi|Qj(aSywHJT^&zJ||$;!Qu+1uQK z@iH8ZotBskyO+;?2zG`Ek5i zvg+&nlgn#KZ+$6E?+eZC%}qsz9U5e4ooq9$s&r_58NvK`17FFZmdPtYgbn#DvgT#> z=cX7@Ln)9&hOY2*`>1yDC3zL)J=%Qst5nT^)&7 + + + + + + agreement.form.view + agreement + + + + + + + + + + + + + + + + diff --git a/agreement_sale/views/sale_order.xml b/agreement_sale/views/sale_order.xml new file mode 100644 index 00000000..f598f3b3 --- /dev/null +++ b/agreement_sale/views/sale_order.xml @@ -0,0 +1,23 @@ + + + + + + + sale.order.agreement.form.view + sale.order + + + + + + + + + + + + From a9ce414c8b08235fc5c796e164bb50b028e27e65 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 10 Jan 2019 18:11:35 +0000 Subject: [PATCH 02/11] [UPD] README.rst --- agreement_sale/README.rst | 60 +-- agreement_sale/static/description/index.html | 470 +++++++++++++++++++ 2 files changed, 500 insertions(+), 30 deletions(-) create mode 100644 agreement_sale/static/description/index.html diff --git a/agreement_sale/README.rst b/agreement_sale/README.rst index 4509bf13..3dff350e 100644 --- a/agreement_sale/README.rst +++ b/agreement_sale/README.rst @@ -1,6 +1,6 @@ -========== -Agreements -========== +================ +Agreement - Sale +================ .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! @@ -14,10 +14,10 @@ Agreements :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/11.0/agreement + :target: https://github.com/OCA/contract/tree/11.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-11-0/contract-11-0-agreement + :target: https://translation.odoo-community.org/projects/contract-11-0/contract-11-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/11.0 @@ -25,15 +25,11 @@ Agreements |badge1| |badge2| |badge3| |badge4| |badge5| -This module allows you to manage agreements, letter of intent and contract content. -The module is meant to be used by the legal team of a company and to allow them -to define sections, clauses and templates with their respective content that can -be dynamic. +Odoo Sales App does not support the management of legal content for agreements +and contracts. It's also not integrated with the Agreement App. -Based on the template, an agreement can be created and the pdf document generated. - -The agreement would go through a workflow to finally become a contract with the -customer signature. +This module is for companies that needs their customer to sign an agreement +with all the legal information based on the selected agreement template. **Table of contents** @@ -55,18 +51,23 @@ Usage To use this module: -* Go to Agreement > Agrements -* Create a new agreement -* Select a template -* Follow the process to get the required approval -* Send the invitation to the customer to review and sign the agreement +* Go to Sales +* Create or select a quotation +* Set the agreement template and add some products +* Confirm the quotation. An agreement is created and linked to the sales order: + + * the agreement template is copied into an agreement with a copy of the + sections, clauses, recitals and appendices + * all the sales order lines are added as agreement lines + * the products on the SO with BOM are added as service profile on the agreement + * the customer information is set from the sales order + * the eventual analytic account linked to the sales order is set on the agreement + * the agreement is linked to the sales order and vice versa Known issues / Roadmap ====================== -* Split the module to remove the dependencies on sale and account and provide - the same feature in extra modules (agreement_sale, agreement_account, - agreement_purchase) +The roadmap is documented on https://github.com/OCA/contract/issues. Bug Tracker =========== @@ -74,7 +75,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -84,17 +85,13 @@ Credits Authors ~~~~~~~ -* Pavlov Media * Open Source Integrators Contributors ~~~~~~~~~~~~ -* Patrick Wilson -* Bhavesh Odedra -* Wolfgang Hall +* Steven Campbell * Maxime Chambreuil -* Sandip Mangukiya Other credits ~~~~~~~~~~~~~ @@ -117,14 +114,17 @@ 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-osi-scampbell| image:: https://github.com/osi-scampbell.png?size=40px + :target: https://github.com/osi-scampbell + :alt: osi-scampbell .. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px :target: https://github.com/max3903 :alt: max3903 -Current `maintainer `__: +Current `maintainers `__: -|maintainer-max3903| +|maintainer-osi-scampbell| |maintainer-max3903| -This module is part of the `OCA/contract `_ project on GitHub. +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/static/description/index.html b/agreement_sale/static/description/index.html new file mode 100644 index 00000000..031943a8 --- /dev/null +++ b/agreement_sale/static/description/index.html @@ -0,0 +1,470 @@ + + + + + + +Agreement - Sale + + + +
+

Agreement - Sale

+ + +

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

+

Odoo Sales App does not support the management of legal content for agreements +and contracts. It’s also not integrated with the Agreement App.

+

This module is for companies that needs their customer to sign an agreement +with all the legal information based on the selected agreement template.

+

Table of contents

+ +
+

Configuration

+

To configure this module:

+
    +
  • Go to Agreement > Configuration > Templates
  • +
  • Create a new template with sections and clauses and their respective content
  • +
  • Go to Agreement > Configuration > Stages
  • +
  • Create and reorder stages to match your process
  • +
+
+
+

Usage

+

To use this module:

+
    +
  • Go to Sales
  • +
  • Create or select a quotation
  • +
  • Set the agreement template and add some products
  • +
  • Confirm the quotation. An agreement is created and linked to the sales order:
      +
    • the agreement template is copied into an agreement with a copy of the +sections, clauses, recitals and appendices
    • +
    • all the sales order lines are added as agreement lines
    • +
    • the products on the SO with BOM are added as service profile on the agreement
    • +
    • the customer information is set from the sales order
    • +
    • the eventual analytic account linked to the sales order is set on the agreement
    • +
    • the agreement is linked to the sales order and vice versa
    • +
    +
  • +
+
+ +
+

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

+
    +
  • Open Source Integrators
  • +
+
+ +
+

Other credits

+

The development of this module has been financially supported by:

+
    +
  • Pavlov Media
  • +
  • Open Source Integrators
  • +
+
+
+

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:

+

osi-scampbell max3903

+

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.

+
+
+
+ + From efb8d5207625c98fae2732b74dcefad2e4f6700e Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Thu, 10 Jan 2019 12:19:03 -0600 Subject: [PATCH 03/11] [FIX] agreement_sale --- agreement_sale/models/sale_order.py | 2 +- agreement_sale/views/agreement.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agreement_sale/models/sale_order.py b/agreement_sale/models/sale_order.py index e0ae0706..1d1e64ac 100644 --- a/agreement_sale/models/sale_order.py +++ b/agreement_sale/models/sale_order.py @@ -11,7 +11,7 @@ class SaleOrder(models.Model): 'agreement', string="Agreement Template", domain="[('is_template', '=', True)]") - agreement_id = fields.Many2one('agreement', string="Agreement") + agreement_id = fields.Many2one('agreement', string="Agreement", copy=False) @api.multi def _action_confirm(self): diff --git a/agreement_sale/views/agreement.xml b/agreement_sale/views/agreement.xml index d7a45551..cf2faf8a 100644 --- a/agreement_sale/views/agreement.xml +++ b/agreement_sale/views/agreement.xml @@ -12,7 +12,7 @@ - + From b0b9f3bfa08fccea75e9947b254523d27ba4704a Mon Sep 17 00:00:00 2001 From: oca-travis Date: Thu, 10 Jan 2019 18:52:28 +0000 Subject: [PATCH 04/11] [UPD] Update agreement_sale.pot --- agreement_sale/i18n/agreement_sale.pot | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 agreement_sale/i18n/agreement_sale.pot diff --git a/agreement_sale/i18n/agreement_sale.pot b/agreement_sale/i18n/agreement_sale.pot new file mode 100644 index 00000000..9fa4e47b --- /dev/null +++ b/agreement_sale/i18n/agreement_sale.pot @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * agreement_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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_template_id +msgid "Agreement Template" +msgstr "" + +#. module: agreement_sale +#: model:ir.model,name:agreement_sale.model_sale_order +msgid "Quotation" +msgstr "" + +#. module: agreement_sale +#: model:ir.ui.view,arch_db:agreement_sale.agreement_sale_form_view +msgid "Sales" +msgstr "" + +#. module: agreement_sale +#: model:ir.model.fields,field_description:agreement_sale.field_agreement_sale_id +msgid "Sales Order" +msgstr "" + +#. module: agreement_sale +#: model:ir.model,name:agreement_sale.model_agreement +msgid "agreement" +msgstr "" + From 805a7402b98100b1464e0cb791b4d05590dd06cc Mon Sep 17 00:00:00 2001 From: Maria Sparenberg Date: Fri, 11 Jan 2019 15:56:52 +0000 Subject: [PATCH 05/11] Added translation using Weblate (German) --- agreement_sale/i18n/de.po | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 agreement_sale/i18n/de.po diff --git a/agreement_sale/i18n/de.po b/agreement_sale/i18n/de.po new file mode 100644 index 00000000..be58f8e7 --- /dev/null +++ b/agreement_sale/i18n/de.po @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * agreement_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\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_template_id +msgid "Agreement Template" +msgstr "" + +#. module: agreement_sale +#: model:ir.model,name:agreement_sale.model_sale_order +msgid "Quotation" +msgstr "" + +#. module: agreement_sale +#: model:ir.ui.view,arch_db:agreement_sale.agreement_sale_form_view +msgid "Sales" +msgstr "" + +#. module: agreement_sale +#: model:ir.model.fields,field_description:agreement_sale.field_agreement_sale_id +msgid "Sales Order" +msgstr "" + +#. module: agreement_sale +#: model:ir.model,name:agreement_sale.model_agreement +msgid "agreement" +msgstr "" From 187c5bde34dbb8b03d8d4a0524e9ed49d8df4cb8 Mon Sep 17 00:00:00 2001 From: Maria Sparenberg Date: Fri, 11 Jan 2019 15:56:59 +0000 Subject: [PATCH 06/11] Translated using Weblate (German) Currently translated at 100.0% (6 of 6 strings) Translation: contract-11.0/contract-11.0-agreement_sale Translate-URL: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement_sale/de/ --- agreement_sale/i18n/de.po | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/agreement_sale/i18n/de.po b/agreement_sale/i18n/de.po index be58f8e7..e1301cc5 100644 --- a/agreement_sale/i18n/de.po +++ b/agreement_sale/i18n/de.po @@ -6,40 +6,42 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2019-01-11 17:41+0000\n" +"Last-Translator: Maria Sparenberg \n" "Language-Team: none\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.3\n" #. module: agreement_sale #: model:ir.model.fields,field_description:agreement_sale.field_sale_order_agreement_id msgid "Agreement" -msgstr "" +msgstr "Vereinbarung" #. module: agreement_sale #: model:ir.model.fields,field_description:agreement_sale.field_sale_order_agreement_template_id msgid "Agreement Template" -msgstr "" +msgstr "Vereinbarungsvorlage" #. module: agreement_sale #: model:ir.model,name:agreement_sale.model_sale_order msgid "Quotation" -msgstr "" +msgstr "Angebot" #. module: agreement_sale #: model:ir.ui.view,arch_db:agreement_sale.agreement_sale_form_view msgid "Sales" -msgstr "" +msgstr "Verkauf" #. module: agreement_sale #: model:ir.model.fields,field_description:agreement_sale.field_agreement_sale_id msgid "Sales Order" -msgstr "" +msgstr "Verkaufsauftrag" #. module: agreement_sale #: model:ir.model,name:agreement_sale.model_agreement msgid "agreement" -msgstr "" +msgstr "Vereinbarung" From 8cd1d4a762499d1e647b8bd34be311f16b413934 Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Fri, 11 Jan 2019 17:59:59 -0600 Subject: [PATCH 07/11] [IMP] agreement_sale --- agreement_sale/__init__.py | 3 ++- agreement_sale/__manifest__.py | 7 ++++--- agreement_sale/models/__init__.py | 4 +++- agreement_sale/models/agreement.py | 4 ++-- agreement_sale/models/product.py | 13 +++++++++++++ agreement_sale/models/sale_order.py | 11 ++++------- agreement_sale/readme/ROADMAP.rst | 2 +- agreement_sale/views/agreement.xml | 6 +++--- agreement_sale/views/product.xml | 25 +++++++++++++++++++++++++ agreement_sale/views/sale_order.xml | 6 +++--- 10 files changed, 60 insertions(+), 21 deletions(-) create mode 100644 agreement_sale/models/product.py create mode 100644 agreement_sale/views/product.xml diff --git a/agreement_sale/__init__.py b/agreement_sale/__init__.py index 7fab5e1c..b634044c 100644 --- a/agreement_sale/__init__.py +++ b/agreement_sale/__init__.py @@ -1,3 +1,4 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +# Copyright (C) 2019 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models diff --git a/agreement_sale/__manifest__.py b/agreement_sale/__manifest__.py index bb7b0ac2..d72ef59e 100644 --- a/agreement_sale/__manifest__.py +++ b/agreement_sale/__manifest__.py @@ -1,5 +1,5 @@ -# Copyright (C) 2018 - TODAY, Open Source Integrators -# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +# Copyright (C) 2019 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Agreement - Sale', @@ -15,7 +15,8 @@ ], 'data': [ 'views/agreement.xml', - 'views/sale_order.xml' + 'views/product.xml', + 'views/sale_order.xml', ], 'installable': True, 'development_status': 'Beta', diff --git a/agreement_sale/models/__init__.py b/agreement_sale/models/__init__.py index 87270557..f136a926 100644 --- a/agreement_sale/models/__init__.py +++ b/agreement_sale/models/__init__.py @@ -1,6 +1,8 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +# Copyright (C) 2019 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import ( sale_order, agreement, + product, ) diff --git a/agreement_sale/models/agreement.py b/agreement_sale/models/agreement.py index 157fc158..85095c56 100644 --- a/agreement_sale/models/agreement.py +++ b/agreement_sale/models/agreement.py @@ -1,5 +1,5 @@ -# Copyright (C) 2018 - TODAY, Open Source Integrators -# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +# Copyright (C) 2019 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models diff --git a/agreement_sale/models/product.py b/agreement_sale/models/product.py new file mode 100644 index 00000000..59d7c8f0 --- /dev/null +++ b/agreement_sale/models/product.py @@ -0,0 +1,13 @@ +# Copyright (C) 2019 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + is_serviceprofile = fields.Boolean( + string="Create a Service Profile", + help="""If True, this product will create a service profile on the + agreement when the sales order is confirmed.""") diff --git a/agreement_sale/models/sale_order.py b/agreement_sale/models/sale_order.py index 1d1e64ac..34490442 100644 --- a/agreement_sale/models/sale_order.py +++ b/agreement_sale/models/sale_order.py @@ -1,5 +1,5 @@ -# Copyright (C) 2018 - TODAY, Open Source Integrators -# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +# Copyright (C) 2019 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models @@ -37,11 +37,8 @@ class SaleOrder(models.Model): 'sale_line_id': line.id, 'uom_id': line.product_uom.id }) - # If the product sold has a BOM, create a service profile - bom = self.env['mrp.bom'].search( - [('product_tmpl_id', '=', - line.product_id.product_tmpl_id.id)]) - if bom: + # If the product is a service profile, create one + if line.product_id.product_tmpl_id.is_serviceprofile: self.env['agreement.serviceprofile'].create({ 'name': line.name, 'agreement_id': order.agreement_id.id, diff --git a/agreement_sale/readme/ROADMAP.rst b/agreement_sale/readme/ROADMAP.rst index 294d0acd..c6d54c4f 100644 --- a/agreement_sale/readme/ROADMAP.rst +++ b/agreement_sale/readme/ROADMAP.rst @@ -1 +1 @@ -The roadmap is documented on https://github.com/OCA/contract/issues. \ No newline at end of file +The roadmap is documented on https://github.com/OCA/contract/issues. diff --git a/agreement_sale/views/agreement.xml b/agreement_sale/views/agreement.xml index cf2faf8a..cb73ad6b 100644 --- a/agreement_sale/views/agreement.xml +++ b/agreement_sale/views/agreement.xml @@ -1,10 +1,10 @@ - + - + agreement.form.view agreement diff --git a/agreement_sale/views/product.xml b/agreement_sale/views/product.xml new file mode 100644 index 00000000..fbab53e8 --- /dev/null +++ b/agreement_sale/views/product.xml @@ -0,0 +1,25 @@ + + + + + + + product.template.form.view + product.template + + + + + + + + + + + + + + + + diff --git a/agreement_sale/views/sale_order.xml b/agreement_sale/views/sale_order.xml index f598f3b3..eedba901 100644 --- a/agreement_sale/views/sale_order.xml +++ b/agreement_sale/views/sale_order.xml @@ -1,10 +1,10 @@ - + - + sale.order.agreement.form.view sale.order From 95a9db09175823979451743fb0d460b3b2f04da7 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Mon, 14 Jan 2019 17:07:32 +0000 Subject: [PATCH 08/11] [UPD] Update agreement_sale.pot --- agreement_sale/i18n/agreement_sale.pot | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/agreement_sale/i18n/agreement_sale.pot b/agreement_sale/i18n/agreement_sale.pot index 9fa4e47b..e0846561 100644 --- a/agreement_sale/i18n/agreement_sale.pot +++ b/agreement_sale/i18n/agreement_sale.pot @@ -15,6 +15,7 @@ msgstr "" #. module: agreement_sale #: model:ir.model.fields,field_description:agreement_sale.field_sale_order_agreement_id +#: model:ir.ui.view,arch_db:agreement_sale.product_template_form_view msgid "Agreement" msgstr "" @@ -23,6 +24,24 @@ msgstr "" msgid "Agreement Template" msgstr "" +#. module: agreement_sale +#: model:ir.model.fields,field_description:agreement_sale.field_product_product_is_serviceprofile +#: model:ir.model.fields,field_description:agreement_sale.field_product_template_is_serviceprofile +msgid "Create a Service Profile" +msgstr "" + +#. module: agreement_sale +#: model:ir.model.fields,help:agreement_sale.field_product_product_is_serviceprofile +#: model:ir.model.fields,help:agreement_sale.field_product_template_is_serviceprofile +msgid "If True, this product will create a service profile on the\n" +" agreement when the sales order is confirmed." +msgstr "" + +#. module: agreement_sale +#: model:ir.model,name:agreement_sale.model_product_template +msgid "Product Template" +msgstr "" + #. module: agreement_sale #: model:ir.model,name:agreement_sale.model_sale_order msgid "Quotation" From 2c1e4f3f2706c4ba528d5a19cff98a2758679be9 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sun, 27 Jan 2019 10:36:17 +0000 Subject: [PATCH 09/11] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: contract-11.0/contract-11.0-agreement_sale Translate-URL: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement_sale/ --- agreement_sale/i18n/de.po | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/agreement_sale/i18n/de.po b/agreement_sale/i18n/de.po index e1301cc5..6dcc0024 100644 --- a/agreement_sale/i18n/de.po +++ b/agreement_sale/i18n/de.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * agreement_sale +# * agreement_sale # msgid "" msgstr "" @@ -18,6 +18,7 @@ msgstr "" #. module: agreement_sale #: model:ir.model.fields,field_description:agreement_sale.field_sale_order_agreement_id +#: model:ir.ui.view,arch_db:agreement_sale.product_template_form_view msgid "Agreement" msgstr "Vereinbarung" @@ -26,6 +27,26 @@ msgstr "Vereinbarung" msgid "Agreement Template" msgstr "Vereinbarungsvorlage" +#. module: agreement_sale +#: model:ir.model.fields,field_description:agreement_sale.field_product_product_is_serviceprofile +#: model:ir.model.fields,field_description:agreement_sale.field_product_template_is_serviceprofile +msgid "Create a Service Profile" +msgstr "" + +#. module: agreement_sale +#: model:ir.model.fields,help:agreement_sale.field_product_product_is_serviceprofile +#: model:ir.model.fields,help:agreement_sale.field_product_template_is_serviceprofile +msgid "" +"If True, this product will create a service profile on the\n" +" agreement when the sales order is confirmed." +msgstr "" + +#. module: agreement_sale +#: model:ir.model,name:agreement_sale.model_product_template +#, fuzzy +msgid "Product Template" +msgstr "Vereinbarungsvorlage" + #. module: agreement_sale #: model:ir.model,name:agreement_sale.model_sale_order msgid "Quotation" From dd6b4decee0fbb4687771ac4945ed629c7672a88 Mon Sep 17 00:00:00 2001 From: Maria Sparenberg Date: Fri, 22 Feb 2019 12:24:10 +0000 Subject: [PATCH 10/11] Translated using Weblate (German) Currently translated at 100.0% (9 of 9 strings) Translation: contract-11.0/contract-11.0-agreement_sale Translate-URL: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement_sale/de/ --- agreement_sale/i18n/de.po | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/agreement_sale/i18n/de.po b/agreement_sale/i18n/de.po index 6dcc0024..76c547cf 100644 --- a/agreement_sale/i18n/de.po +++ b/agreement_sale/i18n/de.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2019-01-11 17:41+0000\n" +"PO-Revision-Date: 2019-02-22 14:50+0000\n" "Last-Translator: Maria Sparenberg \n" "Language-Team: none\n" "Language: de\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.3\n" +"X-Generator: Weblate 3.4\n" #. module: agreement_sale #: model:ir.model.fields,field_description:agreement_sale.field_sale_order_agreement_id @@ -31,7 +31,7 @@ msgstr "Vereinbarungsvorlage" #: model:ir.model.fields,field_description:agreement_sale.field_product_product_is_serviceprofile #: model:ir.model.fields,field_description:agreement_sale.field_product_template_is_serviceprofile msgid "Create a Service Profile" -msgstr "" +msgstr "Dienstleistungsprofil erstellen" #. module: agreement_sale #: model:ir.model.fields,help:agreement_sale.field_product_product_is_serviceprofile @@ -40,12 +40,13 @@ msgid "" "If True, this product will create a service profile on the\n" " agreement when the sales order is confirmed." msgstr "" +"Wenn der Haken gesetzt ist, wird dieses Produkt ein Dienstleistungsprofil in " +"der Vereinbarung erzeugen, sobald der Verkaufsauftrag bestätigt wird." #. module: agreement_sale #: model:ir.model,name:agreement_sale.model_product_template -#, fuzzy msgid "Product Template" -msgstr "Vereinbarungsvorlage" +msgstr "Produktvorlage" #. module: agreement_sale #: model:ir.model,name:agreement_sale.model_sale_order From b6b6efbc8c2a1ff1aeffb2109a9650771fb5aeb5 Mon Sep 17 00:00:00 2001 From: Murtuza Saleh Date: Thu, 28 Mar 2019 12:14:06 +0530 Subject: [PATCH 11/11] [MIG][12.0] agreement_legal_sale --- .../README.rst | 15 +++++++------ .../__init__.py | 1 - .../__manifest__.py | 10 ++++----- .../i18n/agreement_sale.pot | 0 .../i18n/de.po | 0 .../models/__init__.py | 1 - agreement_legal_sale/models/agreement.py | 20 ++++++++++++++++++ .../models/product.py | 0 .../models/sale_order.py | 9 ++++---- .../readme/CONFIGURE.rst | 0 .../readme/CONTRIBUTORS.rst | 1 + .../readme/CREDITS.rst | 0 .../readme/DESCRIPTION.rst | 0 .../readme/ROADMAP.rst | 0 .../readme/USAGE.rst | 0 .../static/description/icon.png | Bin .../static/description/index.html | 6 +++--- .../views/agreement.xml | 12 +++++++---- .../views/product.xml | 6 +++--- .../views/sale_order.xml | 2 +- agreement_sale/models/agreement.py | 10 --------- 21 files changed, 53 insertions(+), 40 deletions(-) rename {agreement_sale => agreement_legal_sale}/README.rst (91%) rename {agreement_sale => agreement_legal_sale}/__init__.py (61%) rename {agreement_sale => agreement_legal_sale}/__manifest__.py (75%) rename {agreement_sale => agreement_legal_sale}/i18n/agreement_sale.pot (100%) rename {agreement_sale => agreement_legal_sale}/i18n/de.po (100%) rename {agreement_sale => agreement_legal_sale}/models/__init__.py (70%) create mode 100644 agreement_legal_sale/models/agreement.py rename {agreement_sale => agreement_legal_sale}/models/product.py (100%) rename {agreement_sale => agreement_legal_sale}/models/sale_order.py (85%) rename {agreement_sale => agreement_legal_sale}/readme/CONFIGURE.rst (100%) rename {agreement_sale => agreement_legal_sale}/readme/CONTRIBUTORS.rst (64%) rename {agreement_sale => agreement_legal_sale}/readme/CREDITS.rst (100%) rename {agreement_sale => agreement_legal_sale}/readme/DESCRIPTION.rst (100%) rename {agreement_sale => agreement_legal_sale}/readme/ROADMAP.rst (100%) rename {agreement_sale => agreement_legal_sale}/readme/USAGE.rst (100%) rename {agreement_sale => agreement_legal_sale}/static/description/icon.png (100%) rename {agreement_sale => agreement_legal_sale}/static/description/index.html (93%) rename {agreement_sale => agreement_legal_sale}/views/agreement.xml (64%) rename {agreement_sale => agreement_legal_sale}/views/product.xml (84%) rename {agreement_sale => agreement_legal_sale}/views/sale_order.xml (95%) delete mode 100644 agreement_sale/models/agreement.py diff --git a/agreement_sale/README.rst b/agreement_legal_sale/README.rst similarity index 91% rename from agreement_sale/README.rst rename to agreement_legal_sale/README.rst index 3dff350e..34babcb4 100644 --- a/agreement_sale/README.rst +++ b/agreement_legal_sale/README.rst @@ -1,6 +1,6 @@ -================ -Agreement - Sale -================ +==================== +Agreement Legal Sale +==================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! @@ -14,13 +14,13 @@ Agreement - Sale :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/11.0/agreement_sale + :target: https://github.com/OCA/contract/tree/12.0/agreement_legal_sale :alt: OCA/contract .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement_sale + :target: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal_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/11.0 + :target: https://runbot.odoo-community.org/runbot/110/12.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -92,6 +92,7 @@ Contributors * Steven Campbell * Maxime Chambreuil +* Serpent Consulting Services Pvt. Ltd. Other credits ~~~~~~~~~~~~~ @@ -125,6 +126,6 @@ Current `maintainers `__: |maintainer-osi-scampbell| |maintainer-max3903| -This module is part of the `OCA/contract `_ project on GitHub. +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_legal_sale/__init__.py similarity index 61% rename from agreement_sale/__init__.py rename to agreement_legal_sale/__init__.py index b634044c..69f7babd 100644 --- a/agreement_sale/__init__.py +++ b/agreement_legal_sale/__init__.py @@ -1,4 +1,3 @@ -# Copyright (C) 2019 - TODAY, Open Source Integrators # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models diff --git a/agreement_sale/__manifest__.py b/agreement_legal_sale/__manifest__.py similarity index 75% rename from agreement_sale/__manifest__.py rename to agreement_legal_sale/__manifest__.py index d72ef59e..7ed16142 100644 --- a/agreement_sale/__manifest__.py +++ b/agreement_legal_sale/__manifest__.py @@ -2,16 +2,16 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { - 'name': 'Agreement - Sale', - 'summary': 'Create an agreement when the sales order is confirmed', - 'version': '11.0.0.0.1', + 'name': 'Agreement Legal Sale', + 'summary': 'Create an agreement when the sale order is confirmed', + 'version': '12.0.1.0.0', 'license': 'AGPL-3', 'author': 'Open Source Integrators, Odoo Community Association (OCA)', 'category': 'Agreement', 'website': 'https://github.com/OCA/contract', 'depends': [ - 'agreement', - 'sale', + 'agreement_legal', + 'agreement_sale', ], 'data': [ 'views/agreement.xml', diff --git a/agreement_sale/i18n/agreement_sale.pot b/agreement_legal_sale/i18n/agreement_sale.pot similarity index 100% rename from agreement_sale/i18n/agreement_sale.pot rename to agreement_legal_sale/i18n/agreement_sale.pot diff --git a/agreement_sale/i18n/de.po b/agreement_legal_sale/i18n/de.po similarity index 100% rename from agreement_sale/i18n/de.po rename to agreement_legal_sale/i18n/de.po diff --git a/agreement_sale/models/__init__.py b/agreement_legal_sale/models/__init__.py similarity index 70% rename from agreement_sale/models/__init__.py rename to agreement_legal_sale/models/__init__.py index f136a926..2f3b40d7 100644 --- a/agreement_sale/models/__init__.py +++ b/agreement_legal_sale/models/__init__.py @@ -1,4 +1,3 @@ -# Copyright (C) 2019 - TODAY, Open Source Integrators # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import ( diff --git a/agreement_legal_sale/models/agreement.py b/agreement_legal_sale/models/agreement.py new file mode 100644 index 00000000..6e064886 --- /dev/null +++ b/agreement_legal_sale/models/agreement.py @@ -0,0 +1,20 @@ +# Copyright (C) 2019 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class Agreement(models.Model): + _inherit = 'agreement' + + sale_id = fields.Many2one('sale.order', string='Sales Order') + analytic_account_id = fields.Many2one( + 'account.analytic.account', 'Analytic Account', readonly=True, + copy=False) + + +class AgreementLine(models.Model): + _inherit = "agreement.line" + + sale_line_id = fields.Many2one('sale.order.line', + string='Sales Order Line') diff --git a/agreement_sale/models/product.py b/agreement_legal_sale/models/product.py similarity index 100% rename from agreement_sale/models/product.py rename to agreement_legal_sale/models/product.py diff --git a/agreement_sale/models/sale_order.py b/agreement_legal_sale/models/sale_order.py similarity index 85% rename from agreement_sale/models/sale_order.py rename to agreement_legal_sale/models/sale_order.py index 34490442..a6713a61 100644 --- a/agreement_sale/models/sale_order.py +++ b/agreement_legal_sale/models/sale_order.py @@ -11,7 +11,6 @@ class SaleOrder(models.Model): 'agreement', string="Agreement Template", domain="[('is_template', '=', True)]") - agreement_id = fields.Many2one('agreement', string="Agreement", copy=False) @api.multi def _action_confirm(self): @@ -20,14 +19,14 @@ class SaleOrder(models.Model): if order.agreement_template_id: order.agreement_id = order.agreement_template_id.copy(default={ 'name': order.name, + 'code': order.name, 'is_template': False, 'sale_id': order.id, 'partner_id': order.partner_id.id, - 'analytic_account_id': - order.analytic_account_id and - order.analytic_account_id.id or False, + 'analytic_account_id': order.analytic_account_id and + order.analytic_account_id.id or False, }) - for line in self.order_line: + for line in order.order_line: # Create agreement line self.env['agreement.line'].create({ 'product_id': line.product_id.id, diff --git a/agreement_sale/readme/CONFIGURE.rst b/agreement_legal_sale/readme/CONFIGURE.rst similarity index 100% rename from agreement_sale/readme/CONFIGURE.rst rename to agreement_legal_sale/readme/CONFIGURE.rst diff --git a/agreement_sale/readme/CONTRIBUTORS.rst b/agreement_legal_sale/readme/CONTRIBUTORS.rst similarity index 64% rename from agreement_sale/readme/CONTRIBUTORS.rst rename to agreement_legal_sale/readme/CONTRIBUTORS.rst index db3894ee..364a1729 100644 --- a/agreement_sale/readme/CONTRIBUTORS.rst +++ b/agreement_legal_sale/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Steven Campbell * Maxime Chambreuil +* Serpent Consulting Services Pvt. Ltd. diff --git a/agreement_sale/readme/CREDITS.rst b/agreement_legal_sale/readme/CREDITS.rst similarity index 100% rename from agreement_sale/readme/CREDITS.rst rename to agreement_legal_sale/readme/CREDITS.rst diff --git a/agreement_sale/readme/DESCRIPTION.rst b/agreement_legal_sale/readme/DESCRIPTION.rst similarity index 100% rename from agreement_sale/readme/DESCRIPTION.rst rename to agreement_legal_sale/readme/DESCRIPTION.rst diff --git a/agreement_sale/readme/ROADMAP.rst b/agreement_legal_sale/readme/ROADMAP.rst similarity index 100% rename from agreement_sale/readme/ROADMAP.rst rename to agreement_legal_sale/readme/ROADMAP.rst diff --git a/agreement_sale/readme/USAGE.rst b/agreement_legal_sale/readme/USAGE.rst similarity index 100% rename from agreement_sale/readme/USAGE.rst rename to agreement_legal_sale/readme/USAGE.rst diff --git a/agreement_sale/static/description/icon.png b/agreement_legal_sale/static/description/icon.png similarity index 100% rename from agreement_sale/static/description/icon.png rename to agreement_legal_sale/static/description/icon.png diff --git a/agreement_sale/static/description/index.html b/agreement_legal_sale/static/description/index.html similarity index 93% rename from agreement_sale/static/description/index.html rename to agreement_legal_sale/static/description/index.html index 031943a8..d1347a99 100644 --- a/agreement_sale/static/description/index.html +++ b/agreement_legal_sale/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

Odoo Sales App does not support the management of legal content for agreements and contracts. It’s also not integrated with the Agreement App.

This module is for companies that needs their customer to sign an agreement @@ -426,7 +426,7 @@ sections, clauses, recitals and appendices

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.

+feedback.

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

@@ -461,7 +461,7 @@ mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainers:

osi-scampbell max3903

-

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

+

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_legal_sale/views/agreement.xml similarity index 64% rename from agreement_sale/views/agreement.xml rename to agreement_legal_sale/views/agreement.xml index cb73ad6b..dffaee97 100644 --- a/agreement_sale/views/agreement.xml +++ b/agreement_legal_sale/views/agreement.xml @@ -1,4 +1,4 @@ - + @@ -7,19 +7,23 @@ agreement.form.view agreement - + - + + - + + + diff --git a/agreement_sale/views/product.xml b/agreement_legal_sale/views/product.xml similarity index 84% rename from agreement_sale/views/product.xml rename to agreement_legal_sale/views/product.xml index fbab53e8..54fa92cb 100644 --- a/agreement_sale/views/product.xml +++ b/agreement_legal_sale/views/product.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,10 @@ - + - + diff --git a/agreement_sale/views/sale_order.xml b/agreement_legal_sale/views/sale_order.xml similarity index 95% rename from agreement_sale/views/sale_order.xml rename to agreement_legal_sale/views/sale_order.xml index eedba901..8b607a89 100644 --- a/agreement_sale/views/sale_order.xml +++ b/agreement_legal_sale/views/sale_order.xml @@ -1,4 +1,4 @@ - + diff --git a/agreement_sale/models/agreement.py b/agreement_sale/models/agreement.py deleted file mode 100644 index 85095c56..00000000 --- a/agreement_sale/models/agreement.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) 2019 - TODAY, Open Source Integrators -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import fields, models - - -class Agreement(models.Model): - _inherit = 'agreement' - - sale_id = fields.Many2one('sale.order', string='Sales Order')