Skip to content

Commit

Permalink
[MIG] sale_order_revision: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
siemenv authored and RUS committed Jan 23, 2025
1 parent 2085eea commit bea3ae6
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion sale_order_revision/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Sale order revisions
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dce7201dfe61fe67ee9952cbe0c87a54cf0e4ccf00c9c9eb9588b00ece9aa410
!! source digest: sha256:6b51e36bae3e8bf7f72989b8084d6011a7b933418a29592bf13a9e3134cee776
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
4 changes: 2 additions & 2 deletions sale_order_revision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from . import models


def populate_unrevisioned_name(cr, registry):
cr.execute(
def populate_unrevisioned_name(env):
env.cr.execute(
"UPDATE sale_order "
"SET unrevisioned_name = name "
"WHERE unrevisioned_name is NULL"
Expand Down
2 changes: 1 addition & 1 deletion sale_order_revision/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"name": "Sale order revisions",
"summary": "Keep track of revised quotations",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"category": "Sale Management",
"author": "Agile Business Group,"
"Dreambits,"
Expand Down
8 changes: 4 additions & 4 deletions sale_order_revision/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-03-14 12:37+0000\n"
"Last-Translator: Lorenzo Battistini <[email protected]>\n"
"PO-Revision-Date: 2023-12-13 12:34+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
Expand All @@ -34,7 +34,7 @@ msgstr "Ha revisioni precedenti"
#. module: sale_order_revision
#: model_terms:ir.ui.view,arch_db:sale_order_revision.view_order_form
msgid "New Revision of Quotation"
msgstr "Nuova revisione preventivo"
msgstr "Nuova rersione preventivo"

#. module: sale_order_revision
#: model:ir.model.fields,field_description:sale_order_revision.field_sale_order__old_revision_ids
Expand All @@ -59,7 +59,7 @@ msgstr "Revisioni precedenti"
#. module: sale_order_revision
#: model:ir.model.fields,field_description:sale_order_revision.field_sale_order__revision_count
msgid "Previous versions count"
msgstr "Conteggio versioni precedenti"
msgstr "Conteggio rersioni precedenti"

#. module: sale_order_revision
#: model:ir.model.fields,field_description:sale_order_revision.field_sale_order__revision_number
Expand Down
2 changes: 1 addition & 1 deletion sale_order_revision/i18n/sale_order_revision.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
3 changes: 1 addition & 2 deletions sale_order_revision/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def _prepare_revision_data(self, new_revision):

def action_view_revisions(self):
self.ensure_one()
action = self.env.ref("sale.action_orders")
result = action.read()[0]
result = self.env["ir.actions.act_window"]._for_xml_id("sale.action_orders")
result["domain"] = ["|", ("active", "=", False), ("active", "=", True)]
result["context"] = {
"active_test": 0,
Expand Down
2 changes: 1 addition & 1 deletion sale_order_revision/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h1 class="title">Sale order revisions</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dce7201dfe61fe67ee9952cbe0c87a54cf0e4ccf00c9c9eb9588b00ece9aa410
!! source digest: sha256:6b51e36bae3e8bf7f72989b8084d6011a7b933418a29592bf13a9e3134cee776
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 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/sale-workflow/tree/17.0/sale_order_revision"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_revision"><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/sale-workflow&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>On cancelled orders, you can click on the “New copy of Quotation”
Expand Down
9 changes: 3 additions & 6 deletions sale_order_revision/view/sale_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<xpath expr="//header" position='inside'>
<button
name="create_revision"
states="cancel,sent"
invisible="state not in ['cancel' ,'sent']"
string="New Revision of Quotation"
type="object"
/>
Expand All @@ -30,7 +30,7 @@
type="object"
class="oe_stat_button"
icon="fa-file-archive-o"
attrs="{'invisible': ['|', ('has_old_revisions', '=', False),('revision_count', '=', 0)]}"
invisible="not has_old_revisions or revision_count == 0"
>
<field
name="revision_count"
Expand All @@ -40,10 +40,7 @@
</button>
</xpath>
<field name="client_order_ref" position="after">
<field
name="current_revision_id"
attrs="{'invisible': [('current_revision_id', '=', False)]}"
/>
<field name="current_revision_id" invisible="not current_revision_id" />
<field name="has_old_revisions" invisible="1" />
</field>
</field>
Expand Down

0 comments on commit bea3ae6

Please sign in to comment.