Skip to content

Commit

Permalink
change module name, fields name, update translations
Browse files Browse the repository at this point in the history
  • Loading branch information
rinaldifirdaus committed Oct 19, 2023
1 parent a4dc332 commit 446f0c4
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 62 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=======================================
Stock Picking Consumable Effective Date
=======================================
========================================
Stock Picking Consumable Accounting Date
========================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand All @@ -14,24 +14,24 @@ Stock Picking Consumable Effective Date
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2Faxls--custom-lightgray.png?logo=github
:target: https://github.com/qrtl/axls-custom/tree/16.0/stock_picking_consumable_effective_date
:target: https://github.com/qrtl/axls-custom/tree/16.0/stock_picking_consumable_accounting_date
:alt: qrtl/axls-custom

|badge1| |badge2| |badge3|

This module adds a computed field show_consumable_date to stock.picking.
When all the items in the picking are consumable products, the accounting_date field
will be displayed as 'Consumable Effective Date'.
This module adds a computed field show_consumable_accounting_date to stock.picking.
When all the items in the picking are consumable products, the accounting_date field
will be displayed as 'Consumable Accounting Date'.
If certain transfers in Odoo cannot be confirmed on the same date as the products are
received or delivered, the accounting_date for consumable products will be used to
received or delivered, the accounting_date for consumable products will be used to
record the actual transfer date.

Background
~~~~~~~~~~

For companies that must accurately record incoming and outgoing transfers date,
regardless of whether a product is designated as a Storable Product,
it becomes challenging to capture the actual transfer date when the transfer occurs at a later time,
For companies that must accurately record incoming and outgoing transfers date,
regardless of whether a product is designated as a Storable Product,
it becomes challenging to capture the actual transfer date when the transfer occurs at a later time,
as in Odoo's default behavior, the effective date is set to the confirmation date of the records and cannot be modified.

**Table of contents**
Expand All @@ -45,7 +45,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/qrtl/axls-custom/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/qrtl/axls-custom/issues/new?body=module:%20stock_picking_consumable_effective_date%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/qrtl/axls-custom/issues/new?body=module:%20stock_picking_consumable_accounting_date%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.

Expand All @@ -60,6 +60,6 @@ Authors
Maintainers
~~~~~~~~~~~

This module is part of the `qrtl/axls-custom <https://github.com/qrtl/axls-custom/tree/16.0/stock_picking_consumable_effective_date>`_ project on GitHub.
This module is part of the `qrtl/axls-custom <https://github.com/qrtl/axls-custom/tree/16.0/stock_picking_consumable_accounting_date>`_ project on GitHub.

You are welcome to contribute.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)

