mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[ADD]rma_purchase_analytic
[FIX]various
This commit is contained in:
committed by
Aaron ForgeFlow
parent
39be5588cf
commit
fc8d27402e
@@ -2,4 +2,4 @@
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
from . import models
|
||||
from . import tests
|
||||
from . import wizards
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
{
|
||||
"name": "Analytic Account in RMA",
|
||||
"name": "Analytic Account in RMA sale",
|
||||
"version": "10.0.1.0.0",
|
||||
"author": "Eficent",
|
||||
"author": "Eficent,"
|
||||
"Odoo Community Association (OCA)",
|
||||
"license": "LGPL-3",
|
||||
"website": "http://www.eficent.com",
|
||||
"category": "Analytic",
|
||||
"depends": ["rma_account", "rma_analytic", "stock_analytic_account"],
|
||||
"depends": ["rma_account", "rma_analytic"],
|
||||
"data": [
|
||||
],
|
||||
'installable': True,
|
||||
|
||||
@@ -11,7 +11,8 @@ class SaleOrderLine(models.Model):
|
||||
@api.constrains('analytic_account_id')
|
||||
def check_analytic(self):
|
||||
for line in self:
|
||||
if line.analytic_account_id != line.rma_line_id.analytic_account_id:
|
||||
if (line.analytic_account_id !=
|
||||
line.rma_line_id.analytic_account_id):
|
||||
raise exceptions.ValidationError(
|
||||
_("The analytic account in the sale line it's not the same"
|
||||
" as in the rma line"))
|
||||
|
||||
@@ -10,7 +10,7 @@ class RmaAddSale(models.TransientModel):
|
||||
|
||||
@api.model
|
||||
def _prepare_rma_line_from_sale_order_line(self, line):
|
||||
data = super(RmaAddInvoice, self).\
|
||||
data = super(RmaAddSale, self).\
|
||||
_prepare_rma_line_from_sale_order_line(line)
|
||||
data.update(analytic_account_id=line.analytic_account_id.id)
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user