Skip to content

Commit

Permalink
Merge PR #49 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by andhit-r
  • Loading branch information
ssi-bot committed Jun 26, 2024
2 parents 2d538cb + aa31443 commit 178148e
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 0 deletions.
46 changes: 46 additions & 0 deletions ssi_stock_picking_related_attachment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.. 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

==============================================
Stock Picking + Related Attachment Integration
==============================================


Installation
============

To install this module, you need to:

1. Clone the branch 14.0 of the repository https://github.com/open-synergy/ssi-stock
2. Add the path to this repository in your configuration (addons-path)
3. Update the module list (Must be on developer mode)
4. Go to menu *Apps -> Apps -> Main Apps*
5. Search For *Stock Picking + Related Attachment Integration*
6. Install the module

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/open-synergy/ssi-stock/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.


Credits
=======

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

* Miftahussalam <[email protected]>

Maintainer
----------

.. image:: https://simetri-sinergi.id/logo.png
:alt: PT. Simetri Sinergi Indonesia
:target: https://simetri-sinergi.id

This module is maintained by the PT. Simetri Sinergi Indonesia.
7 changes: 7 additions & 0 deletions ssi_stock_picking_related_attachment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2023 OpenSynergy Indonesia
# Copyright 2023 PT. Simetri Sinergi Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html).

from . import (
models,
)
17 changes: 17 additions & 0 deletions ssi_stock_picking_related_attachment/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2023 OpenSynergy Indonesia
# Copyright 2023 PT. Simetri Sinergi Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Assurance Report - Related Attachment Integration",
"version": "14.0.1.2.0",
"website": "https://simetri-sinergi.id",
"author": "OpenSynergy Indonesia, PT. Simetri Sinergi Indonesia",
"license": "AGPL-3",
"installable": True,
"depends": [
"ssi_stock",
"ssi_related_attachment_mixin",
],
"data": [],
}
7 changes: 7 additions & 0 deletions ssi_stock_picking_related_attachment/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2023 OpenSynergy Indonesia
# Copyright 2023 PT. Simetri Sinergi Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html).

from . import (
stock_picking,
)
29 changes: 29 additions & 0 deletions ssi_stock_picking_related_attachment/models/stock_picking.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2022 OpenSynergy Indonesia
# Copyright 2022 PT. Simetri Sinergi Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html).

from odoo import api, models


class StockPicking(models.Model):
_name = "stock.picking"
_inherit = [
"stock.picking",
"mixin.related_attachment",
]
_related_attachment_create_page = True

@api.onchange("picking_type_category_id")
def onchange_related_attachment_template_id(self):
self.related_attachment_template_id = False
if self.picking_type_category_id:
self.related_attachment_template_id = (
self._get_template_related_attachment()
)

@api.model_create_multi
def create(self, vals_list):
_super = super(StockPicking, self)
pickings = _super.create(vals_list)
pickings.onchange_related_attachment_template_id()
return pickings
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
odoo14-addon-ssi-related-attachment-mixin

0 comments on commit 178148e

Please sign in to comment.