-
-
Notifications
You must be signed in to change notification settings - Fork 601
[19.0] [MIG] contract: Migration to 19.0 #1312
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
Open
BhaveshHeliconia
wants to merge
198
commits into
OCA:19.0
Choose a base branch
from
HeliconiaIO:19.0-mig-contract
base: 19.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
198 commits
Select commit
Hold shift + click to select a range
4ee8e41
[ADD] account_analytic_analysis_recurring
3da1563
[IMP+FIX] Pot file and Dutch translation + PEP8
0f429d7
[IMP+FIX] account_analytic_analysis_recurring: Several things
pedrobaeza 95429dc
[FIX] contract: Set correct company on invoices when working on multi…
049d807
[IMP] account_analytic_analysis_recurring: Hook method for preparing …
pedrobaeza 7d83b88
[MIG] contract: from v7 to v9 improving features
carlosdauden c642d96
[9.0][IMP] contract: Get default invoice contact. (#32)
carlosdauden f647a1d
[IMP+FIX] contract: Better README + category + assign contract uncond…
pedrobaeza b9ab3e0
[IMP] contract: Add past receipt type. Fix yearly. Add month last day
carlosdauden 7135fa0
[MIG] contract: Migration to version 10.0
pedrobaeza f102855
[IMP][10.0] contract: Add templating (#42)
lasley b758d6f
Add 'Date of Next Invoice' in contract list view
astirpe c0e24bf
[FIX] contract: Operator issue in price get
lasley c4531fe
[IMP][10.0] contract: Add report + send by mail (#86)
cubells 2377058
[FIX] contract: Template lines handling (#92)
lasley dc31fa0
[FIX] contract: fix views assignment + improvement on tests + copyrig…
pedrobaeza 8cbf345
[IMP] contract: Module contract improvements (#107)
carlosdauden 725616b
[IMP] contract: Add display sequence on contract lines (#119)
e42eb35
[MIG] contract: Migration to version 11.0
f8b4334
[IMP] contract: Menu position
pedrobaeza aea33e4
[10.0][FIX+IMP] contract: Improve usability and don't fail on wrong d…
pedrobaeza e51ea0a
[10.0][FIX] Correct domain attribute in field journal_id (#120)
gorozcoh 6a39e76
[FIX+IMP] contract: Real fix to company_id missing + improvements + C…
pedrobaeza ecb9d41
[IMP+FIX] contract: Several things:
carlosdauden 9d8f04f
[IMP] contract: Automatic prices for lines
pedrobaeza 2e474b0
[FIX] contract: Let billing users have access rights for contracts (#…
levkar cb4165c
[IMP] contract: Add extend existing invoice possibility
carlosdauden 655ad56
[IMP] contract_variable_quantity: Recompute price when changing qty
pedrobaeza c5ac4c6
[FIX] contract: Custom values overwrited by xml, missed noupdate
carlosdauden dac6437
[IMP] contract: possible error in migration if the column does not exist
jonerikceberio ac27949
[FIX] analytic invoice/contract lines inheritance
katyukha cd8ec94
[IMP] Fix README.rst
RoelAdriaans 23ea3fd
[IMP] Add type to analytic account / contract
funbaker 45d60d0
[IMP] Make sure it works for sale and purchase contracts
MiquelRForgeFlow d01b835
Translated using Weblate (Portuguese (Portugal))
dreispt 4e2174c
[IMP] contract: Don't depend on external data
pedrobaeza 0074bed
[FIX] Contract Spanish Translation
d3eaa79
[MIG] contract: Migration to 12.0
sbejaoui a61e6c6
[FIX] Errors in navigation to customer invoices / vendor bills
JordiBForgeFlow 95a501b
Remove invalid Chinese translation files
liweijie0812 4076418
[IMP] contract: Make recurrence mechanism on contract line
sbejaoui c46c357
[REF+FIX+IMP] Contract: invoice creation + date start required for co…
ThomasBinsfeld 620cf81
[FIX+IMP] contract: several things
sbejaoui 8449003
[FIX] Contract: copy payment term on generated invoice
ThomasBinsfeld 4c6c4f9
[IMP] - Should be able to stop a past contract line
sbejaoui 756cb22
[ADD] Contract: fiscal position
ThomasBinsfeld 9c9082e
[FIX+IMP] contract: recurring_next_date is required if date_end is nu…
sbejaoui 8a90a70
[IMP] Contract: matching invoice view depending on contract type
ThomasBinsfeld 5d9ef08
[ADD] - Add more value for auto_renew_rule_type
sbejaoui 9d620e7
[FIX] Contract to Invoice: take contract vendor instead of partner's
ThomasBinsfeld 2b9c182
[REF+FIX+IMP] contract: Several things
sbejaoui d88d9f1
[IMP]pass the payment term to the contract from the partner
AaronHForgeFlow 46f2f59
[REF] contract: Several things
ThomasBinsfeld 7afdb95
[IMP] - Make one migration from 12.0.1 to 12.0.4
sbejaoui 62435d3
[FIX+IMP+MIG] contract: Several refinements:
pedrobaeza 8e5121b
[MIG+FIX] contract: Missing pieces for moving info from analytic acco…
pedrobaeza 88bfae6
Add commercial_partner_id fields into contract module
hparfr 43f1e6d
[MIG] contract: Assign old partner's salesman to migrated contracts
pedrobaeza 72c83ef
[12.0][FIX] contract & contract_sale - security fix
enriquemartin 72309cc
[MIG] contract: Missing renaming of invoice link
pedrobaeza dbd663d
[MIG] contract: Create contract sequence for allowing to create records
pedrobaeza 2460edb
[IMP+FIX] contract: Add multi-company access rule for contract object…
sbejaoui 0a70a3e
[FIX] contract: Fix performance issue on contract line read + Fix con…
sbejaoui 493a969
[MIG] contract: No contract on AA without recurring invoices flag
pedrobaeza d18b55e
[IMP] contract: Fix test crash with other modules
sergio-teruel f22a0ea
[MIG][FIX] contract: Move contracts, but disable them
pedrobaeza e33d485
[12.0][FIX] - Run onchange contract_type when changing the contract t…
sbejaoui 79c2d7b
[FIX] contract: Don't execute onchange after invoice creation + Tests…
pedrobaeza 15c0350
[REF] contract: Several refactorings
sbidoul 01b0095
[REF+FIX+IMP] contract: Several refactorings + fixes + imps
sbidoul 1dd098b
[FIX+REF] contract: Improve unit tests + add unit test for different …
sbejaoui 1ed8384
[IMP] contract: display invoicing offset
sbidoul 985a760
[IMP+FIX] contract: Several things
sbejaoui 8c031c8
[IMP+FIX] contract: Add failing test for wrong invoicing date after c…
sbejaoui e7e3d6a
[FIX] contract: Handle properly multi-company setups
pedrobaeza 2342912
[IMP] contract: remove redundant method
pedrobaeza b305e5e
[12.0][IMP] - Add an action for contracts manual invoicing
sbejaoui 7ecfc10
[IMP] contract: add analytic_tag_ids field in contract lines
c2a980a
[IMP] contract: Improve partner With running contracts search view fi…
sbejaoui a02be19
[IMP] - Add contract tags
sbejaoui 1a26a1b
Set company_id earlier in the invoice preparation process so that _on…
svalaeys 8631e3d
[FIX] contract: Delete cascade line wizard
pedrobaeza 5c717d6
[IMP] - Place id attribute before model
sbejaoui 047a26a
[IMP] contract: add section and notes in contract line
dab32a5
[FIX+IMP] contract: improve test coverage with new sections + fix sea…
pedrobaeza 13f26ab
[FIX] contract: Select the correct sections/notes to be invoiced
4d66907
[IMP] - Contract: add new recurring_rule_type quarterly and semesterly
sbejaoui 3c08618
[FIX] contract: Currency is not editable + pricelist from partner
pedrobaeza 8e775df
[FIX] contract: do not die if modified partner has contracts in sever…
4b4b70e
[IMP] contract: Allow to set a manual currency
pedrobaeza fc1ee4b
[FIX] contract: multi-company assignment notification
34058b5
[12.0][FIX] - fiscal position, payment mode and pricelist obtained ac…
sbejaoui 6267c30
[IMP] : black, isort, prettier
pedrobaeza b71c16d
[MIG] contract: Migration to 13.0
pedrobaeza 2951e16
[IMP+REF] contract: Allow to set recurrency at header level
pedrobaeza 6dfabfc
[13.0][FIX] contract: Recompute recurring next date
rousseldenis 1f94aa9
[IMP] contract: Set a condicion to avoid create lines on invoices
CarlosRoca13 d8f4cc0
[FIX] contract: Only include 'section_and_note_one2many' js widget in…
victoralmau 899a038
[IMP] contract: Add followers to invoices created
victoralmau 064493d
[IMP] contract: Portal
victoralmau 01e0f10
[IMP] contract: JS tour on test assets
pedrobaeza 3ebbf77
[IMP] contract: Add contract modification + contract: Add fields to c…
victoralmau 645743b
[FIX] contract: Modification mail + Auto-create follower in contract …
victoralmau 56bb9cd
[13.0][FIX] contract: Impossible to create invoices from contract lin…
rousseldenis 49f250b
[FIX] contract: Error in test_contract_invoice_followers
victoralmau 7225d70
[FIX] contract: remove groupby if it is in context + consistency betw…
e8c7d93
[13.0][FIX] contract: consistency between contract count and contract…
newtratip d822a41
[OU-FIX] contract: Don't alter v12 recurrence mechanism + Transfer co…
pedrobaeza 42cfa2b
[FIX] contract: Changed modification_mail auto to appear like email a…
victoralmau 8807d28
[IMP] contract: black, isort, prettier
ozono 29382e9
[MIG] contract: Migration to 14.0
ozono d997db9
[FIX] contract: restore readme images
ozono 3cd0b3e
[FIX] contract: Don't change period start date having line recurrence
pedrobaeza 9280b45
[13.0][FIX] contract: Set layout for section and note in portal template
rousseldenis ba1e869
[IMP] contract: Improve code to show recurring_rule_type from contrac…
victoralmau bf29e39
[FIX] contract: Cleanup values on line when invoicing
pedrobaeza 404faa5
[FIX] contract: fix an obvious crash when self is a multi-recordset
alexis-via 1df6b57
[FIX] contract: Fix invoice creation and salesperson assignment
joao-p-marques 2c549b4
[IMP] contract: black, isort, prettier
jcdrubay 258e2c7
[MIG] contract: Migration to 15.0
jcdrubay ca0e779
[FIX] contract: Avoid error in invoicing contracts crone
manuelregidor 9bf380e
[15.0][IMP] modify production beta to stable
JoanMForgeFlow 55bf704
[IMP] contract: Add discount + price_subtotal fields to the contract …
victoralmau 5d09dd5
ADJ: When generating invoices from the Wizard to create invoices manu…
jcdrubay 6fe4a57
[FIX+IMP] contract: Several things
rousseldenis 1343095
[FIX] contract: add default_move_type in context
mariadforgeflow 27903e9
[FIX+IMP] contract: lots of things
rousseldenis 0fda7d1
[FIX] contract: change where security is given to group_account_invoi…
albariera acdfa57
[FIX] contract: Remove noupdate in mail template data
joao-p-marques aceb582
[15.0][IMP] contract : show tags with colors in the contract
chandni299 2c7f1fb
[IMP] contract: Use _prepare_home_portal_values() function.
victoralmau 2962ed9
[IMP] contract: Set invoice_user_id field with Form() to apply the co…
victoralmau 1168949
[IMP] Add link to contract in invoice chatter
1f1c204
[FIX] contract: bug onchange date_start (comparison between bool and …
mourad-ehm 88aeb1e
[IMP] contract: Set fixed start dates in test contracts
victoralmau 2c378cd
[FIX] contract: Switch string > title in buttons
pedrobaeza d20d04b
[MIG] contract: Migration to 16.0
wpichler 143fe57
[IMP] contract: Make portal link configurable
e282955
[16.0][FIX] contract: invoice message create
carolinafernandez-tecnativa 34f8798
[FIX] No contract line and invoices when contract is archived
fkantelberg c49a992
[FIX] contract: removed dateutil from dependencies
d72ac81
[FIX] Show analytic distribution and hide analytic account
fkantelberg 2aa6268
[MIG] contract: Remove analytic_account_id and add migration
fkantelberg fefe0d7
[FIX] contract: Change web_ribbon text to title to make it translatable
victoralmau a78068c
[FIX] contract: Move migration to post migration
fkantelberg 85a8e56
[16.0] contract: Show discount lines for users with the group 'Discou…
fkantelberg c8cf8e1
[IMP] contract: Protect line recurrrency change
pedrobaeza 023f73f
[16.0][IMP] contract and contract_sale_generation: Add translations
aliciagaarzo 8365d90
[FIX] contract: Fix modifications layout
pedrobaeza 109c10a
[IMP] contract: Remove buttons from contract lines if recurrence is n…
victoralmau 5de2e44
[16.0][IMP] contract: improve visual
aliciagaarzo 63d41c4
[16.0][IMP] contract and contract_variable_quantity: improve visual o…
aliciagaarzo 14d550b
[IMP] contract: black, isort, prettier
CRogos f2a7f1d
[MIG] contract: Migration to 17.0
CRogos 5ab4791
[17.0][IMP] contract: solve error for last_date_invoiced field
aliciagaarzo 984dfd1
[17.0][FIX] contract: report translations & change structure
769d6d3
[FIX] contract: Fix error when sending contract by email
carolinafernandez-tecnativa 445bf4d
[FIX] contract: Link format error for messages posted when creates ma…
sergio-teruel 36ee24f
[FIX] contract : ignore date constraint for a note
florian-dacosta a852a5e
[IMP] Add INVOICEMONTHNAME marker to line description
stenext 00b4102
[FIX] contract: link contract instead of move
carlos-lopez-tecnativa 7eb725d
[IMP] contract: Use %m instead of %B to obtain month
victoralmau 82b9cb2
[IMP] contract: Add contract lines entry point for reporting
rousseldenis cc894a4
[IMP] contract: Terminate contract lines with last_date_invoiced if i…
sergio-teruel 1f57545
[IMP] contract Report correction, prevent unintended styling when usi…
arielbarreiros96 ab5092c
[FIX] contract: Invoice creation message translatable
pedrobaeza f4b1166
[FIX]contract: Malformed expression in the column_invisible attribute.
adasatorres 24e188a
[IMP] contract: Adapting portal contract design to odoo style
pilarvargas-tecnativa 91266f6
[FIX] contract: Don't lose modification email layout
pedrobaeza 79ceee9
[18.0][MIG] contract
sbejaoui 01a6d1b
[REF] split contract module into: contract, contract_line_successor, …
sbejaoui 2aef5f4
[IMP] contract: Change `automatic_price` fields to stored
rousseldenis 687a334
[IMP] contract: Remove duplicate compute function for `price_unit` field
rousseldenis b9dfb6c
[IMP] contract: Reintroduce comment about onchanges on _inverse methods
rousseldenis d667622
[IMP] contract: Remove onchange on `product_id`
rousseldenis 4766be9
[IMP] contract: Use account.journal `_check_company_domain()` to get …
rousseldenis 4ead08a
[IMP] contract: Remove wrong api.model decorators + use Environment t…
rousseldenis bbd692a
[IMP] contract: remove blocking view in migration script
CRogos 1a23f6c
[IMP] contract and product_contract: pre-commit auto fixes
Anxo82 b578f83
[IMP] contract: make label for notes visible on contract view form
glitchov 714bf89
[FIX] contract: Remove test flag from contract because of "unknown ke…
CRogos d8262ae
[OU-FIX] contract: migration scripts
MiquelRForgeFlow a3427f2
[IMP] Contract line: compute display name
qgroulard 0862c12
[FIX] contract.recurring_create_invoice: Add ensure_one
tobiaszehntner bba6520
[IMP] contract: skip assignment when value unchanged to avoid trigger…
sbejaoui 755089c
[FIX] contract: automatic pricing should resptect pricelist quantity-…
RicardCForgeFlow 959fc38
[18.0][IMP] contract: hook for line is invoiceable
tobiaszehntner 0046ade
[IMP] contract: compute group_id based on analytic accounts in contra…
carlos-lopez-tecnativa 56f357c
[IMP] contract: store additional fields for analysis purposes
carlos-lopez-tecnativa 2eab7d1
[IMP] contract: enhance search filters and add a pivot view for contr…
carlos-lopez-tecnativa 781411a
[FIX] contract: Avoid the error when accessing the portal if the user…
victoralmau a6d2b36
[FIX] contract: Visual hint for cancelled lines in portal
pedrobaeza 96988d7
[IMP] contract: add paths to actions
marielejeune 6cc2651
[FIX] contract: Use another condition for forcingn a failure
etobella d7959ec
[18.0][IMP] contract: Improve contract lines view with section/note s…
cristina-hidalgo-tecnativa f2862d3
[FIX] contract : ignore date constraint for a note
florian-dacosta 35ac0f5
[IMP] contract: pre-commit auto fixes
BhaveshHeliconia 97c88f7
[MIG] contract: Migration to 19.0
BhaveshHeliconia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,180 @@ | ||
| .. image:: https://odoo-community.org/readme-banner-image | ||
| :target: https://odoo-community.org/get-involved?utm_source=readme | ||
| :alt: Odoo Community Association | ||
|
|
||
| ================================ | ||
| Recurring - Contracts Management | ||
| ================================ | ||
|
|
||
| .. | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! This file is generated by oca-gen-addon-readme !! | ||
| !! changes will be overwritten. !! | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! source digest: sha256:9113fca91ae857348dfcda39b18ae300714b6e728492df9b1df80bfcf95f3ce6 | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png | ||
| :target: https://odoo-community.org/page/development-status | ||
| :alt: Production/Stable | ||
| .. |badge2| image:: https://img.shields.io/badge/license-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%2Fcontract-lightgray.png?logo=github | ||
| :target: https://github.com/OCA/contract/tree/19.0/contract | ||
| :alt: OCA/contract | ||
| .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
| :target: https://translation.odoo-community.org/projects/contract-19-0/contract-19-0-contract | ||
| :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/contract&target_branch=19.0 | ||
| :alt: Try me on Runboat | ||
|
|
||
| |badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
|
||
| This module enables contracts management with recurring invoicing | ||
| functions. Also you can print and send by email contract report. | ||
|
|
||
| It works for customer contract and supplier contracts. | ||
|
|
||
| Contracts are shown in portal. | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
| :local: | ||
|
|
||
| Configuration | ||
| ============= | ||
|
|
||
| To view discount field in contract line, you need to set *Discount on | ||
| lines* in user access rights. | ||
|
|
||
| Contracts can be viewed on the portal (list and detail) if the user | ||
| logged into the portal is a follower of the contract. | ||
|
|
||
| Usage | ||
| ===== | ||
|
|
||
| 1. Contracts are in Invoicing -> Customers -> Customer and Invoicing -> | ||
| Vendors -> Supplier Contracts | ||
| 2. When creating a contract, fill fields for selecting the invoicing | ||
| parameters: | ||
|
|
||
| - a journal | ||
| - a price list (optional) | ||
|
|
||
| 3. And add the lines to be invoiced with: | ||
|
|
||
| - the product with a description, a quantity and a price | ||
| - the recurrence parameters: interval (days, weeks, months, months | ||
| last day or years), start date, date of next invoice (automatically | ||
| computed, can be modified) and end date (optional) | ||
| - auto-price, for having a price automatically obtained from the | ||
| price list | ||
| - #START# - #END# or #INVOICEMONTHNAME# in the description field to | ||
| display the start/end date or the start month of the invoiced | ||
| period in the invoice line description | ||
| - pre-paid (invoice at period start) or post-paid (invoice at start | ||
| of next period) | ||
|
|
||
| 4. The "Generate Recurring Invoices from Contracts" cron runs daily to | ||
| generate the invoices. If you are in debug mode, you can click on the | ||
| invoice creation button. | ||
| 5. The *Show recurring invoices* shortcut on contracts shows all | ||
| invoices created from the contract. | ||
| 6. The contract report can be printed from the Print menu | ||
| 7. The contract can be sent by email with the *Send by Email* button | ||
| 8. Contract templates can be created from the Configuration -> Contracts | ||
| -> Contract Templates menu. They allow to define default journal, | ||
| price list and lines when creating a contract. To use it, just select | ||
| the template on the contract and fields will be filled automatically. | ||
|
|
||
| - Contracts appear in portal to following users in every contract: | ||
|
|
||
| |image| | ||
|
|
||
| |image1| | ||
|
|
||
| |image2| | ||
|
|
||
| .. |image| image:: https://raw.githubusercontent.com/OCA/contract/19.0/contract/static/src/screenshots/portal-my.png | ||
| .. |image1| image:: https://raw.githubusercontent.com/OCA/contract/19.0/contract/static/src/screenshots/portal-list.png | ||
| .. |image2| image:: https://raw.githubusercontent.com/OCA/contract/19.0/contract/static/src/screenshots/portal-detail.png | ||
|
|
||
| Known issues / Roadmap | ||
| ====================== | ||
|
|
||
| - Recover states and others functional fields in Contracts. | ||
| - Add recurrence flag at template level. | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/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/contract/issues/new?body=module:%20contract%0Aversion:%2019.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 | ||
| ------- | ||
|
|
||
| * Tecnativa | ||
| * ACSONE SA/NV | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| - Angel Moya <angel.moya@domatix.com> | ||
|
|
||
| - Dave Lasley <dave@laslabs.com> | ||
|
|
||
| - Miquel Raïch <miquel.raich@eficent.com> | ||
|
|
||
| - Souheil Bejaoui <souheil.bejaoui@acsone.eu> | ||
|
|
||
| - Thomas Binsfeld <thomas.binsfeld@acsone.eu> | ||
|
|
||
| - Guillaume Vandamme <guillaume.vandamme@acsone.eu> | ||
|
|
||
| - Raphaël Reverdy <raphael.reverdy@akretion.com> | ||
|
|
||
| - `Tecnativa <https://www.tecnativa.com>`__: | ||
|
|
||
| - Pedro M. Baeza | ||
| - Carlos Dauden | ||
| - Vicent Cubells | ||
| - Rafael Blasco | ||
| - Víctor Martínez | ||
|
|
||
| - Iván Antón <ozono@ozonomultimedia.com> | ||
|
|
||
| - `APSL <https://www.apsl.tech>`__: | ||
|
|
||
| - Antoni Marroig <amarroig@apsl.net> | ||
|
|
||
| - `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__ | ||
|
|
||
| - Bhavesh Heliconia | ||
|
|
||
| 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/contract <https://github.com/OCA/contract/tree/19.0/contract>`_ project on GitHub. | ||
|
|
||
| You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| from . import controllers | ||
| from . import models | ||
| from . import wizards |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Copyright 2004-2010 OpenERP SA | ||
| # Copyright 2014-2018 Tecnativa - Pedro M. Baeza | ||
| # Copyright 2015 Domatix | ||
| # Copyright 2016-2018 Tecnativa - Carlos Dauden | ||
| # Copyright 2017 Tecnativa - Vicent Cubells | ||
| # Copyright 2016-2017 LasLabs Inc. | ||
| # Copyright 2018-2019 ACSONE SA/NV | ||
| # Copyright 2020-2021 Tecnativa - Pedro M. Baeza | ||
| # Copyright 2020 Tecnativa - Víctor Martínez | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
|
||
|
|
||
| { | ||
| "name": "Recurring - Contracts Management", | ||
| "version": "19.0.1.0.0", | ||
| "category": "Contract Management", | ||
| "license": "AGPL-3", | ||
| "author": "Tecnativa, ACSONE SA/NV, Odoo Community Association (OCA)", | ||
| "website": "https://github.com/OCA/contract", | ||
| "depends": ["base", "account", "product", "portal"], | ||
| "development_status": "Production/Stable", | ||
| "data": [ | ||
| "security/contract_tag.xml", | ||
| "security/ir.model.access.csv", | ||
| "security/contract_security.xml", | ||
| "report/report_contract.xml", | ||
| "report/contract_views.xml", | ||
| "data/contract_cron.xml", | ||
| "data/mail_template.xml", | ||
| "data/template_mail_notification.xml", | ||
| "data/mail_message_subtype.xml", | ||
| "data/ir_ui_menu.xml", | ||
| "views/contract_tag.xml", | ||
| "views/contract_template.xml", | ||
| "views/contract_template_line.xml", | ||
| "views/contract.xml", | ||
| "views/contract_line.xml", | ||
| "views/res_partner_view.xml", | ||
| "views/res_config_settings.xml", | ||
| "views/contract_portal_templates.xml", | ||
| "wizards/contract_manually_create_invoice.xml", | ||
| ], | ||
| "assets": { | ||
| "web.assets_frontend": ["contract/static/src/scss/frontend.scss"], | ||
| "web.assets_tests": ["contract/static/src/js/contract_portal_tour.esm.js"], | ||
| }, | ||
| "installable": True, | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
|
||
| from . import main |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| # Copyright 2020-2022 Tecnativa - Víctor Martínez | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
|
||
| from odoo import http | ||
| from odoo.exceptions import AccessError, MissingError | ||
| from odoo.http import request | ||
|
|
||
| from odoo.addons.portal.controllers.portal import CustomerPortal | ||
| from odoo.addons.portal.controllers.portal import pager as portal_pager | ||
|
|
||
|
|
||
| class PortalContract(CustomerPortal): | ||
| def _prepare_home_portal_values(self, counters): | ||
| values = super()._prepare_home_portal_values(counters) | ||
| if "contract_count" in counters: | ||
| contract_model = request.env["contract.contract"] | ||
| contract_count = ( | ||
| contract_model.search_count([]) | ||
| if contract_model.has_access("read") | ||
| else 0 | ||
| ) | ||
| values["contract_count"] = contract_count | ||
| return values | ||
|
|
||
| def _contract_get_page_view_values(self, contract, access_token, **kwargs): | ||
| values = { | ||
| "page_name": "Contracts", | ||
| "contract": contract, | ||
| } | ||
| return self._get_page_view_values( | ||
| contract, access_token, values, "my_contracts_history", False, **kwargs | ||
| ) | ||
|
|
||
| def _get_filter_domain(self, kw): | ||
| return [] | ||
|
|
||
| @http.route( | ||
| ["/my/contracts", "/my/contracts/page/<int:page>"], | ||
| type="http", | ||
| auth="user", | ||
| website=True, | ||
| ) | ||
| def portal_my_contracts( | ||
| self, page=1, date_begin=None, date_end=None, sortby=None, **kw | ||
| ): | ||
| values = self._prepare_portal_layout_values() | ||
| contract_obj = request.env["contract.contract"] | ||
| # Avoid error if the user does not have access. | ||
| if not contract_obj.has_access("read"): | ||
| return request.redirect("/my") | ||
| domain = self._get_filter_domain(kw) | ||
| searchbar_sortings = { | ||
| "date": { | ||
| "label": request.env._("Date"), | ||
| "order": "recurring_next_date desc", | ||
| }, | ||
| "name": {"label": request.env._("Name"), "order": "name desc"}, | ||
| "code": {"label": request.env._("Reference"), "order": "code desc"}, | ||
| } | ||
| # default sort by order | ||
| if not sortby or sortby not in searchbar_sortings: | ||
| sortby = "date" | ||
| order = searchbar_sortings[sortby]["order"] | ||
| # count for pager | ||
| contract_count = contract_obj.search_count(domain) | ||
| # pager | ||
| pager = portal_pager( | ||
| url="/my/contracts", | ||
| url_args={ | ||
| "date_begin": date_begin, | ||
| "date_end": date_end, | ||
| "sortby": sortby, | ||
| }, | ||
| total=contract_count, | ||
| page=page, | ||
| step=self._items_per_page, | ||
| ) | ||
| # content according to pager and archive selected | ||
| contracts = contract_obj.search( | ||
| domain, order=order, limit=self._items_per_page, offset=pager["offset"] | ||
| ) | ||
| request.session["my_contracts_history"] = contracts.ids[:100] | ||
| values.update( | ||
| { | ||
| "date": date_begin, | ||
| "contracts": contracts, | ||
| "page_name": "Contracts", | ||
| "pager": pager, | ||
| "default_url": "/my/contracts", | ||
| "searchbar_sortings": searchbar_sortings, | ||
| "sortby": sortby, | ||
| } | ||
| ) | ||
| return request.render("contract.portal_my_contracts", values) | ||
|
|
||
| @http.route( | ||
| ["/my/contracts/<int:contract_contract_id>"], | ||
| type="http", | ||
| auth="public", | ||
| website=True, | ||
| ) | ||
| def portal_my_contract_detail(self, contract_contract_id, access_token=None, **kw): | ||
| try: | ||
| contract_sudo = self._document_check_access( | ||
| "contract.contract", contract_contract_id, access_token | ||
| ) | ||
| except (AccessError, MissingError): | ||
| return request.redirect("/my") | ||
| values = self._contract_get_page_view_values(contract_sudo, access_token, **kw) | ||
| return request.render("contract.portal_contract_page", values) | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo noupdate="1"> | ||
| <record model="ir.cron" id="contract_cron_for_invoice"> | ||
| <field name="name">Generate Recurring Invoices from Contracts</field> | ||
| <field name="model_id" ref="model_contract_contract" /> | ||
| <field name="state">code</field> | ||
| <field name="code">model.cron_recurring_create_invoice()</field> | ||
| <field name="user_id" ref="base.user_root" /> | ||
| <field name="interval_number">1</field> | ||
| <field name="interval_type">days</field> | ||
| </record> | ||
| </odoo> |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo> | ||
| <menuitem | ||
| id="menu_config_contract" | ||
| name="Contracts" | ||
| sequence="1" | ||
| parent="account.menu_finance_configuration" | ||
| /> | ||
| </odoo> |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo noupdate="1"> | ||
| <record id="mail_message_subtype_invoice_created" model="mail.message.subtype"> | ||
| <field name="name">Invoice created</field> | ||
| <field name="res_model">contract.contract</field> | ||
| </record> | ||
| <record | ||
| id="mail_message_subtype_contract_modification" | ||
| model="mail.message.subtype" | ||
| > | ||
| <field name="name">Contract modifications</field> | ||
| <field name="res_model">contract.contract</field> | ||
| <field name="default" eval="False" /> | ||
| </record> | ||
| </odoo> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.