Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] rental_pricelist_interval #57

Open
wants to merge 74 commits into
base: 17.0
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
ad31fd3
Port sale_start_end_dates and sale_rental (#353)
Nov 8, 2016
9cdc3d4
sale_start_end_dates and sale_rental
dvdhinesh Nov 15, 2016
dfa6288
Product qty on rental pickings
alexis-via May 11, 2017
95b0765
Auto configure sale_rental module via post_install.py script
alexis-via May 24, 2017
14792b4
sale_rental: fix warning @constrains parameter 'must_have_dates' is n…
alexis-via Apr 4, 2018
70c3183
pylint
rousseldenis Sep 4, 2018
48e6e30
sale_rental: Migration to 11.0
Mar 29, 2019
1fdb437
[MIG] sale_start_end_dates and sale_rental to v12
alexis-via Jul 14, 2019
fc973e8
sale_rental: Improve the code of object sale.rental
alexis-via Jul 16, 2019
bce7f18
[IMP] enhancements suggested in code reviews
gurneyalex Oct 15, 2019
6bc1f0a
[FIX] Archive rental routes rather than delete
sadamo Oct 15, 2019
fecaf3f
[UPD] Update sale_rental.pot
oca-travis Sep 16, 2020
d8a4b81
[UPD] README.rst
OCA-git-bot Sep 16, 2020
380af26
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Oct 1, 2020
968f2cd
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Oct 2, 2020
dd9cb7d
Update translation files
oca-transbot Oct 9, 2020
bbd7ec8
Update translation files
oca-transbot Nov 22, 2020
2393b6c
Translated using Weblate (Portuguese)
pedrocs-exo Feb 8, 2021
408d006
[IMP] sale_rental: extract function _run_rental_procurement
yweng8111 Mar 5, 2021
eff7446
[UPD] Update sale_rental.pot
oca-travis Mar 12, 2021
3548296
sale_rental 12.0.1.1.0
OCA-git-bot Mar 12, 2021
eb5ca0b
Update translation files
oca-transbot Mar 12, 2021
30b389e
[UPD] Update sale_rental.pot
oca-travis Mar 12, 2021
b9d2689
Update translation files
oca-transbot Mar 12, 2021
007e3f5
[MIG] sale_rental from v12 to v14
alexis-via Jul 31, 2021
cf07c6a
sale_rental: black, isort, etc.
alexis-via Jul 31, 2021
4f1486f
[UPD] Update sale_rental.pot
oca-travis Dec 7, 2021
2f76051
[UPD] README.rst
OCA-git-bot Dec 7, 2021
f8f9113
[MIG] sale_rental: Migration to 15.0
kirca Jan 17, 2022
68f7ab1
[IMP] : black, isort, prettier, pylint
kirca Jan 17, 2022
55c4884
[UPD] Update sale_rental.pot
May 17, 2022
3ccdd58
[UPD] README.rst
OCA-git-bot May 17, 2022
2d8d924
sale_rental 15.0.1.0.1
OCA-git-bot May 17, 2022
3daa40a
[UPD] README.rst
OCA-git-bot Jun 2, 2022
933787b
[UPD] README.rst
OCA-git-bot Jun 2, 2022
f1f72a0
Translated using Weblate (French (France))
gregory-moka Jun 3, 2022
95adb0a
Translated using Weblate (French (France))
gregory-moka Jun 3, 2022
46f9cf4
Translated using Weblate (French)
gregory-moka Jul 4, 2022
5d83c16
[16.0][MIG] sale_rental
Murtaza-OSI Jan 3, 2023
db64170
[IMP] sale_rental: black, isort, prettier
Mar 7, 2024
b247abb
[FIX] rework unit test
Mar 14, 2024
0f18339
[IMP] sale_rental: black, isort, prettier
Mar 14, 2024
a947ac5
[IMP] sale_rental: pre-commit auto fixes
edescalona Nov 27, 2024
6768771
[IMP] sale_rental: pre-commit auto fixes
edescalona Nov 27, 2024
0494a67
[MIG] sale_rental: Migration to 17.0
edescalona Nov 27, 2024
550716d
[REM] Remove sale_rental module from branch 17.0
edescalona Nov 27, 2024
4b33ccb
initial add of several rental modules
Oct 26, 2021
0290b70
[ADD] icon.png
OCA-git-bot Oct 26, 2021
7e6bb3f
[UPD] Update rental_pricelist_interval.pot
oca-travis Nov 1, 2021
5732730
Update translation files
oca-transbot Nov 1, 2021
7c0766f
[IMP] rental_pricelist_interval: black, isort, prettier
chandni300 Apr 20, 2022
3314bc8
[MIG] rental_pricelist_interval: Migration to 14.0
chandni300 Apr 20, 2022
1a19c2d
[UPD] Update rental_pricelist_interval.pot
oca-travis Apr 26, 2022
7397144
[14.0][IMP] rental_pricelist_interval: documentation improvement
chandni299 Oct 10, 2022
4f98154
[IMP] rental_base, rental_offday, rental_pricelist, rental_pricelist_…
chandni299 Oct 10, 2022
4967125
[IMP] change icon to rental modules
chandni299 Jan 3, 2023
cc9297d
[IMP] correct icon to rental modules
chandni299 Jan 17, 2023
4f4dc92
Update translation files
weblate Oct 9, 2023
3f39513
[IMP] remove data tags and string attribute from tree tag
chandni299 Feb 1, 2024
3776818
[UPD] Update rental_pricelist_interval.pot
Feb 5, 2024
a1073b4
Update translation files
weblate Feb 5, 2024
398b307
[IMP] rental_pricelist_interval: black, isort, prettier
Feb 19, 2024
10af30f
[MIG] rental_pricelist_interval: Migration to 15.0
Feb 19, 2024
6d91954
[IMP] rental_pricelist_interval: pre-commit auto fixes
edescalona Nov 28, 2024
0f532e1
[MIG] rental_pricelist_interval: Migration to 17.0
edescalona Nov 28, 2024
c154378
[DON'T MERGE] test-requirements.txt
edescalona Nov 29, 2024
3f228a4
[DON'T MERGE] test-requirements.txt
edescalona Nov 29, 2024
a9baf38
[DON'T MERGE] test-requirements.txt
edescalona Nov 29, 2024
0e34dca
[IMP] pre-commit
edescalona Nov 29, 2024
ba4e465
[17.0][FIX] correcting test
edescalona Nov 29, 2024
36d3745
[17.0][FIX] rental_pricelist_interval: Correcting a method invocation
edescalona Nov 29, 2024
ffbd099
[17.0][FIX] correcting test
edescalona Nov 29, 2024
6d055f5
[17.0][FIX] correcting test
edescalona Nov 29, 2024
50d3667
[17.0][FIX] correcting test
edescalona Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[IMP] rental_pricelist_interval: black, isort, prettier
  • Loading branch information
chandni300 authored and edescalona committed Nov 28, 2024
commit 7c0766f26a1bcfe098bff6589aa5c7628c37b9cc
1 change: 0 additions & 1 deletion rental_pricelist_interval/README/CONFIGURATION.rst
Original file line number Diff line number Diff line change
@@ -10,4 +10,3 @@ To configure this module, you need to:

#. If desired go to 'RS (Prefix and Suffix)' tab an define how rental interval service product
names and reference numbers are created.

1 change: 0 additions & 1 deletion rental_pricelist_interval/README/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -5,4 +5,3 @@ Contributors
Odoo Community Association (OCA)/Elego Software Solutions GmbH
* Ben Brich <b.brich@humanilog.org> (www.humanilog.org)
* Yu Weng <yweng@elegosoft.com> (www.elegosoft.com)

1 change: 0 additions & 1 deletion rental_pricelist_interval/README/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -16,4 +16,3 @@ of odoo price lists. This enables to rent out products and charge for day interv

These ranges can be configured freely on general and/or product level. In contrast to rentals
on daily, monthly or yearly bases a different price computation is applied in sale order lines.

1 change: 0 additions & 1 deletion rental_pricelist_interval/README/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -20,4 +20,3 @@ Changelog
- a35a62d4 2020-12-22 22:59:30 +0100 kay.haeusler@elego.de regenerate all de.po and \*.pot files; issue #4016
- 83ed8f72 2020-12-22 18:06:08 +0100 wagner@elegosoft.com all Python code reformatted by black code formatter (issue #4016)
- 49a24464 2020-12-15 16:54:08 +0100 yweng@elegosoft.com [ADD] Module rental_pricelist_interval (issue #3979)

1 change: 0 additions & 1 deletion rental_pricelist_interval/README/USAGE.rst
Original file line number Diff line number Diff line change
@@ -16,4 +16,3 @@ To use this module, you need to:
from base price and interval ranges configured in company settings.

#. Adapt interval min. quantities or prices for the selected product if desired.

4 changes: 2 additions & 2 deletions rental_pricelist_interval/data/product_pricelist_data.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<!-- Price list -->
<record id="pricelist_interval" model="product.pricelist">
<field name="name">Public Pricelist (Interval)</field>
<field name="sequence">10</field>
<field name="is_interval_pricelist" eval="True"/>
<field name="is_interval_pricelist" eval="True" />
</record>

<!--
6 changes: 3 additions & 3 deletions rental_pricelist_interval/data/product_uom_data.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<record id="product_uom_interval" model="uom.uom">
<field name="name">Interval(s)</field>
<field name="uom_type">bigger</field>
<field ref="uom.uom_categ_wtime" name="category_id"/>
<field name="factor" eval="1.000"/>
<field ref="uom.uom_categ_wtime" name="category_id" />
<field name="factor" eval="1.000" />
</record>
</data>
</odoo>
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from odoo import SUPERUSER_ID
from odoo.api import Environment

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openupgradelib import openupgrade
from odoo.tools.float_utils import float_compare, float_round, float_is_zero
import logging

from openupgradelib import openupgrade

_logger = logging.getLogger(__name__)


5 changes: 2 additions & 3 deletions rental_pricelist_interval/models/sale.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Part of rental-vertical See LICENSE file for full copyright and licensing details.

from odoo import api, fields, models, exceptions, _
from odoo.tools import float_compare
from odoo.exceptions import ValidationError, UserError
from odoo import _, api, fields, models
from odoo.exceptions import UserError


class SaleOrderLine(models.Model):
8 changes: 6 additions & 2 deletions rental_pricelist_interval/tests/test_rental_pricelist.py
Original file line number Diff line number Diff line change
@@ -2,9 +2,13 @@

from dateutil.relativedelta import relativedelta

from odoo import exceptions, fields

from odoo.addons.rental_base.tests.stock_common import RentalStockCommon
from odoo.addons.rental_pricelist.tests.test_rental_pricelist import _run_sol_onchange_display_product_id, _run_sol_onchange_date
from odoo import fields, exceptions
from odoo.addons.rental_pricelist.tests.test_rental_pricelist import (
_run_sol_onchange_date,
_run_sol_onchange_display_product_id,
)


class TestRentalPricelist(RentalStockCommon):
66 changes: 42 additions & 24 deletions rental_pricelist_interval/views/product_view.xml
Original file line number Diff line number Diff line change
@@ -1,43 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<!-- ProductProduct -->
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">view.product.product.form</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="rental_pricelist.product_normal_form_view"/>
<field name="inherit_id" ref="rental_pricelist.product_normal_form_view" />
<field name="arch" type="xml">
<xpath expr="//page[@name='rental_price']/group" position='inside'>
<group string="Interval Basis">
<field name="rental_of_interval"/>
<field name="def_interval_pricelist_id" invisible="1"/>
<field name="rental_price_interval" attrs="{'invisible': [('rental_of_interval','=',False)]}"/>
<field name="rental_interval_max" attrs="{'invisible': [('rental_of_interval','=',False)]}"/>
<field name="product_rental_interval_id" groups="base.group_no_one"/>
<field name="rental_of_interval" />
<field name="def_interval_pricelist_id" invisible="1" />
<field
name="rental_price_interval"
attrs="{'invisible': [('rental_of_interval','=',False)]}"
/>
<field
name="rental_interval_max"
attrs="{'invisible': [('rental_of_interval','=',False)]}"
/>
<field
name="product_rental_interval_id"
groups="base.group_no_one"
/>
<strong colspan="1" class="oe_inline">Bulk Prices</strong>
<button name="action_reset_rental_price_interval_items"
type="object" string="Reset Interval Prices" class="oe_inline"/>
<field name="interval_scale_pricelist_item_ids"
position="inside"
domain="[('product_id', '=', product_rental_interval_id),
<button
name="action_reset_rental_price_interval_items"
type="object"
string="Reset Interval Prices"
class="oe_inline"
/>
<field
name="interval_scale_pricelist_item_ids"
position="inside"
domain="[('product_id', '=', product_rental_interval_id),
('pricelist_id', '=', def_interval_pricelist_id)]"
context="{
context="{
'default_applied_on': '0_product_variant',
'default_compute_price': 'fixed',
'default_product_id': product_rental_interval_id, 'default_pricelist_id': def_interval_pricelist_id}"
attrs="{'invisible': ['|', ('rental_of_interval', '=', False), ('product_rental_interval_id', '=', False)]}"
nolabel="1"
colspan="2"
attrs="{'invisible': ['|', ('rental_of_interval', '=', False), ('product_rental_interval_id', '=', False)]}"
nolabel="1"
colspan="2"
>
<tree string="Pricelist Items" editable="bottom">
<field name="min_quantity"/>
<field name="fixed_price" string="Price"
required="1" widget="monetary"
options="{'currency_field': 'currency_id'}"/>
<field name="compute_price" invisible="1"/>
<field name="applied_on" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="pricelist_id" invisible="1"/>
<field name="min_quantity" />
<field
name="fixed_price"
string="Price"
required="1"
widget="monetary"
options="{'currency_field': 'currency_id'}"
/>
<field name="compute_price" invisible="1" />
<field name="applied_on" invisible="1" />
<field name="product_id" invisible="1" />
<field name="pricelist_id" invisible="1" />
</tree>
</field>
</group>
23 changes: 13 additions & 10 deletions rental_pricelist_interval/views/res_company_view.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<record id="view_company_form" model="ir.ui.view">
<field name="name">res.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="inherit_id" ref="base.view_company_form" />
<field name="arch" type="xml">
<notebook position="inside">
<page string="Rental Interval Prices">
<group>
<field name="rental_price_interval_rule_ids" nolabel="1">
<tree editable="buttom">
<field name="name"/>
<field name="min_quantity"/>
<field name="factor"/>
<field name="name" />
<field name="min_quantity" />
<field name="factor" />
</tree>
</field>
</group>
@@ -25,14 +25,17 @@
<record id="view_company_rental_service_form" model="ir.ui.view">
<field name="name">res.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="rental_pricelist.view_company_rental_service_form"/>
<field
name="inherit_id"
ref="rental_pricelist.view_company_rental_service_form"
/>
<field name="arch" type="xml">
<xpath expr="//group[@name='service_hour']" position="after">
<group name="service_interval">
<field name="rental_service_name_prefix_interval"/>
<field name="rental_service_name_suffix_interval"/>
<field name="rental_service_default_code_prefix_interval"/>
<field name="rental_service_default_code_suffix_interval"/>
<field name="rental_service_name_prefix_interval" />
<field name="rental_service_name_suffix_interval" />
<field name="rental_service_default_code_prefix_interval" />
<field name="rental_service_default_code_suffix_interval" />
</group>
</xpath>
</field>
6 changes: 3 additions & 3 deletions rental_pricelist_interval/views/sale_view.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<record id="product_pricelist_view" model="ir.ui.view">
<field name="name">product.pricelist.form</field>
<field name="model">product.pricelist</field>
<field name="inherit_id" ref="product.product_pricelist_view"/>
<field name="inherit_id" ref="product.product_pricelist_view" />
<field name="arch" type="xml">
<field name="country_group_ids" position="after">
<field name="is_interval_pricelist"/>
<field name="is_interval_pricelist" />
</field>
</field>
</record>