[IMP] pre-commit: first run on whole repo
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Sale Down Payment',
|
||||
'version': '12.0.1.0.0',
|
||||
'category': 'Sales',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Link payment to sale orders',
|
||||
'description': """
|
||||
"name": "Sale Down Payment",
|
||||
"version": "12.0.1.0.0",
|
||||
"category": "Sales",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Link payment to sale orders",
|
||||
"description": """
|
||||
Sale Down Payment
|
||||
=================
|
||||
|
||||
@@ -21,15 +21,15 @@ This module targets B2B companies that don't want to generate a down payment inv
|
||||
This module has been written by Alexis de Lattre from Akretion
|
||||
<alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['sale'],
|
||||
'data': [
|
||||
'wizard/account_bank_statement_sale_view.xml',
|
||||
'views/account_bank_statement.xml',
|
||||
'views/sale.xml',
|
||||
'views/account_move_line.xml',
|
||||
'views/account_payment.xml',
|
||||
],
|
||||
'installable': False,
|
||||
"author": "Akretion",
|
||||
"website": "https://github.com/OCA/odoo-usability",
|
||||
"depends": ["sale"],
|
||||
"data": [
|
||||
"wizard/account_bank_statement_sale_view.xml",
|
||||
"views/account_bank_statement.xml",
|
||||
"views/sale.xml",
|
||||
"views/account_move_line.xml",
|
||||
"views/account_payment.xml",
|
||||
],
|
||||
"installable": False,
|
||||
}
|
||||
|
||||
@@ -2,31 +2,34 @@
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = 'account.move.line'
|
||||
_inherit = "account.move.line"
|
||||
|
||||
sale_id = fields.Many2one('sale.order', string='Sale Order')
|
||||
sale_id = fields.Many2one("sale.order", string="Sale Order")
|
||||
account_internal_type = fields.Selection(
|
||||
related='account_id.user_type_id.type', store=True,
|
||||
string='Account Internal Type')
|
||||
related="account_id.user_type_id.type",
|
||||
store=True,
|
||||
string="Account Internal Type",
|
||||
)
|
||||
|
||||
@api.constrains('sale_id', 'account_id')
|
||||
@api.constrains("sale_id", "account_id")
|
||||
def sale_id_check(self):
|
||||
for line in self:
|
||||
if line.sale_id and line.account_id.internal_type != 'receivable':
|
||||
raise ValidationError(_(
|
||||
"The account move line '%s' is linked to sale order '%s' "
|
||||
"but it uses account '%s' which is not a receivable "
|
||||
"account.")
|
||||
% (line.name,
|
||||
line.sale_id.name,
|
||||
line.account_id.display_name))
|
||||
if line.sale_id and line.account_id.internal_type != "receivable":
|
||||
raise ValidationError(
|
||||
_(
|
||||
"The account move line '%s' is linked to sale order '%s' "
|
||||
"but it uses account '%s' which is not a receivable "
|
||||
"account."
|
||||
)
|
||||
% (line.name, line.sale_id.name, line.account_id.display_name)
|
||||
)
|
||||
|
||||
@api.onchange('account_id')
|
||||
@api.onchange("account_id")
|
||||
def sale_advance_payement_account_id_change(self):
|
||||
if self.sale_id and self.account_id.user_type_id.type != 'receivable':
|
||||
if self.sale_id and self.account_id.user_type_id.type != "receivable":
|
||||
self.sale_id = False
|
||||
|
||||
@@ -7,22 +7,22 @@ from odoo.tools import float_round
|
||||
|
||||
|
||||
class AccountPayment(models.Model):
|
||||
_inherit = 'account.payment'
|
||||
_inherit = "account.payment"
|
||||
|
||||
sale_id = fields.Many2one('sale.order', string='Sale Order')
|
||||
sale_id = fields.Many2one("sale.order", string="Sale Order")
|
||||
|
||||
def action_validate_invoice_payment(self):
|
||||
if self.sale_id:
|
||||
self.post()
|
||||
else:
|
||||
return super(AccountPayment, self).\
|
||||
action_validate_invoice_payment()
|
||||
return super(AccountPayment, self).action_validate_invoice_payment()
|
||||
|
||||
def _get_counterpart_move_line_vals(self, invoice=False):
|
||||
res = super(AccountPayment, self)._get_counterpart_move_line_vals(
|
||||
invoice=invoice)
|
||||
invoice=invoice
|
||||
)
|
||||
if self.sale_id:
|
||||
res['sale_id'] = self.sale_id.id
|
||||
res["sale_id"] = self.sale_id.id
|
||||
return res
|
||||
|
||||
|
||||
@@ -31,29 +31,33 @@ class AccountAbstractPayment(models.AbstractModel):
|
||||
|
||||
def default_get(self, fields_list):
|
||||
res = super(AccountAbstractPayment, self).default_get(fields_list)
|
||||
if (
|
||||
self._context.get('active_model') == 'sale.order' and
|
||||
self._context.get('active_id')):
|
||||
so = self.env['sale.order'].browse(self._context['active_id'])
|
||||
res.update({
|
||||
'amount': so.amount_total,
|
||||
'currency_id': so.currency_id.id,
|
||||
'payment_type': 'inbound',
|
||||
'partner_id': so.partner_invoice_id.commercial_partner_id.id,
|
||||
'partner_type': 'customer',
|
||||
'communication': so.name,
|
||||
'sale_id': so.id,
|
||||
})
|
||||
if self._context.get("active_model") == "sale.order" and self._context.get(
|
||||
"active_id"
|
||||
):
|
||||
so = self.env["sale.order"].browse(self._context["active_id"])
|
||||
res.update(
|
||||
{
|
||||
"amount": so.amount_total,
|
||||
"currency_id": so.currency_id.id,
|
||||
"payment_type": "inbound",
|
||||
"partner_id": so.partner_invoice_id.commercial_partner_id.id,
|
||||
"partner_type": "customer",
|
||||
"communication": so.name,
|
||||
"sale_id": so.id,
|
||||
}
|
||||
)
|
||||
return res
|
||||
|
||||
def _compute_payment_amount(self, invoices=None, currency=None):
|
||||
amount = super(AccountAbstractPayment, self)._compute_payment_amount(
|
||||
invoices=invoices, currency=currency)
|
||||
invoices=invoices, currency=currency
|
||||
)
|
||||
if self.sale_id:
|
||||
payment_currency = currency
|
||||
if not payment_currency:
|
||||
payment_currency = self.sale_id.currency_id
|
||||
amount = float_round(
|
||||
self.sale_id.amount_total - self.sale_id.amount_down_payment,
|
||||
precision_rounding=payment_currency.rounding)
|
||||
precision_rounding=payment_currency.rounding,
|
||||
)
|
||||
return amount
|
||||
|
||||
@@ -7,21 +7,27 @@ from odoo.tools import float_round
|
||||
|
||||
|
||||
class SaleOrder(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
_inherit = "sale.order"
|
||||
|
||||
payment_line_ids = fields.One2many(
|
||||
'account.move.line', 'sale_id', string='Advance Payments',
|
||||
readonly=True)
|
||||
"account.move.line", "sale_id", string="Advance Payments", readonly=True
|
||||
)
|
||||
amount_down_payment = fields.Monetary(
|
||||
compute='_compute_amount_down_payment', string='Down Payment Amount')
|
||||
compute="_compute_amount_down_payment", string="Down Payment Amount"
|
||||
)
|
||||
# amount_residual : only used to hide 'Register Payment' button
|
||||
amount_residual = fields.Monetary(
|
||||
compute='_compute_amount_down_payment', string='Residual')
|
||||
compute="_compute_amount_down_payment", string="Residual"
|
||||
)
|
||||
|
||||
@api.depends(
|
||||
'payment_line_ids.credit', 'payment_line_ids.debit',
|
||||
'payment_line_ids.amount_currency', 'payment_line_ids.currency_id',
|
||||
'payment_line_ids.date', 'currency_id')
|
||||
"payment_line_ids.credit",
|
||||
"payment_line_ids.debit",
|
||||
"payment_line_ids.amount_currency",
|
||||
"payment_line_ids.currency_id",
|
||||
"payment_line_ids.date",
|
||||
"currency_id",
|
||||
)
|
||||
def _compute_amount_down_payment(self):
|
||||
for sale in self:
|
||||
down_payment = 0.0
|
||||
@@ -32,17 +38,20 @@ class SaleOrder(models.Model):
|
||||
else:
|
||||
for pl in sale.payment_line_ids:
|
||||
if (
|
||||
pl.currency_id and
|
||||
pl.currency_id == sale_currency and
|
||||
pl.amount_currency):
|
||||
pl.currency_id
|
||||
and pl.currency_id == sale_currency
|
||||
and pl.amount_currency
|
||||
):
|
||||
down_payment -= pl.amount_currency
|
||||
else:
|
||||
down_payment -= sale.company_id.currency_id._convert(
|
||||
pl.balance, sale_currency, sale.company_id,
|
||||
pl.date)
|
||||
pl.balance, sale_currency, sale.company_id, pl.date
|
||||
)
|
||||
down_payment = float_round(
|
||||
down_payment, precision_rounding=sale.currency_id.rounding)
|
||||
down_payment, precision_rounding=sale.currency_id.rounding
|
||||
)
|
||||
sale.amount_down_payment = down_payment
|
||||
sale.amount_residual = float_round(
|
||||
sale.amount_total - down_payment,
|
||||
precision_rounding=sale.currency_id.rounding)
|
||||
precision_rounding=sale.currency_id.rounding,
|
||||
)
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2019 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_bank_statement_form" model="ir.ui.view">
|
||||
<field name="name">advance_payment.account.bank.statement.form</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="check_confirm_bank" position="after">
|
||||
<button name="%(account_bank_statement_sale_action)d" type="action" string="Link to Quotation/Sale Orders"/>
|
||||
<button
|
||||
name="%(account_bank_statement_sale_action)d"
|
||||
type="action"
|
||||
string="Link to Quotation/Sale Orders"
|
||||
/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2019 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_move_line_form" model="ir.ui.view">
|
||||
<field name="name">advance_payment.account.move.line.form</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_form"/>
|
||||
<field name="inherit_id" ref="account.view_move_line_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="invoice_id" position="after">
|
||||
<field name="sale_id" attrs="{'invisible': [('account_internal_type', '!=', 'receivable')]}" domain="['|', ('partner_id', 'child_of', partner_id), ('partner_invoice_id', 'child_of', partner_id), ('state', '!=', 'cancel'), ('invoice_status', '!=', 'invoiced')]"/>
|
||||
<field name="account_internal_type" invisible="1"/>
|
||||
<field
|
||||
name="sale_id"
|
||||
attrs="{'invisible': [('account_internal_type', '!=', 'receivable')]}"
|
||||
domain="['|', ('partner_id', 'child_of', partner_id), ('partner_invoice_id', 'child_of', partner_id), ('state', '!=', 'cancel'), ('invoice_status', '!=', 'invoiced')]"
|
||||
/>
|
||||
<field name="account_internal_type" invisible="1" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2018 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_account_payment_sale_form" model="ir.ui.view">
|
||||
<field name="name">account.payment.sale.form</field>
|
||||
<field name="model">account.payment</field>
|
||||
<field name="inherit_id" ref="account.view_account_payment_invoice_form"/>
|
||||
<field name="inherit_id" ref="account.view_account_payment_invoice_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="invoice_ids" position="after">
|
||||
<field name="sale_id" invisible="1"/>
|
||||
<field name="sale_id" invisible="1" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2019 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
@@ -12,29 +11,38 @@
|
||||
<field name="name">Register Payment</field>
|
||||
<field name="res_model">account.payment</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account.view_account_payment_invoice_form"/>
|
||||
<field name="view_id" ref="account.view_account_payment_invoice_form" />
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="name">advance_payment.sale.order.form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page name="advance_payment" string="Advance Payments">
|
||||
<field name="payment_line_ids" nolabel="1"/>
|
||||
<field name="amount_residual" invisible="1"/>
|
||||
<field name="payment_line_ids" nolabel="1" />
|
||||
<field name="amount_residual" invisible="1" />
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="amount_total" position="after">
|
||||
<div class="oe_subtotal_footer_separator oe_inline o_td_label">
|
||||
<label for="amount_down_payment" />
|
||||
</div>
|
||||
<field name="amount_down_payment" nolabel="1" class="oe_subtotal_footer_separator"/>
|
||||
<field
|
||||
name="amount_down_payment"
|
||||
nolabel="1"
|
||||
class="oe_subtotal_footer_separator"
|
||||
/>
|
||||
</field>
|
||||
<button name="action_cancel" position="before">
|
||||
<button type="action" name="%(sale_account_payment_action)d" string="Register Payment" attrs="{'invisible': ['|', ('amount_residual', '<=', 0), ('invoice_status', '=', 'invoiced')]}"/>
|
||||
<button
|
||||
type="action"
|
||||
name="%(sale_account_payment_action)d"
|
||||
string="Register Payment"
|
||||
attrs="{'invisible': ['|', ('amount_residual', '<=', 0), ('invoice_status', '=', 'invoiced')]}"
|
||||
/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -2,62 +2,65 @@
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class AccountBankStatementSale(models.TransientModel):
|
||||
_name = 'account.bank.statement.sale'
|
||||
_description = 'Account Bank Statement Sale'
|
||||
_name = "account.bank.statement.sale"
|
||||
_description = "Account Bank Statement Sale"
|
||||
|
||||
statement_id = fields.Many2one('account.bank.statement', readonly=True)
|
||||
statement_id = fields.Many2one("account.bank.statement", readonly=True)
|
||||
line_ids = fields.One2many(
|
||||
'account.bank.statement.sale.line', 'wizard_id', string='Lines')
|
||||
"account.bank.statement.sale.line", "wizard_id", string="Lines"
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _prepare_line(self, move_line):
|
||||
vals = {
|
||||
'move_line_id': move_line.id,
|
||||
'sale_id': move_line.sale_id.id or False,
|
||||
'date': move_line.date,
|
||||
'credit': move_line.credit,
|
||||
'partner_id': move_line.partner_id.id,
|
||||
'account_id': move_line.account_id.id,
|
||||
'name': move_line.name,
|
||||
'company_currency_id': move_line.company_currency_id.id,
|
||||
}
|
||||
"move_line_id": move_line.id,
|
||||
"sale_id": move_line.sale_id.id or False,
|
||||
"date": move_line.date,
|
||||
"credit": move_line.credit,
|
||||
"partner_id": move_line.partner_id.id,
|
||||
"account_id": move_line.account_id.id,
|
||||
"name": move_line.name,
|
||||
"company_currency_id": move_line.company_currency_id.id,
|
||||
}
|
||||
return vals
|
||||
|
||||
@api.model
|
||||
def default_get(self, fields_list):
|
||||
res = super(AccountBankStatementSale, self).default_get(fields_list)
|
||||
assert self._context.get('active_model') == 'account.bank.statement'
|
||||
statement_id = self._context.get('active_id')
|
||||
statement = self.env['account.bank.statement'].browse(statement_id)
|
||||
res.update({
|
||||
'line_ids': [],
|
||||
'statement_id': statement_id,
|
||||
})
|
||||
assert self._context.get("active_model") == "account.bank.statement"
|
||||
statement_id = self._context.get("active_id")
|
||||
statement = self.env["account.bank.statement"].browse(statement_id)
|
||||
res.update(
|
||||
{
|
||||
"line_ids": [],
|
||||
"statement_id": statement_id,
|
||||
}
|
||||
)
|
||||
for st_line in statement.line_ids:
|
||||
if (
|
||||
st_line.amount > 0 and
|
||||
st_line.partner_id and
|
||||
st_line.journal_entry_ids):
|
||||
if st_line.amount > 0 and st_line.partner_id and st_line.journal_entry_ids:
|
||||
for line in st_line.journal_entry_ids:
|
||||
if (
|
||||
line.account_id.user_type_id.type == 'receivable'
|
||||
and
|
||||
line.partner_id and
|
||||
not line.full_reconcile_id and
|
||||
not line.matched_debit_ids and
|
||||
not line.matched_credit_ids):
|
||||
line.account_id.user_type_id.type == "receivable"
|
||||
and line.partner_id
|
||||
and not line.full_reconcile_id
|
||||
and not line.matched_debit_ids
|
||||
and not line.matched_credit_ids
|
||||
):
|
||||
lvals = self._prepare_line(line)
|
||||
res['line_ids'].append((0, 0, lvals))
|
||||
if not res['line_ids']:
|
||||
raise UserError(_(
|
||||
"The bank statement '%s' doesn't contain any processed line "
|
||||
"with a positive amount which is not reconciled.")
|
||||
% statement.display_name)
|
||||
res["line_ids"].append((0, 0, lvals))
|
||||
if not res["line_ids"]:
|
||||
raise UserError(
|
||||
_(
|
||||
"The bank statement '%s' doesn't contain any processed line "
|
||||
"with a positive amount which is not reconciled."
|
||||
)
|
||||
% statement.display_name
|
||||
)
|
||||
return res
|
||||
|
||||
def validate(self):
|
||||
@@ -68,19 +71,19 @@ class AccountBankStatementSale(models.TransientModel):
|
||||
|
||||
|
||||
class AccountBankStatementSaleLine(models.TransientModel):
|
||||
_name = 'account.bank.statement.sale.line'
|
||||
_description = 'Account Bank Statement Sale Lines'
|
||||
_name = "account.bank.statement.sale.line"
|
||||
_description = "Account Bank Statement Sale Lines"
|
||||
|
||||
wizard_id = fields.Many2one(
|
||||
'account.bank.statement.sale', ondelete='cascade')
|
||||
wizard_id = fields.Many2one("account.bank.statement.sale", ondelete="cascade")
|
||||
move_line_id = fields.Many2one(
|
||||
'account.move.line', string='Move Line', required=True)
|
||||
date = fields.Date(related='move_line_id.date')
|
||||
"account.move.line", string="Move Line", required=True
|
||||
)
|
||||
date = fields.Date(related="move_line_id.date")
|
||||
credit = fields.Monetary(
|
||||
related='move_line_id.credit', currency_field='company_currency_id')
|
||||
partner_id = fields.Many2one(related='move_line_id.partner_id')
|
||||
account_id = fields.Many2one(related='move_line_id.account_id')
|
||||
name = fields.Char(related='move_line_id.name')
|
||||
company_currency_id = fields.Many2one(
|
||||
related='move_line_id.company_currency_id')
|
||||
sale_id = fields.Many2one('sale.order', string='Sale Order')
|
||||
related="move_line_id.credit", currency_field="company_currency_id"
|
||||
)
|
||||
partner_id = fields.Many2one(related="move_line_id.partner_id")
|
||||
account_id = fields.Many2one(related="move_line_id.account_id")
|
||||
name = fields.Char(related="move_line_id.name")
|
||||
company_currency_id = fields.Many2one(related="move_line_id.company_currency_id")
|
||||
sale_id = fields.Many2one("sale.order", string="Sale Order")
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2019 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
@@ -14,25 +13,33 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Link to Quotation/Sale Orders">
|
||||
<group name="main" invisible="1">
|
||||
<field name="statement_id"/>
|
||||
<field name="statement_id" />
|
||||
</group>
|
||||
<group name="lines">
|
||||
<field name="line_ids" nolabel="1">
|
||||
<tree editable="bottom">
|
||||
<field name="move_line_id" invisible="1"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="account_id"/>
|
||||
<field name="credit"/>
|
||||
<field name="sale_id" domain="['|', ('partner_id', 'child_of', partner_id), ('partner_invoice_id', 'child_of', partner_id), ('state', '!=', 'cancel'), ('invoice_status', '!=', 'invoiced')]"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
<field name="move_line_id" invisible="1" />
|
||||
<field name="date" />
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="account_id" />
|
||||
<field name="credit" />
|
||||
<field
|
||||
name="sale_id"
|
||||
domain="['|', ('partner_id', 'child_of', partner_id), ('partner_invoice_id', 'child_of', partner_id), ('state', '!=', 'cancel'), ('invoice_status', '!=', 'invoiced')]"
|
||||
/>
|
||||
<field name="company_currency_id" invisible="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="validate" type="object" string="Validate" class="btn-primary"/>
|
||||
<button special="cancel" string="Cancel" class="btn-default"/>
|
||||
<button
|
||||
name="validate"
|
||||
type="object"
|
||||
string="Validate"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button special="cancel" string="Cancel" class="btn-default" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user