diff --git a/l10n_us_form_1099/README.rst b/l10n_us_form_1099/README.rst new file mode 100644 index 00000000..002e0bd4 --- /dev/null +++ b/l10n_us_form_1099/README.rst @@ -0,0 +1,63 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +============ +US Form 1099 +============ + +This module extends the functionality of res partner to support indicating 1099s. + +Usage +===== + +To use this module, you need to: + +#. Go to a partner and check the "Is a 1099?" box + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/203/10.0 + +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 smash it by providing detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Jenny Wu + +Funders +------- + +The development of this module has been financially supported by: + +* Ursa Information Systems + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/l10n_us_form_1099/__init__.py b/l10n_us_form_1099/__init__.py new file mode 100644 index 00000000..de609015 --- /dev/null +++ b/l10n_us_form_1099/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Ursa Information Systems +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/l10n_us_form_1099/__manifest__.py b/l10n_us_form_1099/__manifest__.py new file mode 100644 index 00000000..4effc454 --- /dev/null +++ b/l10n_us_form_1099/__manifest__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Ursa Information Systems +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "l10n_us_form_1099", + "version": "10.0.1.0.0", + "author": "Ursa Information Systems, Odoo Community Association (OCA)", + "license": "AGPL-3", + "summary": "Add 1099 field to res.partner that will auto-check supplier", + "category": "Customers", + "maintainer": "Ursa Information Systems", + "website": "http://www.ursainfosystems.com", + "depends": ["base"], + "data": [ + "views/res_partner.xml", + ], + "qweb": [ + ], + "installable": True, +} diff --git a/l10n_us_form_1099/models/__init__.py b/l10n_us_form_1099/models/__init__.py new file mode 100644 index 00000000..a563cb28 --- /dev/null +++ b/l10n_us_form_1099/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Ursa Information Systems +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import res_partner diff --git a/l10n_us_form_1099/models/res_partner.py b/l10n_us_form_1099/models/res_partner.py new file mode 100644 index 00000000..02d89bcc --- /dev/null +++ b/l10n_us_form_1099/models/res_partner.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Ursa Information Systems +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + is1099 = fields.Boolean('Is a 1099') + supplier = fields.Boolean(string='Is a Vendor', + help="Check this box if\ + contact is a vendor." + "If not checked, purchase people will\ + not see it when encoding purchase order.") + + @api.onchange('is1099') + def _on_change_is1099(self): + + if self.is1099 and not self.supplier: + self.supplier = True + + @api.onchange('supplier') + def _on_change_supplier(self): + + if self.is1099 and not self.supplier: + self.is1099 = False diff --git a/l10n_us_form_1099/static/description/l10n_us_form_1099.png b/l10n_us_form_1099/static/description/l10n_us_form_1099.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/l10n_us_form_1099/static/description/l10n_us_form_1099.png differ diff --git a/l10n_us_form_1099/static/description/l10n_us_form_1099.svg b/l10n_us_form_1099/static/description/l10n_us_form_1099.svg new file mode 100644 index 00000000..a7a26d09 --- /dev/null +++ b/l10n_us_form_1099/static/description/l10n_us_form_1099.svg @@ -0,0 +1,79 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/l10n_us_form_1099/views/res_partner.xml b/l10n_us_form_1099/views/res_partner.xml new file mode 100644 index 00000000..bacd7e1c --- /dev/null +++ b/l10n_us_form_1099/views/res_partner.xml @@ -0,0 +1,17 @@ + + + + + res_partner_view_form + res.partner + + + + + + + + + + +