forked from OCA/product-attribute
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG][16.0] product_expiry_configurable
- Rely mostly on Odoo core behaviour (expiration_date/use_expiration_date) - Odoo computes correctly the expiration date from now() on stock lots - Improve tests with a common
- Loading branch information
1 parent
f93d484
commit e70d132
Showing
19 changed files
with
310 additions
and
644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,13 @@ Product Expiry Configurable | |
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github | ||
:target: https://github.com/OCA/product-attribute/tree/14.0/product_expiry_configurable | ||
:target: https://github.com/OCA/product-attribute/tree/16.0/product_expiry_configurable | ||
:alt: OCA/product-attribute | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_expiry_configurable | ||
:target: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_expiry_configurable | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/135/14.0 | ||
:target: https://runbot.odoo-community.org/runbot/135/16.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
@@ -43,7 +43,7 @@ Bug Tracker | |
Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/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/OCA/product-attribute/issues/new?body=module:%20product_expiry_configurable%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_expiry_configurable%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. | ||
|
||
|
@@ -56,6 +56,7 @@ Contributors | |
* `CreuBlanca <https://www.creublanca.es>`_: | ||
|
||
* Alba Riera <[email protected]> | ||
* Denis Roussel <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
@@ -70,6 +71,6 @@ 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/product-attribute <https://github.com/OCA/product-attribute/tree/14.0/product_expiry_configurable>`_ project on GitHub. | ||
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/16.0/product_expiry_configurable>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 55 additions & 72 deletions
127
product_expiry_configurable/data/product_expiry_data.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,62 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<data noupdate="1"> | ||
<odoo noupdate="1"> | ||
|
||
<record id="mail_activity_type_expiry_date_reached" model="mail.activity.type"> | ||
<field name="name">Expiry Date Reached</field> | ||
<field name="category">default</field> | ||
<field name="res_model_id" ref="stock.model_stock_production_lot" /> | ||
<field name="icon">fa-tasks</field> | ||
<field name="delay_count">0</field> | ||
</record> | ||
<record id="mail_activity_type_expiry_date_reached" model="mail.activity.type"> | ||
<field name="name">Expiry Date Reached</field> | ||
<field name="category">default</field> | ||
<field name="res_model">stock.lot</field> | ||
<field name="icon">fa-tasks</field> | ||
<field name="delay_count">0</field> | ||
</record> | ||
|
||
<record | ||
model="ir.cron" | ||
forcecreate="True" | ||
id="ir_cron_product_expiry_removal_date" | ||
> | ||
<field name="name">Product Removal Date Reached</field> | ||
<field name="active" eval="0" /> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="model_id" ref="stock.model_stock_production_lot" /> | ||
<field name="state">code</field> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="doall" eval="0" /> | ||
<field | ||
name="code" | ||
>model._expiry_date_exceeded(date_field='removal_date')</field> | ||
<field | ||
name="nextcall" | ||
eval="(DateTime.now()).strftime('%Y-%m-%d 22:00:00')" | ||
/> | ||
</record> | ||
<record model="ir.cron" forcecreate="True" id="ir_cron_product_expiry_removal_date"> | ||
<field name="name">Product Removal Date Reached</field> | ||
<field name="active" eval="0" /> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="model_id" ref="stock.model_stock_lot" /> | ||
<field name="state">code</field> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="doall" eval="0" /> | ||
<field | ||
name="code" | ||
>model._expiry_date_exceeded(date_field='removal_date')</field> | ||
<field name="nextcall" eval="(DateTime.now()).strftime('%Y-%m-%d 22:00:00')" /> | ||
</record> | ||
|
||
<record model="ir.cron" forcecreate="True" id="ir_cron_product_expiry_use_date"> | ||
<field name="name">Product Use Date Reached</field> | ||
<field name="active" eval="0" /> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="model_id" ref="stock.model_stock_production_lot" /> | ||
<field name="state">code</field> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="doall" eval="0" /> | ||
<field | ||
name="code" | ||
>model._expiry_date_exceeded(date_field='use_date')</field> | ||
<field | ||
name="nextcall" | ||
eval="(DateTime.now()).strftime('%Y-%m-%d 22:00:00')" | ||
/> | ||
</record> | ||
<record model="ir.cron" forcecreate="True" id="ir_cron_product_expiry_use_date"> | ||
<field name="name">Product Use Date Reached</field> | ||
<field name="active" eval="0" /> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="model_id" ref="stock.model_stock_lot" /> | ||
<field name="state">code</field> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="doall" eval="0" /> | ||
<field name="code">model._expiry_date_exceeded(date_field='use_date')</field> | ||
<field name="nextcall" eval="(DateTime.now()).strftime('%Y-%m-%d 22:00:00')" /> | ||
</record> | ||
|
||
<record | ||
model="ir.cron" | ||
forcecreate="True" | ||
id="ir_cron_product_expiry_expiration_date" | ||
> | ||
<field name="name">Product Expiration Date Reached</field> | ||
<field name="active" eval="0" /> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="model_id" ref="stock.model_stock_production_lot" /> | ||
<field name="state">code</field> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="doall" eval="0" /> | ||
<field | ||
name="code" | ||
>model._expiry_date_exceeded(date_field='expiration_date')</field> | ||
<field | ||
name="nextcall" | ||
eval="(DateTime.now()).strftime('%Y-%m-%d 22:00:00')" | ||
/> | ||
</record> | ||
<record | ||
model="ir.cron" | ||
forcecreate="True" | ||
id="ir_cron_product_expiry_expiration_date" | ||
> | ||
<field name="name">Product Expiration Date Reached</field> | ||
<field name="active" eval="0" /> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="model_id" ref="stock.model_stock_lot" /> | ||
<field name="state">code</field> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="doall" eval="0" /> | ||
<field | ||
name="code" | ||
>model._expiry_date_exceeded(date_field='expiration_date')</field> | ||
<field name="nextcall" eval="(DateTime.now()).strftime('%Y-%m-%d 22:00:00')" /> | ||
</record> | ||
|
||
</data> | ||
</odoo> |
13 changes: 0 additions & 13 deletions
13
product_expiry_configurable/migrations/14.0.1.0.0/noupdate_changes.xml
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
product_expiry_configurable/migrations/14.0.1.0.0/post-migration.py
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
product_expiry_configurable/migrations/14.0.1.0.0/pre-migration.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from . import stock_production_lot | ||
from . import stock_lot | ||
from . import product_template | ||
from . import product_category |
Oops, something went wrong.