Compare commits
1 Commits
12-account
...
12.0-fix-a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f6acea23d |
@@ -1 +0,0 @@
|
|||||||
from . import models
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "Account Fiscal Position Payable Receivable",
|
|
||||||
"version": "12.0.1.0.0",
|
|
||||||
"category": "Accounting & Finance",
|
|
||||||
"license": "AGPL-3",
|
|
||||||
"summary": "Configure payable/receivable accounts on fiscal positions",
|
|
||||||
"description": """
|
|
||||||
Account Fiscal Position Payable Receivable
|
|
||||||
==========================================
|
|
||||||
|
|
||||||
This module allows to configure a special *Partner Receivable Account* and a special *Partner Payable Account* on fiscal positions. This is used in the onchange of the fiscal position of partners.
|
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
|
||||||
""",
|
|
||||||
"author": "Akretion",
|
|
||||||
"website": "http://www.akretion.com",
|
|
||||||
"depends": ["account"],
|
|
||||||
"data": ["views/account_fiscal_position_view.xml"],
|
|
||||||
"installable": True,
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
from . import account_fiscal_position
|
|
||||||
from . import res_partner
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
|
|
||||||
class AccountFiscalPosition(models.Model):
|
|
||||||
_inherit = "account.fiscal.position"
|
|
||||||
|
|
||||||
receivable_account_id = fields.Many2one(
|
|
||||||
"account.account",
|
|
||||||
string="Partner Receivable Account",
|
|
||||||
company_dependent=True,
|
|
||||||
domain=[("internal_type", "=", "receivable")],
|
|
||||||
)
|
|
||||||
payable_account_id = fields.Many2one(
|
|
||||||
"account.account",
|
|
||||||
string="Partner Payable Account",
|
|
||||||
company_dependent=True,
|
|
||||||
domain=[("internal_type", "=", "payable")],
|
|
||||||
)
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import models, api
|
|
||||||
|
|
||||||
|
|
||||||
class ResPartner(models.Model):
|
|
||||||
_inherit = "res.partner"
|
|
||||||
|
|
||||||
@api.onchange("property_account_position_id")
|
|
||||||
def fiscal_position_receivable_payable_change(self):
|
|
||||||
fp = self.property_account_position_id
|
|
||||||
ipo = self.env["ir.property"]
|
|
||||||
if fp.receivable_account_id:
|
|
||||||
self.property_account_receivable_id = fp.receivable_account_id
|
|
||||||
else:
|
|
||||||
self.property_account_receivable_id = ipo.get(
|
|
||||||
"property_account_receivable_id", "res.partner"
|
|
||||||
)
|
|
||||||
if fp.payable_account_id:
|
|
||||||
self.property_account_payable_id = fp.payable_account_id
|
|
||||||
else:
|
|
||||||
self.property_account_payable_id = ipo.get(
|
|
||||||
"property_account_payable_id", "res.partner"
|
|
||||||
)
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
© 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_account_position_form" model="ir.ui.view">
|
|
||||||
<field name="name">receivable_payable.fiscal_position_form</field>
|
|
||||||
<field name="model">account.fiscal.position</field>
|
|
||||||
<field name="inherit_id" ref="account.view_account_position_form" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="company_id" position="after">
|
|
||||||
<field name="receivable_account_id"/>
|
|
||||||
<field name="payable_account_id"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -318,6 +318,7 @@ class AccountAccount(models.Model):
|
|||||||
logger.info("END of the script 'fix bank and cash account types'")
|
logger.info("END of the script 'fix bank and cash account types'")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
# TODO mig to v12
|
||||||
@api.model
|
@api.model
|
||||||
def create_account_groups(self, level=2, name_prefix=u'Comptes '):
|
def create_account_groups(self, level=2, name_prefix=u'Comptes '):
|
||||||
'''Should be launched by a script. Make sure the account_group module is installed
|
'''Should be launched by a script. Make sure the account_group module is installed
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
|
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
|
||||||
<xpath expr="//div[@name='origin']/p" position="replace">
|
<xpath expr="//p[@t-field='o.origin']" position="replace">
|
||||||
<p class="m-0" t-field="o.sale_dates"/>
|
<p class="m-0" t-field="o.sale_dates"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -16,6 +16,11 @@
|
|||||||
<field name="standard_price" class="oe_inline" position="after">
|
<field name="standard_price" class="oe_inline" position="after">
|
||||||
<button name="show_product_price_history" class="oe_inline oe_link" type="object" string="Show History" context="{'active_id': active_id}"/>
|
<button name="show_product_price_history" class="oe_inline oe_link" type="object" string="Show History" context="{'active_id': active_id}"/>
|
||||||
</field>
|
</field>
|
||||||
|
<!-- Don't make it too big, othesize computers with small resolutions
|
||||||
|
will see the product name + image under the block of buttons -->
|
||||||
|
<div class="oe_title" position="attributes">
|
||||||
|
<attribute name="style">width: 650px;</attribute>
|
||||||
|
</div>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user