Skip to content

Commit

Permalink
[ADD] sale_order_partner_invoice_period
Browse files Browse the repository at this point in the history
Adds a selector of period to invoice directions.
  • Loading branch information
DantePereyra committed Nov 19, 2024
1 parent d56870d commit e8ede3d
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 0 deletions.
1 change: 1 addition & 0 deletions sale_order_partner_invoice_period/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions sale_order_partner_invoice_period/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# © 2024 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
{
"name": "Partner Invoice Period",
"summary": """ Adds selection of period to invoice direction """,
"author": "Solvos",
"license": "LGPL-3",
"version": "17.0.1.0.0",
"category": "Sales/Sales",
"website": "https://github.com/solvosci/slv-sale",
"depends": [
"sale"
],
"data": [
"views/res_partner_view.xml",
],
'installable': True,
}
1 change: 1 addition & 0 deletions sale_order_partner_invoice_period/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_partner
17 changes: 17 additions & 0 deletions sale_order_partner_invoice_period/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# © 2024 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
from odoo import models, fields

class ResPartner(models.Model):
_inherit = "res.partner"

period=fields.Selection(
[
('daily','Daily'),
('weekly','Weekly'),
('fortnightly','Fortnightly'),
('monthly','Monthly'),
('quarterly','Quarterly'),
('yearly','Yearly')
]
)
1 change: 1 addition & 0 deletions sale_order_partner_invoice_period/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Dante Pereyra <[email protected]>
1 change: 1 addition & 0 deletions sale_order_partner_invoice_period/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds a selector of period to invoice directions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions sale_order_partner_invoice_period/views/res_partner_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<record id="view_partner_form_inherit" model="ir.ui.view">
<field name="name">res.partner.view.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="after">
<field name="period" invisible="type != 'invoice'"/>
</xpath>
<xpath expr="//field[@name='child_ids']//field[@name='comment']" position="before">
<field name="period"/>
</xpath>
<xpath expr="//field[@name='child_ids']//form//field[@name='mobile']" position="after">
<field name="period" invisible="type != 'invoice'"/>
</xpath>
</field>
</record>

</odoo>

0 comments on commit e8ede3d

Please sign in to comment.