Skip to content

Commit

Permalink
[18.0][MIG] migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbejaoui committed Nov 4, 2024
1 parent 3506728 commit 6d43cf7
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 66 deletions.
16 changes: 8 additions & 8 deletions contract/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Recurring - Contracts Management
: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/17.0/contract
:target: https://github.com/OCA/contract/tree/18.0/contract
:alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract
:target: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -93,9 +93,9 @@ Usage

|image2|

.. |image| image:: https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-my.png
.. |image1| image:: https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-list.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-detail.png
.. |image| image:: https://raw.githubusercontent.com/OCA/contract/18.0/contract/static/src/screenshots/portal-my.png
.. |image1| image:: https://raw.githubusercontent.com/OCA/contract/18.0/contract/static/src/screenshots/portal-list.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/contract/18.0/contract/static/src/screenshots/portal-detail.png

Known issues / Roadmap
======================
Expand All @@ -109,7 +109,7 @@ 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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20contract%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20contract%0Aversion:%2018.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.

Expand Down Expand Up @@ -166,6 +166,6 @@ 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.

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion contract/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

{
"name": "Recurring - Contracts Management",
"version": "17.0.1.1.1",
"version": "18.0.1.0.0",
"category": "Contract Management",
"license": "AGPL-3",
"author": "Tecnativa, ACSONE SA/NV, Odoo Community Association (OCA)",
Expand Down
4 changes: 2 additions & 2 deletions contract/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def _prepare_home_portal_values(self, counters):
contract_model = request.env["contract.contract"]
contract_count = (
contract_model.search_count([])
if contract_model.check_access_rights("read", raise_exception=False)
if contract_model.check_access("read")
else 0
)
values["contract_count"] = contract_count
Expand Down Expand Up @@ -46,7 +46,7 @@ def portal_my_contracts(
values = self._prepare_portal_layout_values()
contract_obj = request.env["contract.contract"]
# Avoid error if the user does not have access.
if not contract_obj.check_access_rights("read", raise_exception=False):
if not contract_obj.check_access("read"):
return request.redirect("/my")
domain = self._get_filter_domain(kw)
searchbar_sortings = {
Expand Down
2 changes: 0 additions & 2 deletions contract/data/contract_cron.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall" />
</record>
</odoo>
2 changes: 0 additions & 2 deletions contract/data/contract_renew_cron.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall" />
</record>
</odoo>
4 changes: 2 additions & 2 deletions contract/models/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,12 @@ def action_show_invoices(self):
"type": "ir.actions.act_window",
"name": "Invoices",
"res_model": "account.move",
"view_mode": "tree,kanban,form,calendar,pivot,graph,activity",
"view_mode": "list,kanban,form,calendar,pivot,graph,activity",
"domain": [("id", "in", self._get_related_invoices().ids)],
"context": ctx,
}
if tree_view and form_view:
action["views"] = [(tree_view.id, "tree"), (form_view.id, "form")]
action["views"] = [(tree_view.id, "list"), (form_view.id, "form")]
return action

@api.depends("contract_line_ids.date_end")
Expand Down
2 changes: 1 addition & 1 deletion contract/report/report_contract.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat" /></p>
</t>
<div class="page">
<div class="oe_structure" />
<div class="oe_structure" id="oe_structure_contract" />
<div class="row" id="header_info">
<div class="col-3">
<strong>Responsible: </strong>
Expand Down
12 changes: 6 additions & 6 deletions contract/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Recurring - Contracts Management</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d03061fa09dd38d53cbaf6f7ca79de5ff114d100162c7f7646d6a6f301ad3941
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/contract/tree/17.0/contract"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract"><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/contract&amp;target_branch=17.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="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/contract/tree/18.0/contract"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract"><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/contract&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 enables contracts management with recurring invoicing
functions. Also you can print and send by email contract report.</p>
<p>It works for customer contract and supplier contracts.</p>
Expand Down Expand Up @@ -435,9 +435,9 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<ul class="simple">
<li>Contracts appear in portal to following users in every contract:</li>
</ul>
<p><img alt="image" src="https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-my.png" /></p>
<p><img alt="image1" src="https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-list.png" /></p>
<p><img alt="image2" src="https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-detail.png" /></p>
<p><img alt="image" src="https://raw.githubusercontent.com/OCA/contract/18.0/contract/static/src/screenshots/portal-my.png" /></p>
<p><img alt="image1" src="https://raw.githubusercontent.com/OCA/contract/18.0/contract/static/src/screenshots/portal-list.png" /></p>
<p><img alt="image2" src="https://raw.githubusercontent.com/OCA/contract/18.0/contract/static/src/screenshots/portal-detail.png" /></p>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
Expand All @@ -451,7 +451,7 @@ <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/contract/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/contract/issues/new?body=module:%20contract%0Aversion:%2017.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:%20contract%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">
Expand Down Expand Up @@ -511,7 +511,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<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>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/17.0/contract">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/18.0/contract">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>
</div>
</div>
Expand Down
39 changes: 16 additions & 23 deletions contract/views/contract.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
<p>
This contract was terminated for the reason
<strong>
<field
name="terminate_reason_id"
options="{'no_open':True}"
/>
</strong>
<field name="terminate_reason_id" options="{'no_open':True}" />
</strong>
on
<field name="terminate_date" />
.
Expand Down Expand Up @@ -183,7 +180,7 @@
widget="section_and_note_one2many"
context="{'default_contract_type': contract_type, 'default_recurring_rule_type': recurring_rule_type, 'default_recurring_invoicing_type': recurring_invoicing_type, 'default_recurring_interval': recurring_interval, 'default_date_start': date_start, 'default_recurring_next_date': recurring_next_date}"
>
<tree
<list
decoration-muted="is_canceled"
decoration-info="create_invoice_visibility and not is_canceled"
editable="bottom"
Expand Down Expand Up @@ -278,7 +275,7 @@
column_invisible="True"
/>
<field name="is_canceled" column_invisible="True" />
</tree>
</list>
</field>
<field
name="contract_line_ids"
Expand All @@ -287,7 +284,7 @@
widget="section_and_note_one2many"
context="{'default_contract_type': contract_type}"
>
<tree
<list
decoration-muted="is_canceled"
decoration-info="create_invoice_visibility and not is_canceled"
>
Expand Down Expand Up @@ -426,17 +423,17 @@
groups="base.group_no_one"
invisible="not is_auto_renew"
/>
</tree>
</list>
</field>
<field name="note" />
</page>
<page name="modications" string="Modifications">
<field name="modification_ids" readonly="is_terminated">
<tree editable="bottom">
<list editable="bottom">
<field name="date" />
<field name="description" />
<field name="sent" />
</tree>
</list>
</field>
</page>
<page name="info" string="Other Information">
Expand Down Expand Up @@ -482,11 +479,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="activity_ids" widget="mail_activity" />
<field name="message_ids" widget="mail_thread" />
</div>
<chatter />
</form>
</field>
</record>
Expand Down Expand Up @@ -530,10 +523,10 @@
</record>
<!--TREE view-->
<record id="contract_contract_tree_view" model="ir.ui.view">
<field name="name">contract.contract tree view (in contract)</field>
<field name="name">contract.contract list view (in contract)</field>
<field name="model">contract.contract</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="name" string="Name" />
<field name="code" />
<field name="journal_id" groups="account.group_account_user" />
Expand All @@ -545,7 +538,7 @@
/>
<field name="active" column_invisible="True" />
<field name="company_id" groups="base.group_multi_company" />
</tree>
</list>
</field>
</record>
<!--SEARCH view-->
Expand Down Expand Up @@ -611,7 +604,7 @@
<record id="action_customer_contract" model="ir.actions.act_window">
<field name="name">Customer Contracts</field>
<field name="res_model">contract.contract</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
<field name="domain">[('contract_type', '=', 'sale')]</field>
<field name="context">
{'is_contract':1,
Expand All @@ -627,7 +620,7 @@
</record>
<record id="action_customer_contract_view_tree" model="ir.actions.act_window.view">
<field name="sequence" eval="1" />
<field name="view_mode">tree</field>
<field name="view_mode">list</field>
<field name="view_id" ref="contract_contract_tree_view" />
<field name="act_window_id" ref="action_customer_contract" />
</record>
Expand All @@ -647,7 +640,7 @@
<record id="action_supplier_contract" model="ir.actions.act_window">
<field name="name">Supplier Contracts</field>
<field name="res_model">contract.contract</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
<field name="domain">[('contract_type', '=', 'purchase')]</field>
<field name="context">
{'is_contract':1,
Expand All @@ -663,7 +656,7 @@
</record>
<record id="action_supplier_contract_view_tree" model="ir.actions.act_window.view">
<field name="sequence" eval="1" />
<field name="view_mode">tree</field>
<field name="view_mode">list</field>
<field name="view_id" ref="contract_contract_tree_view" />
<field name="act_window_id" ref="action_supplier_contract" />
</record>
Expand Down
8 changes: 4 additions & 4 deletions contract/views/contract_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@
<!-- TODO: Delete this view in migration to v13 or further migrations -->
<!--TREE view-->
<record id="contract_line_tree_view" model="ir.ui.view">
<field name="name">contract.line tree view (in contract)</field>
<field name="name">contract.line list view (in contract)</field>
<field name="model">contract.line</field>
<field name="arch" type="xml">
<tree
<list
decoration-muted="is_canceled"
decoration-info="create_invoice_visibility and not is_canceled"
>
Expand Down Expand Up @@ -166,12 +166,12 @@
groups="base.group_no_one"
invisible="not is_auto_renew"
/>
</tree>
</list>
</field>
</record>
<!--Supplier TREE view-->
<record id="contract_line_supplier_tree_view" model="ir.ui.view">
<field name="name">contract.line supplier tree view (in contract)</field>
<field name="name">contract.line supplier list view (in contract)</field>
<field name="model">contract.line</field>
<field name="mode">primary</field>
<field name="priority" eval="20" />
Expand Down
6 changes: 3 additions & 3 deletions contract/views/contract_tag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
<record model="ir.ui.view" id="contract_tag_tree_view">
<field name="model">contract.tag</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="name" />
<field
name="company_id"
options="{'no_create': True}"
groups="base.group_multi_company"
/>
</tree>
</list>
</field>
</record>
<record model="ir.actions.act_window" id="contract_tag_act_window">
<field name="name">Contract Tags</field>
<field name="res_model">contract.tag</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
</record>
<record model="ir.ui.menu" id="contract_tag_menu">
<field name="name">Contract Tag</field>
Expand Down
Loading

0 comments on commit 6d43cf7

Please sign in to comment.