Skip to content

Commit

Permalink
[MIG] l10n_us_form_1099: Migration to 13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HviorForgeFlow committed Dec 31, 2019
1 parent 4995e2f commit 9b705d6
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 60 deletions.
10 changes: 5 additions & 5 deletions l10n_us_form_1099/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ US Form 1099
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge2| image:: https://img.shields.io/badge/github-OCA%2Fl10n--usa-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-usa/tree/12.0/l10n_us_form_1099
:target: https://github.com/OCA/l10n-usa/tree/13.0/l10n_us_form_1099
:alt: OCA/l10n-usa
.. |badge3| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-usa-12-0/l10n-usa-12-0-l10n_us_form_1099
:target: https://translation.odoo-community.org/projects/l10n-usa-13-0/l10n-usa-13-0-l10n_us_form_1099
:alt: Translate me on Weblate
.. |badge4| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/203/12.0
:target: https://runbot.odoo-community.org/runbot/203/13.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4|
Expand Down Expand Up @@ -68,7 +68,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-usa/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 <https://github.com/OCA/l10n-usa/issues/new?body=module:%20l10n_us_form_1099%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-usa/issues/new?body=module:%20l10n_us_form_1099%0Aversion:%2013.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.

Expand Down Expand Up @@ -119,6 +119,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-max3903|

This module is part of the `OCA/l10n-usa <https://github.com/OCA/l10n-usa/tree/12.0/l10n_us_form_1099>`_ project on GitHub.
This module is part of the `OCA/l10n-usa <https://github.com/OCA/l10n-usa/tree/13.0/l10n_us_form_1099>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion l10n_us_form_1099/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "US Form 1099",
"version": "12.0.1.2.0",
"version": "13.0.1.2.0",
"author": "Open Source Integrators, "
"Brian McMaster, "
"Odoo Community Association (OCA)",
Expand Down
12 changes: 1 addition & 11 deletions l10n_us_form_1099/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2019 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models
from odoo import fields, models


class ResPartner(models.Model):
Expand All @@ -11,13 +11,3 @@ class ResPartner(models.Model):
is_1099 = fields.Boolean("Is a 1099?")
type_1099_id = fields.Many2one("type.1099", string="1099 Type")
box_1099_misc_id = fields.Many2one("box.1099.misc", string="1099-MISC Box")

@api.onchange("is_1099")
def _on_change_is_1099(self):
if self.is_1099 and not self.supplier:
self.supplier = True

@api.onchange("supplier")
def _on_change_supplier(self):
if self.is_1099 and not self.supplier:
self.is_1099 = False
8 changes: 4 additions & 4 deletions l10n_us_form_1099/reports/account_payment_1099_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models, tools
from odoo import fields, models, tools


class AccountPayment1099Report(models.Model):
Expand Down Expand Up @@ -43,9 +43,9 @@ def _where(self):
v.is_1099 = TRUE
"""

@api.model_cr
def init(self):
tools.drop_view_if_exists(self._cr, self._table)
# pylint: disable=sql-injection
self._cr.execute(
"""
CREATE OR REPLACE VIEW %s AS (
Expand All @@ -54,6 +54,6 @@ def init(self):
%s
%s
)
""",
(self._table, self._select(), self._from(), self._join(), self._where()),
"""
% (self._table, self._select(), self._from(), self._join(), self._where())
)
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<record id="action_account_payment_report_1099" model="ir.actions.act_window">
<field name="name">1099 Payment Analysis</field>
<field name="res_model">account.payment.1099.report</field>
<field name="view_type">form</field>
<field name="view_mode">pivot,graph</field>
<field name="search_view_id" ref="view_account_payment_1099_report_search"/>
<field name="help">From this report, you can have an overview of the amount paid to your 1099 vendors.</field>
Expand Down
8 changes: 4 additions & 4 deletions l10n_us_form_1099/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<title>US Form 1099</title>
<style type="text/css">

Expand Down Expand Up @@ -367,7 +367,7 @@ <h1 class="title">US Form 1099</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-usa/tree/12.0/l10n_us_form_1099"><img alt="OCA/l10n-usa" src="https://img.shields.io/badge/github-OCA%2Fl10n--usa-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-usa-12-0/l10n-usa-12-0-l10n_us_form_1099"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/203/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-usa/tree/13.0/l10n_us_form_1099"><img alt="OCA/l10n-usa" src="https://img.shields.io/badge/github-OCA%2Fl10n--usa-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-usa-13-0/l10n-usa-13-0-l10n_us_form_1099"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/203/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>When companies hire others as contractors, the contractor in question may
work for themselves, another company or be the whole other company. This
is a huge range, but it can be simplified down to “do I report their
Expand Down Expand Up @@ -420,7 +420,7 @@ <h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-usa/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/l10n-usa/issues/new?body=module:%20l10n_us_form_1099%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/l10n-usa/issues/new?body=module:%20l10n_us_form_1099%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -459,7 +459,7 @@ <h2><a class="toc-backref" href="#id8">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-usa/tree/12.0/l10n_us_form_1099">OCA/l10n-usa</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-usa/tree/13.0/l10n_us_form_1099">OCA/l10n-usa</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
5 changes: 0 additions & 5 deletions l10n_us_form_1099/tests/__init__.py

This file was deleted.

25 changes: 0 additions & 25 deletions l10n_us_form_1099/tests/test_l10n_us_form_1099.py

This file was deleted.

1 change: 0 additions & 1 deletion l10n_us_form_1099/views/box_1099_misc_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<field name="name">1099-MISC Boxes</field>
<field name="res_model">box.1099.misc</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_box_1099_misc_tree"/>
</record>
Expand Down
4 changes: 2 additions & 2 deletions l10n_us_form_1099/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//group[2]/field[@name='supplier']" position="after">
<field name="category_id" position="after">
<field name="is_1099"/>
<field name="type_1099_id" widget="selection"
attrs="{'invisible': [('is_1099', '=', False)]}"/>
<field name="box_1099_misc_id" widget="selection"
attrs="{'invisible': [('type_1099_id', '!=', %(l10n_us_form_1099.1099_type_misc)d)]}"/>
</xpath>
</field>
</field>
</record>

Expand Down
1 change: 0 additions & 1 deletion l10n_us_form_1099/views/type_1099_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<field name="name">1099 Types</field>
<field name="res_model">type.1099</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_type_1099_tree"/>
</record>
Expand Down

0 comments on commit 9b705d6

Please sign in to comment.