diff --git a/product_contract/README.rst b/product_contract/README.rst index cf9a1e0aff..61debc991d 100644 --- a/product_contract/README.rst +++ b/product_contract/README.rst @@ -2,10 +2,13 @@ Recurring - Product Contract ============================ -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:fac583e1c22b30de7ea2d69428133dfb03265f366400a65c2d335ad3b2f6895e + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ Recurring - Product Contract :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github - :target: https://github.com/OCA/contract/tree/14.0/product_contract + :target: https://github.com/OCA/contract/tree/15.0/product_contract :alt: OCA/contract .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/contract-14-0/contract-14-0-product_contract + :target: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-product_contract :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/110/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=15.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module adds support for products to be linked to contract templates. @@ -51,8 +54,8 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -96,6 +99,6 @@ Current `maintainer `__: |maintainer-sbejaoui| -This module is part of the `OCA/contract `_ project on GitHub. +This module is part of the `OCA/contract `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_contract/__manifest__.py b/product_contract/__manifest__.py index 14a959fac2..fccfff8edf 100644 --- a/product_contract/__manifest__.py +++ b/product_contract/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Recurring - Product Contract", - "version": "14.0.1.1.0", + "version": "15.0.1.1.0", "category": "Contract Management", "license": "AGPL-3", "author": "LasLabs, " "ACSONE SA/NV, " "Odoo Community Association (OCA)", diff --git a/product_contract/models/contract_line.py b/product_contract/models/contract_line.py index 91c08480a0..4162a944ae 100644 --- a/product_contract/models/contract_line.py +++ b/product_contract/models/contract_line.py @@ -18,7 +18,7 @@ class ContractLine(models.Model): ) def _prepare_invoice_line(self, move_form): - res = super(ContractLine, self)._prepare_invoice_line(move_form) + res = super()._prepare_invoice_line(move_form) if self.sale_order_line_id and res: res["sale_line_ids"] = [(6, 0, [self.sale_order_line_id.id])] return res diff --git a/product_contract/models/product_template.py b/product_contract/models/product_template.py index 12bbeda64f..d55804b2e2 100644 --- a/product_contract/models/product_template.py +++ b/product_contract/models/product_template.py @@ -68,7 +68,7 @@ def write(self, vals): self.with_company(company).write( {"property_contract_template_id": False} ) - super().write(vals) + return super().write(vals) @api.constrains("is_contract", "type") def _check_contract_product_type(self): diff --git a/product_contract/models/sale_order.py b/product_contract/models/sale_order.py index 680505f0a5..ed3a5dca9d 100644 --- a/product_contract/models/sale_order.py +++ b/product_contract/models/sale_order.py @@ -94,8 +94,9 @@ def action_create_contract(self): raise ValidationError( _( "You must specify a contract " - "template for '{}' product in '{}' company." - ).format(order_line.product_id.name, rec.company_id.name) + "template for '%(order_line.product_id.name)s' " + "product in '%(rec.company_id.name)s' company." + ) ) contract_templates |= contract_template for contract_template in contract_templates: diff --git a/product_contract/models/sale_order_line.py b/product_contract/models/sale_order_line.py index ed9e91347a..180e7ddb48 100644 --- a/product_contract/models/sale_order_line.py +++ b/product_contract/models/sale_order_line.py @@ -43,8 +43,8 @@ class SaleOrderLine(models.Model): help="Specify if process date is 'from' or 'to' invoicing date", copy=False, ) - date_start = fields.Date(string="Date Start") - date_end = fields.Date(string="Date End") + date_start = fields.Date() + date_end = fields.Date() contract_line_id = fields.Many2one( comodel_name="contract.line", @@ -142,13 +142,13 @@ def onchange_date_start(self): @api.onchange("product_id") def product_id_change(self): - super().product_id_change() for rec in self: if rec.product_id.is_contract: rec.is_contract = True else: # Don't initialize wrong values rec.is_contract = False + return super().product_id_change() def _get_contract_line_qty(self): """Returns the quantity to be put on new contract lines.""" diff --git a/product_contract/readme/CONTRIBUTORS.rst b/product_contract/readme/CONTRIBUTORS.rst index 62a6b88fee..05b5c4b7ad 100644 --- a/product_contract/readme/CONTRIBUTORS.rst +++ b/product_contract/readme/CONTRIBUTORS.rst @@ -4,3 +4,6 @@ * Ernesto Tejeda * Pedro M. Baeza +* `Binhex `__: + + * Adasat Torres diff --git a/product_contract/static/description/index.html b/product_contract/static/description/index.html index 80c65180db..ce165f376f 100644 --- a/product_contract/static/description/index.html +++ b/product_contract/static/description/index.html @@ -3,7 +3,7 @@ - + Recurring - Product Contract