29.01.26
This commit is contained in:
@@ -1891,8 +1891,6 @@ class Line(sequence_ordered(), ModelSQL, ModelView):
|
||||
self.product.supplier_taxes_deductible_rate_used)
|
||||
invoice_line.invoice_type = 'in'
|
||||
if self.product:
|
||||
if self.product.type == 'service':
|
||||
quantity = 1
|
||||
if self.product.type == 'service' and not self.product.landed_cost:
|
||||
invoice_line.account = self.product.account_stock_in_used
|
||||
else:
|
||||
@@ -1922,6 +1920,7 @@ class Line(sequence_ordered(), ModelSQL, ModelView):
|
||||
invoice_line.lot = l.id
|
||||
if self.product.type == 'service':
|
||||
invoice_line.unit_price = self.unit_price
|
||||
invoice_line.quantity = 1
|
||||
invoice_line.product = self.product
|
||||
invoice_line.stock_moves = []
|
||||
Fee = Pool().get('fee.fee')
|
||||
|
||||
@@ -443,23 +443,23 @@ class Fee(ModelSQL,ModelView):
|
||||
if self.p_r == 'pay':
|
||||
move_line.debit = amount
|
||||
move_line.credit = Decimal(0)
|
||||
move_line.account = self.product.account_stock_used
|
||||
move_line.account = self.product.account_stock_used if in_out == 'in' else self.product.account_cogs_used
|
||||
if hasattr(move_line, 'second_currency') and move_line.second_currency:
|
||||
move_line.amount_second_currency = amount_converted
|
||||
move_line_.debit = Decimal(0)
|
||||
move_line_.credit = amount
|
||||
move_line_.account = self.product.account_stock_in_used if in_out == 'in' else self.product.account_cogs_used
|
||||
move_line_.account = self.product.account_stock_in_used if in_out == 'in' else self.product.account_stock_out_used
|
||||
if hasattr(move_line_, 'second_currency') and move_line_.second_currency:
|
||||
move_line_.amount_second_currency = -amount_converted
|
||||
else:
|
||||
move_line.debit = Decimal(0)
|
||||
move_line.credit = amount
|
||||
move_line.account = self.product.account_stock_used
|
||||
move_line.account = self.product.account_stock_used if in_out == 'in' else self.product.account_cogs_used
|
||||
if hasattr(move_line, 'second_currency') and move_line.second_currency:
|
||||
move_line.amount_second_currency = -amount_converted
|
||||
move_line_.debit = amount
|
||||
move_line_.credit = Decimal(0)
|
||||
move_line_.account = self.product.account_stock_in_used if in_out == 'in' else self.product.account_cogs_used
|
||||
move_line_.account = self.product.account_stock_in_used if in_out == 'in' else self.product.account_stock_out_used
|
||||
if hasattr(move_line_, 'second_currency') and move_line_.second_currency:
|
||||
move_line_.amount_second_currency = amount_converted
|
||||
|
||||
|
||||
Reference in New Issue
Block a user