Skip to content

Commit

Permalink
Merge branch '16.0' into odoo-addons16-purchase_order_packaging_report
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredoavanzosc authored Jan 16, 2025
2 parents fee07ad + 72b0673 commit 5c0fe7e
Show file tree
Hide file tree
Showing 25 changed files with 279 additions and 262 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

==============================
Stock picking packaging report
==============================
===================
Product alternative
===================

* In stock picking report print packaging.
* On the products form, display the "Optional Products", "Accessory Products",
and "Alternative Products" fields, on a new tab called "Alternatives".

Bug Tracker
===========
Expand All @@ -23,6 +24,5 @@ Credits

Contributors
------------

* Ana Juaristi <[email protected]>
* Ana Juaristi <[email protected]>
* Alfredo de la Fuente <[email protected]>
Empty file added product_alternative/__init__.py
Empty file.
16 changes: 16 additions & 0 deletions product_alternative/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Product Alternative",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"category": "Sales/Sales",
"author": "Avanzosc",
"website": "https://github.com/avanzosc/odoo-addons",
"depends": [
"sale_product_configurator",
"website_sale",
],
"data": ["views/product_template_views.xml"],
"installable": True,
}
41 changes: 41 additions & 0 deletions product_alternative/i18n/ca_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_alternative
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-28 12:13+0000\n"
"PO-Revision-Date: 2024-11-28 12:13+0000\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: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternative Products"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternatives"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Displayed in bottom of product pages"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Recommend when 'Adding to Cart' or quotation"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Suggested accessories in the eCommerce cart"
msgstr ""
41 changes: 41 additions & 0 deletions product_alternative/i18n/en_GB.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_alternative
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-28 12:13+0000\n"
"PO-Revision-Date: 2024-11-28 12:13+0000\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: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternative Products"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternatives"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Displayed in bottom of product pages"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Recommend when 'Adding to Cart' or quotation"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Suggested accessories in the eCommerce cart"
msgstr ""
41 changes: 41 additions & 0 deletions product_alternative/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_alternative
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-28 12:14+0000\n"
"PO-Revision-Date: 2024-11-28 12:14+0000\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: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternative Products"
msgstr "Productos alternativos"

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternatives"
msgstr "Alternativos"

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Displayed in bottom of product pages"
msgstr "Se muestra en la parte inferior de las páginas de productos"

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Recommend when 'Adding to Cart' or quotation"
msgstr "Recomendar al \"Añadir a la cesta\" o al presupuesto"

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Suggested accessories in the eCommerce cart"
msgstr "Accesorios sugeridos en la cesta de comercio electrónico"
41 changes: 41 additions & 0 deletions product_alternative/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_alternative
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-28 12:14+0000\n"
"PO-Revision-Date: 2024-11-28 12:14+0000\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: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternative Products"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternatives"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Displayed in bottom of product pages"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Recommend when 'Adding to Cart' or quotation"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Suggested accessories in the eCommerce cart"
msgstr ""
41 changes: 41 additions & 0 deletions product_alternative/i18n/product_alternative.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_alternative
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-28 12:13+0000\n"
"PO-Revision-Date: 2024-11-28 12:13+0000\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: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternative Products"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Alternatives"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Displayed in bottom of product pages"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Recommend when 'Adding to Cart' or quotation"
msgstr ""

#. module: product_alternative
#: model_terms:ir.ui.view,arch_db:product_alternative.product_template_form_view
msgid "Suggested accessories in the eCommerce cart"
msgstr ""
45 changes: 45 additions & 0 deletions product_alternative/views/product_template_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<odoo>
<record id="product_template_form_view" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view" />
<field name="arch" type="xml">
<group name="upsell" position="attributes">
<attribute name="invisible">1</attribute>
</group>
<page name="sales" position="after">
<page name="alternatives" string="Alternatives">
<group>
<group>
<field
name="optional_product_ids"
widget="many2many_tags"
options="{'color_field': 'color'}"
domain="[('id', '!=', active_id), '|', ('company_id', '=', company_id), ('company_id', '=', False)]"
placeholder="Recommend when 'Adding to Cart' or quotation"
/>
</group>
<group>
<field
name="accessory_product_ids"
widget="many2many_tags"
attrs="{'invisible': [('sale_ok','=',False)]}"
placeholder="Suggested accessories in the eCommerce cart"
/>
</group>
</group>

<separator
name="alternative_product"
string="Alternative Products"
/>
<field
name="alternative_product_ids"
domain="[('id', '!=', active_id), '|', ('company_id', '=', company_id), ('company_id', '=', False)]"
attrs="{'invisible': [('sale_ok','=',False)]}"
placeholder="Displayed in bottom of product pages"
/>
</page>
</page>
</field>
</record>
</odoo>
1 change: 1 addition & 0 deletions setup/product_alternative/odoo/addons/product_alternative
File renamed without changes.

This file was deleted.

1 change: 0 additions & 1 deletion stock_picking_date_done/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from . import stock_picking
from . import stock_move
from . import stock_move_line
17 changes: 0 additions & 17 deletions stock_picking_date_done/models/stock_move_line.py

This file was deleted.

14 changes: 4 additions & 10 deletions stock_picking_date_done/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@ def button_validate(self):
pickings_custom_date_done_null.write(
{"custom_date_done": fields.Datetime.now()}
)
return super().button_validate()

def write(self, vals):
result = super().write(vals)
if "custom_date_done" in vals:
for line in self:
for move in line.move_ids_without_package:
move.date = line.custom_date_done
for move_line in line.move_line_ids_without_package:
move_line.date = line.custom_date_done
result = super().button_validate()
for picking in self:
picking.move_ids.write({"date": picking.custom_date_done})
picking.move_line_ids.write({"date": picking.custom_date_done})
return result
1 change: 0 additions & 1 deletion stock_picking_packaging_report/__init__.py

This file was deleted.

17 changes: 0 additions & 17 deletions stock_picking_packaging_report/__manifest__.py

This file was deleted.

21 changes: 0 additions & 21 deletions stock_picking_packaging_report/i18n/ca_ES.po

This file was deleted.

Loading

0 comments on commit 5c0fe7e

Please sign in to comment.