-
Notifications
You must be signed in to change notification settings - Fork 9
[6178][MIG] account_billing_dispatch_option: Migration to 18.0 #237
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9449525
[4332][ADD] account_invoice_dispatch_option (#223)
AungKoKoLin1997 f4c0625
[IMP] account_invoice_dispatch_option: pre-commit auto fixes
AungKoKoLin1997 043c8ac
[MIG] account_billing_dispatch_option: Migration to 18.0
AungKoKoLin1997 15f7426
imp
AungKoKoLin1997 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,59 @@ | ||
| =============================== | ||
| Account Billing Dispatch Option | ||
| =============================== | ||
|
|
||
| .. | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! This file is generated by oca-gen-addon-readme !! | ||
| !! changes will be overwritten. !! | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! source digest: sha256:6d621bb952b5baf158ad0c719ec79cb6b45d7237d37197b9c6d6aaf90d52ede6 | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
| :target: https://odoo-community.org/page/development-status | ||
| :alt: Beta | ||
| .. |badge2| image:: https://img.shields.io/badge/licence-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-qrtl%2Fhls--custom-lightgray.png?logo=github | ||
| :target: https://github.com/qrtl/hls-custom/tree/18.0/account_billing_dispatch_option | ||
| :alt: qrtl/hls-custom | ||
|
|
||
| |badge1| |badge2| |badge3| | ||
|
|
||
| This module adds the fields use_company_invoice and invoice_send_method | ||
| to both res.partner and account.billing models and includes these fields | ||
| in the filters and group by options of account.billing. The values from | ||
| res.partner are propagated to account.billing, helping to determine | ||
| whether a billing needs to be sent to customers or not. | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
| :local: | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues <https://github.com/qrtl/hls-custom/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/qrtl/hls-custom/issues/new?body=module:%20account_billing_dispatch_option%0Aversion:%2018.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 | ||
| ------- | ||
|
|
||
| * Quartile | ||
|
|
||
| Maintainers | ||
| ----------- | ||
|
|
||
| This module is part of the `qrtl/hls-custom <https://github.com/qrtl/hls-custom/tree/18.0/account_billing_dispatch_option>`_ project on GitHub. | ||
|
|
||
| You are welcome to 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 @@ | ||
| from . import models |
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,16 @@ | ||
| # Copyright 2024 Quartile | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
| { | ||
| "name": "Account Billing Dispatch Option", | ||
| "version": "18.0.1.0.0", | ||
| "author": "Quartile", | ||
| "website": "https://www.quartile.co", | ||
| "category": "Invoice", | ||
| "license": "AGPL-3", | ||
| "depends": ["account_billing"], | ||
| "data": [ | ||
| "views/account_billing_views.xml", | ||
| "views/res_partner_views.xml", | ||
| ], | ||
| "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,86 @@ | ||
| # Translation of Odoo Server. | ||
| # This file contains the translation of the following modules: | ||
| # * account_invoice_dispatch_option | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 12.0\n" | ||
| "Report-Msgid-Bugs-To: \n" | ||
| "POT-Creation-Date: 2024-06-26 09:16+0000\n" | ||
| "PO-Revision-Date: 2024-06-26 09:16+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: account_invoice_dispatch_option | ||
| #: model:ir.model,name:account_invoice_dispatch_option.model_res_partner | ||
| msgid "Contact" | ||
| msgstr "連絡先" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: selection:account.invoice,invoice_send_method:0 | ||
| #: selection:res.partner,invoice_send_method:0 | ||
| msgid "Do Not Send" | ||
| msgstr "送付不要" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: selection:account.invoice,invoice_send_method:0 | ||
| #: selection:res.partner,invoice_send_method:0 | ||
| msgid "Email" | ||
| msgstr "Eメール" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: model:ir.model,name:account_invoice_dispatch_option.model_account_invoice | ||
| msgid "Invoice" | ||
| msgstr "請求書" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: model:ir.model.fields,field_description:account_invoice_dispatch_option.field_account_invoice__invoice_send_method | ||
| #: model:ir.model.fields,field_description:account_invoice_dispatch_option.field_res_partner__invoice_send_method | ||
| #: model:ir.model.fields,field_description:account_invoice_dispatch_option.field_res_users__invoice_send_method | ||
| #: model_terms:ir.ui.view,arch_db:account_invoice_dispatch_option.view_account_invoice_filter_inherit | ||
| msgid "Invoice Send Method" | ||
| msgstr "請求書送付方法" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: model_terms:ir.ui.view,arch_db:account_invoice_dispatch_option.view_account_invoice_filter_inherit | ||
| msgid "Invoice Send Method - Do Not Send" | ||
| msgstr "送付方法 - 送付不要" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: model_terms:ir.ui.view,arch_db:account_invoice_dispatch_option.view_account_invoice_filter_inherit | ||
| msgid "Invoice Send Method - Email" | ||
| msgstr "送付方法 - Eメール" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: model_terms:ir.ui.view,arch_db:account_invoice_dispatch_option.view_account_invoice_filter_inherit | ||
| msgid "Invoice Send Method - Others" | ||
| msgstr "送付方法 - その他" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: model_terms:ir.ui.view,arch_db:account_invoice_dispatch_option.view_account_invoice_filter_inherit | ||
| msgid "Invoice Send Method - Post" | ||
| msgstr "送付方法 - 郵送" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: selection:account.invoice,invoice_send_method:0 | ||
| #: selection:res.partner,invoice_send_method:0 | ||
| msgid "Others" | ||
| msgstr "その他" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: selection:account.invoice,invoice_send_method:0 | ||
| #: selection:res.partner,invoice_send_method:0 | ||
| msgid "Post" | ||
| msgstr "郵送" | ||
|
|
||
| #. module: account_invoice_dispatch_option | ||
| #: model:ir.model.fields,field_description:account_invoice_dispatch_option.field_account_invoice__use_company_invoice | ||
| #: model:ir.model.fields,field_description:account_invoice_dispatch_option.field_res_partner__use_company_invoice | ||
| #: model:ir.model.fields,field_description:account_invoice_dispatch_option.field_res_users__use_company_invoice | ||
| #: model_terms:ir.ui.view,arch_db:account_invoice_dispatch_option.view_account_invoice_filter_inherit | ||
| msgid "Use Company Invoice" | ||
| msgstr "当社請求書を利用" |
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,2 @@ | ||
| from . import res_partner | ||
| from . import account_billing |
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,29 @@ | ||
| # Copyright 2024 Quartile | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
|
||
| from odoo import api, fields, models | ||
|
|
||
|
|
||
| class AccountBilling(models.Model): | ||
| _inherit = "account.billing" | ||
|
|
||
| use_company_invoice = fields.Boolean( | ||
| compute="_compute_use_company_invoice", store=True, readonly=False | ||
| ) | ||
| invoice_send_method = fields.Selection( | ||
| [ | ||
| ("post", "Post"), | ||
| ("email", "Email"), | ||
| ("do_not_send", "Do Not Send"), | ||
| ("others", "Others"), | ||
| ], | ||
| compute="_compute_use_company_invoice", | ||
| store=True, | ||
| readonly=False, | ||
| ) | ||
|
|
||
| @api.depends("partner_id") | ||
| def _compute_use_company_invoice(self): | ||
| for rec in self: | ||
| rec.use_company_invoice = rec.partner_id.use_company_invoice | ||
| rec.invoice_send_method = rec.partner_id.invoice_send_method |
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,18 @@ | ||
| # Copyright 2024 Quartile | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
|
||
| from odoo import fields, models | ||
|
|
||
|
|
||
| class ResPartner(models.Model): | ||
| _inherit = "res.partner" | ||
|
|
||
| use_company_invoice = fields.Boolean() | ||
| invoice_send_method = fields.Selection( | ||
| [ | ||
| ("post", "Post"), | ||
| ("email", "Email"), | ||
| ("do_not_send", "Do Not Send"), | ||
| ("others", "Others"), | ||
| ], | ||
| ) |
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 @@ | ||
| [build-system] | ||
| requires = ["whool"] | ||
| build-backend = "whool.buildapi" |
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,5 @@ | ||
| This module adds the fields use_company_invoice and invoice_send_method | ||
| to both res.partner and account.billing models and includes these fields | ||
| in the filters and group by options of account.billing. The values from | ||
| res.partner are propagated to account.billing, helping to determine | ||
| whether a billing needs to be sent to customers or not. |
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.