The landed costs button_validate() method attempts to create a correction in quant cost that occurs due to currency rounding. However this can lead to a negative cost value being assigned to a stock.quant

The issue affects move lines with a very low price to quantity ratio. ie 1000 x $0.10
Applying a landed cost of $456.70 to this line gives a diff of $0.4567
Having a 2 decimal rounding on the currency makes diff_rounded = $0.46

Now the formula used to determine the cost correction (diff_correct) on the single qty quant (quant_correct)
```python
diff_correct += (line.quantity * diff) - (line.quantity * diff_rounded)
```
This equates to diff_correct = 0.46 + (1000 * 0.4567) - (1000 * 0.46) = -2.84

and then
```python
if quant_correct:
    quant_dict[quant_correct] = quant_correct.cost + diff_correct
for quant, value in quant_dict.items():
    quant.sudo().write({'cost': value})
```
The correction quant's cost becomes $-2.74

If this quant is then in an inventory adjustment, the accounting lines generated violate a constraint on the journal that (credit + debit) >= (0)

I would suggest that the solution is that this line should be changed to only ever round down
```python
diff_rounded = tools.float_round(diff, precision_rounding=curr_rounding)
```
If rounded down in this case, diff_rounded = 0.45  and diff_correct would be calculated as $7.15 and quant.cost = $7.25
A disproportionately large cost for a $0.10 product, but at least it's positive.

Perhaps a rounding_method='DOWN' should be implemented in tools.float_utils ?
addons/stock_account/models/stock.py
else:
                self.with_context(force_company=company_to.id)._create_account_move_line(move, acc_src, acc_valuation, journal_id)
        
        if company_from and (move.location_id.usage == 'internal' and move.location_dest_id.usage not in ('internal', 'transit') or company_from != company_to):
            journal_id, acc_src, acc_dest, acc_valuation = move._get_accounting_data_for_valuation()
            if location_to and location_to.usage == 'supplier':  
                self.with_context(force_company=company_from.id)._create_account_move_line(move, acc_valuation, acc_src, journal_id)
            else:
                self.with_context(force_company=company_from.id)._create_account_move_line(move, acc_valuation, acc_dest, journal_id)
        if move.company_id.anglo_saxon_accounting and move.location_id.usage == 'supplier' and move.location_dest_id.usage == 'customer':
            
            journal_id, acc_src, acc_dest, acc_valuation = move._get_accounting_data_for_valuation()
            self.with_context(force_company=move.company_id.id)._create_account_move_line(move, acc_src, acc_dest, journal_id)
    def _create_account_move_line(self, move, credit_account_id, debit_account_id, journal_id):
        
        quant_cost_qty = defaultdict(lambda: 0.0)
        for quant in self:
            quant_cost_qty[quant.cost] += quant.qty
        AccountMove = self.env['account.move']
        for cost, qty in quant_cost_qty.iteritems():
            move_lines = move._prepare_account_move_line(qty, cost, credit_account_id, debit_account_id)
            if move_lines:
                date = self._context.get('force_period_date', fields.Date.context_today(self))
                new_account_move = AccountMove.create({
                    'journal_id': journal_id,
                    'line_ids': move_lines,
                    'date': date,
                    'ref': move.picking_id.name})
                new_account_move.post()
    def _quant_create_from_move(self, qty, move, lot_id=False, owner_id=False, src_package_id=False, dest_package_id=False, force_location_from=False, force_location_to=False):