Skip to content

Commit

Permalink
Merge PR #119 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Dec 20, 2024
2 parents 2c5da86 + 0ef9554 commit 6a9938b
Show file tree
Hide file tree
Showing 20 changed files with 762 additions and 0 deletions.
1 change: 1 addition & 0 deletions l10n_pt_stock_vehicle_daily/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Generated
106 changes: 106 additions & 0 deletions l10n_pt_stock_vehicle_daily/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
=====================================
Transport Documents for Vehicle Stock
=====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ce5bb2dbe923e0a11be42d0f30b6194bfdf0fc4bb60facbaecca61f49e43fb27
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--portugal-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-portugal/tree/16.0/l10n_pt_stock_vehicle_daily
:alt: OCA/l10n-portugal
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-portugal-16-0/l10n-portugal-16-0-l10n_pt_stock_vehicle_daily
: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/l10n-portugal&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Goods may be loaded and stored in a company vehicle, and not be a customer delivery or a
supplier pickup.

Examples are a travelling salesman carrying stock that might be later sold, or a
maintenance and repair technician carrying tools and spare parts.

Portuguese Tax Authorities require these to be electronically communicated every day to
their system.

This feature provides a quick way generate such document.

**Table of contents**

.. contents::
:local:

Usage
=====

Usage:

- On the Inventory Dashboard, the daily vehicle document card shows a "Move on Hand"
button at the bottom. Click on it to open an assisstant window.
- On the "Move from location" form, select the Origin Location for the Vehicle.

- The destination location will be automatically set as the same as the origin
location.
- The "License Plate" field will be automatically populated.
- The location's current stock will be selected in the lines.

- Click on "Immediate Transfer" to create the supporting transfer, or "Planned Transfer"
if changes to the stock content are needed.
- On the craeted Transfer, you can print the Delivery Slip.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-portugal/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/l10n-portugal/issues/new?body=module:%20l10n_pt_stock_vehicle_daily%0Aversion:%2016.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.

Credits
=======

Authors
~~~~~~~

* Luz de Airbag
* Open Source Integrators

Contributors
~~~~~~~~~~~~

* `Open Source Integrators <https://www.opensourceintegrators.com>`_

* Daniel Reis (dreis@opensourceintegrators.com)

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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/l10n-portugal <https://github.com/OCA/l10n-portugal/tree/16.0/l10n_pt_stock_vehicle_daily>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions l10n_pt_stock_vehicle_daily/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
20 changes: 20 additions & 0 deletions l10n_pt_stock_vehicle_daily/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2024 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Transport Documents for Vehicle Stock",
"summary": "Daily documente with vehicle content, "
"to communicate to Portuguese Tax Authorities",
"website": "https://github.com/OCA/l10n-portugal",
"license": "AGPL-3",
"author": "Luz de Airbag, Open Source Integrators, Odoo Community Association (OCA)",
"category": "Warehouse",
"version": "16.0.1.0.0",
"depends": [
"stock_move_location", # from OCA/stock-logistics-warehouse
],
"data": [
"views/stock_location_views.xml",
"views/stock_picking_views.xml",
"wizard/stock_move_location_views.xml",
],
}
3 changes: 3 additions & 0 deletions l10n_pt_stock_vehicle_daily/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import stock_location
from . import stock_picking
from . import stock_picking_type
10 changes: 10 additions & 0 deletions l10n_pt_stock_vehicle_daily/models/stock_location.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2024 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class StockLocation(models.Model):
_inherit = "stock.location"

l10n_pt_license_plate = fields.Char("License Plate")
10 changes: 10 additions & 0 deletions l10n_pt_stock_vehicle_daily/models/stock_picking.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2024 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class StockPicking(models.Model):
_inherit = "stock.picking"

l10n_pt_license_plate = fields.Char("License Plate")
16 changes: 16 additions & 0 deletions l10n_pt_stock_vehicle_daily/models/stock_picking_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class StockPickingType(models.Model):
_inherit = "stock.picking.type"

def action_move_location(self):
action = super().action_move_location()
# The Vehicle Locatin needs to be selected,
# So by default enable editing the location field
if self.code == "internal":
action["context"]["default_edit_locations"] = True
return action
5 changes: 5 additions & 0 deletions l10n_pt_stock_vehicle_daily/readme/CONFIGURATION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Configuration:

- Create an Operation Type, for the vehicle daily document, of type Internal, and enable
the "Show Move On Hand Stock" checkbox.
- Create an internal Stock Location por each vehicle, and set the "License Plate" field.
3 changes: 3 additions & 0 deletions l10n_pt_stock_vehicle_daily/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Open Source Integrators <https://www.opensourceintegrators.com>`_

* Daniel Reis (dreis@opensourceintegrators.com)
10 changes: 10 additions & 0 deletions l10n_pt_stock_vehicle_daily/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Goods may be loaded and stored in a company vehicle, and not be a customer delivery or a
supplier pickup.

Examples are a travelling salesman carrying stock that might be later sold, or a
maintenance and repair technician carrying tools and spare parts.

Portuguese Tax Authorities require these to be electronically communicated every day to
their system.

This feature provides a quick way generate such document.
14 changes: 14 additions & 0 deletions l10n_pt_stock_vehicle_daily/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Usage:

- On the Inventory Dashboard, the daily vehicle document card shows a "Move on Hand"
button at the bottom. Click on it to open an assisstant window.
- On the "Move from location" form, select the Origin Location for the Vehicle.

- The destination location will be automatically set as the same as the origin
location.
- The "License Plate" field will be automatically populated.
- The location's current stock will be selected in the lines.

- Click on "Immediate Transfer" to create the supporting transfer, or "Planned Transfer"
if changes to the stock content are needed.
- On the craeted Transfer, you can print the Delivery Slip.
Loading

0 comments on commit 6a9938b

Please sign in to comment.