Browse Source

[MIG][12.0] agreement_legal_sale

pull/294/head
Murtuza Saleh 6 years ago
parent
commit
b6b6efbc8c
  1. 15
      agreement_legal_sale/README.rst
  2. 1
      agreement_legal_sale/__init__.py
  3. 10
      agreement_legal_sale/__manifest__.py
  4. 0
      agreement_legal_sale/i18n/agreement_sale.pot
  5. 0
      agreement_legal_sale/i18n/de.po
  6. 1
      agreement_legal_sale/models/__init__.py
  7. 20
      agreement_legal_sale/models/agreement.py
  8. 0
      agreement_legal_sale/models/product.py
  9. 9
      agreement_legal_sale/models/sale_order.py
  10. 0
      agreement_legal_sale/readme/CONFIGURE.rst
  11. 1
      agreement_legal_sale/readme/CONTRIBUTORS.rst
  12. 0
      agreement_legal_sale/readme/CREDITS.rst
  13. 0
      agreement_legal_sale/readme/DESCRIPTION.rst
  14. 0
      agreement_legal_sale/readme/ROADMAP.rst
  15. 0
      agreement_legal_sale/readme/USAGE.rst
  16. 0
      agreement_legal_sale/static/description/icon.png
  17. 6
      agreement_legal_sale/static/description/index.html
  18. 12
      agreement_legal_sale/views/agreement.xml
  19. 6
      agreement_legal_sale/views/product.xml
  20. 2
      agreement_legal_sale/views/sale_order.xml
  21. 10
      agreement_sale/models/agreement.py

15
agreement_sale/README.rst → agreement_legal_sale/README.rst