{
"name": "Stock Picking Consumable Effective Date",
"name": "Stock Picking Consumable Accounting Date",
"version": "16.0.1.0.0",
"author": "Quartile Limited",
"website": "https://www.quartile.co",
Expand Down
31 changes: 31 additions & 0 deletions stock_picking_consumable_accounting_date/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_consumable_accounting_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-19 04:03+0000\n"
"PO-Revision-Date: 2023-10-19 04:03+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: stock_picking_consumable_accounting_date
#: model_terms:ir.ui.view,arch_db:stock_picking_consumable_accounting_date.view_picking_form
msgid "Consumable Accounting Date"
msgstr "消耗品用会計日"

#. module: stock_picking_consumable_accounting_date
#: model:ir.model.fields,field_description:stock_picking_consumable_accounting_date.field_stock_picking__show_consumable_accounting_date
msgid "Show Consumable Accounting Date"
msgstr "消耗品用会計日を表示"

#. module: stock_picking_consumable_accounting_date
#: model:ir.model,name:stock_picking_consumable_accounting_date.model_stock_picking
msgid "Transfer"
msgstr "運送"
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@
class StockPicking(models.Model):
_inherit = "stock.picking"

show_consumable_date = fields.Boolean(compute="_compute_show_consumable_date")
show_consumable_accounting_date = fields.Boolean(
compute="_compute_show_consumable_accounting_date"
)

def _compute_show_consumable_date(self):
def _compute_show_consumable_accounting_date(self):
for pick in self:
pick.show_consumable_date = False
pick.show_consumable_accounting_date = False
if pick.picking_type_code not in ("incoming", "outgoing"):
continue
moves = pick.move_ids
# When all moves are consumables.
if moves and not moves.with_company(pick.company_id).product_id.filtered(
lambda x: x.detailed_type == "product"
):
pick.show_consumable_date = True
pick.show_consumable_accounting_date = True
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This module adds a computed field show_consumable_date to stock.picking.
This module adds a computed field show_consumable_accounting_date to stock.picking.
When all the items in the picking are consumable products, the accounting_date field
will be displayed as 'Consumable Effective Date'.
will be displayed as 'Consumable Accounting Date'.
If certain transfers in Odoo cannot be confirmed on the same date as the products are
received or delivered, the accounting_date for consumable products will be used to
record the actual transfer date.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Stock Picking Consumable Effective Date</title>
<title>Stock Picking Consumable Accounting Date</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,17 +360,17 @@
</style>
</head>
<body>
<div class="document" id="stock-picking-consumable-effective-date">
<h1 class="title">Stock Picking Consumable Effective Date</h1>
<div class="document" id="stock-picking-consumable-accounting-date">
<h1 class="title">Stock Picking Consumable Accounting Date</h1>

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" 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" 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" href="https://github.com/qrtl/axls-custom/tree/16.0/stock_picking_consumable_effective_date"><img alt="qrtl/axls-custom" src="https://img.shields.io/badge/github-qrtl%2Faxls--custom-lightgray.png?logo=github" /></a></p>
<p>This module adds a computed field show_consumable_date to stock.picking.
<p><a class="reference external" 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" 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" href="https://github.com/qrtl/axls-custom/tree/16.0/stock_picking_consumable_accounting_date"><img alt="qrtl/axls-custom" src="https://img.shields.io/badge/github-qrtl%2Faxls--custom-lightgray.png?logo=github" /></a></p>
<p>This module adds a computed field show_consumable_accounting_date to stock.picking.
When all the items in the picking are consumable products, the accounting_date field
will be displayed as ‘Consumable Effective Date’.
will be displayed as ‘Consumable Accounting Date’.
If certain transfers in Odoo cannot be confirmed on the same date as the products are
received or delivered, the accounting_date for consumable products will be used to
record the actual transfer date.</p>
Expand All @@ -392,7 +392,7 @@ <h2><a class="toc-backref" href="#id1">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/qrtl/axls-custom/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 smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/qrtl/axls-custom/issues/new?body=module:%20stock_picking_consumable_effective_date%0Aversion:%2016.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/qrtl/axls-custom/issues/new?body=module:%20stock_picking_consumable_accounting_date%0Aversion:%2016.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 All @@ -407,7 +407,7 @@ <h1>Authors</h1>
</div>
<div class="section" id="maintainers">
<h1>Maintainers</h1>
<p>This module is part of the <a class="reference external" href="https://github.com/qrtl/axls-custom/tree/16.0/stock_picking_consumable_effective_date">qrtl/axls-custom</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/qrtl/axls-custom/tree/16.0/stock_picking_consumable_accounting_date">qrtl/axls-custom</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
/>
<field name="arch" type="xml">
<xpath expr="//field[@name='accounting_date']" position="before">
<field name="show_consumable_date" invisible="1" />
<field name="show_consumable_accounting_date" invisible="1" />
<field
name="accounting_date"
string="Consumable Accounting Date"
attrs="{'invisible': [('show_consumable_date', '=', False)],'readonly': [('state', '=', 'cancel')]}"
attrs="{'invisible': [('show_consumable_accounting_date', '=', False)],'readonly': [('state', '=', 'cancel')]}"
/>
</xpath>
</field>
Expand Down
31 changes: 0 additions & 31 deletions stock_picking_consumable_effective_date/i18n/ja.po

This file was deleted.

0 comments on commit 446f0c4

Please sign in to comment.