@ -1,6 +1,6 @@
================
Agreement - Sale
================
====================
Agreement Legal Sale
====================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !! !! 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 :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github .. |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 :alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |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 :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |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 :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@ -92,6 +92,7 @@ Contributors
* Steven Campbell <scampbell@opensourceintegrators.com> * Steven Campbell <scampbell@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com> * Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
Other credits Other credits
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
@ -125,6 +126,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-osi-scampbell| |maintainer-max3903| |maintainer-osi-scampbell| |maintainer-max3903|
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/11.0/agreement_sale>`_ project on GitHub.
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/12.0/agreement_legal_sale>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

1
agreement_sale/__init__.py → 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). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models from . import models

10
agreement_sale/__manifest__.py → agreement_legal_sale/__manifest__.py

@ -2,16 +2,16 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # 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', 'license': 'AGPL-3',
'author': 'Open Source Integrators, Odoo Community Association (OCA)', 'author': 'Open Source Integrators, Odoo Community Association (OCA)',
'category': 'Agreement', 'category': 'Agreement',
'website': 'https://github.com/OCA/contract', 'website': 'https://github.com/OCA/contract',
'depends': [ 'depends': [
'agreement',
'sale',
'agreement_legal',
'agreement_sale',
], ],
'data': [ 'data': [
'views/agreement.xml', 'views/agreement.xml',

0
agreement_sale/i18n/agreement_sale.pot → agreement_legal_sale/i18n/agreement_sale.pot

0
agreement_sale/i18n/de.po → agreement_legal_sale/i18n/de.po

1
agreement_sale/models/__init__.py → 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). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import ( from . import (

20
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')

0
agreement_sale/models/product.py → agreement_legal_sale/models/product.py

9
agreement_sale/models/sale_order.py → agreement_legal_sale/models/sale_order.py

@ -11,7 +11,6 @@ class SaleOrder(models.Model):
'agreement', 'agreement',
string="Agreement Template", string="Agreement Template",
domain="[('is_template', '=', True)]") domain="[('is_template', '=', True)]")
agreement_id = fields.Many2one('agreement', string="Agreement", copy=False)
@api.multi @api.multi
def _action_confirm(self): def _action_confirm(self):
@ -20,14 +19,14 @@ class SaleOrder(models.Model):
if order.agreement_template_id: if order.agreement_template_id:
order.agreement_id = order.agreement_template_id.copy(default={ order.agreement_id = order.agreement_template_id.copy(default={
'name': order.name, 'name': order.name,
'code': order.name,
'is_template': False, 'is_template': False,
'sale_id': order.id, 'sale_id': order.id,
'partner_id': order.partner_id.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 # Create agreement line
self.env['agreement.line'].create({ self.env['agreement.line'].create({
'product_id': line.product_id.id, 'product_id': line.product_id.id,

0
agreement_sale/readme/CONFIGURE.rst → agreement_legal_sale/readme/CONFIGURE.rst

1
agreement_sale/readme/CONTRIBUTORS.rst → agreement_legal_sale/readme/CONTRIBUTORS.rst

@ -1,2 +1,3 @@
* Steven Campbell <scampbell@opensourceintegrators.com> * Steven Campbell <scampbell@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com> * Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>

0
agreement_sale/readme/CREDITS.rst → agreement_legal_sale/readme/CREDITS.rst

0
agreement_sale/readme/DESCRIPTION.rst → agreement_legal_sale/readme/DESCRIPTION.rst

0
agreement_sale/readme/ROADMAP.rst → agreement_legal_sale/readme/ROADMAP.rst

0
agreement_sale/readme/USAGE.rst → agreement_legal_sale/readme/USAGE.rst

0
agreement_sale/static/description/icon.png → agreement_legal_sale/static/description/icon.png

Before

Width: 64  |  Height: 64  |  Size: 6.6 KiB

After

Width: 64  |  Height: 64  |  Size: 6.6 KiB

6
agreement_sale/static/description/index.html → agreement_legal_sale/static/description/index.html

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" 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" 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" href="https://github.com/OCA/contract/tree/11.0/agreement_sale"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement_sale"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" 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" 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" href="https://github.com/OCA/contract/tree/12.0/agreement_legal_sale"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement_sale"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>Odoo Sales App does not support the management of legal content for agreements <p>Odoo Sales App does not support the management of legal content for agreements
and contracts. It’s also not integrated with the Agreement App.</p> and contracts. It’s also not integrated with the Agreement App.</p>
<p>This module is for companies that needs their customer to sign an agreement <p>This module is for companies that needs their customer to sign an agreement
@ -426,7 +426,7 @@ sections, clauses, recitals and appendices</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20agreement_sale%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20agreement_legal_sale%0Aversion:%2011.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> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -461,7 +461,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p> <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external" href="https://github.com/osi-scampbell"><img alt="osi-scampbell" src="https://github.com/osi-scampbell.png?size=40px" /></a> <a class="reference external" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a></p> <p><a class="reference external" href="https://github.com/osi-scampbell"><img alt="osi-scampbell" src="https://github.com/osi-scampbell.png?size=40px" /></a> <a class="reference external" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/11.0/agreement_sale">OCA/contract</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/agreement_legal_sale">OCA/contract</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>

12
agreement_sale/views/agreement.xml → agreement_legal_sale/views/agreement.xml

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<!-- Copyright 2019 Open Source Integrators <!-- Copyright 2019 Open Source Integrators
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
@ -7,19 +7,23 @@
<record id="agreement_sale_form_view" model="ir.ui.view"> <record id="agreement_sale_form_view" model="ir.ui.view">
<field name="name">agreement.form.view</field> <field name="name">agreement.form.view</field>
<field name="model">agreement</field> <field name="model">agreement</field>
<field name="inherit_id" ref="agreement.partner_agreement_form_view"/>
<field name="inherit_id"
ref="agreement_legal.partner_agreement_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<page name="signature" position="after"> <page name="signature" position="after">
<page name="sales" string="Sales"> <page name="sales" string="Sales">
<group> <group>
<group id="sale-left">
<group id="sale_left">
<field name="sale_id" readonly="1"/> <field name="sale_id" readonly="1"/>
<field name="analytic_account_id"/>
</group> </group>
<group id="sale-right"/>
<group id="sale_right"/>
</group> </group>
</page> </page>
</page> </page>
</field> </field>
</record> </record>
<menuitem id="agreement.agreement_menu" action="agreement.agreement_action" sequence="100"/>
</odoo> </odoo>

6
agreement_sale/views/product.xml → agreement_legal_sale/views/product.xml

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<!-- Copyright 2019 Open Source Integrators <!-- Copyright 2019 Open Source Integrators
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
@ -12,10 +12,10 @@
<xpath expr="//notebook" position="inside"> <xpath expr="//notebook" position="inside">
<page id="agreement" string="Agreement"> <page id="agreement" string="Agreement">
<group> <group>
<group id="agreement-left">
<group id="agreement_left">
<field name="is_serviceprofile"/> <field name="is_serviceprofile"/>
</group> </group>
<group id="agreement-right"/>
<group id="agreement_right"/>
</group> </group>
</page> </page>
</xpath> </xpath>

2
agreement_sale/views/sale_order.xml → agreement_legal_sale/views/sale_order.xml

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<!-- Copyright 2019 Open Source Integrators <!-- Copyright 2019 Open Source Integrators
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

10
agreement_sale/models/agreement.py

@ -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')
Loading…
Cancel
Save