Compare commits

..

10 Commits

Author SHA1 Message Date
Alexis de Lattre
d3d4e7346e [MIG] sale_order_add_bom from v10 to v14 2022-03-29 11:36:59 +02:00
Alexis de Lattre
5acaa73fae sale_order_add_bom: add kit wizard now available on pickings 2022-03-29 10:32:10 +02:00
Alexis de Lattre
fc57c6259e Remove _rec_name from mrp.bom because there is now a native name_get() 2022-03-29 10:32:10 +02:00
Alexis de Lattre
da6185238d sale_order_add_bom: fix related field definition 2022-03-29 10:32:10 +02:00
Alexis de Lattre
45234bbb47 FIX my previous commit: related_sudo -> compute_sudo 2022-03-29 10:32:10 +02:00
Alexis de Lattre
2b3974d90d Add related_sudo where it may be needed
PEP8 fix
2022-03-29 10:32:10 +02:00
Alexis de Lattre
a04ab4592e Add module sale_force_invoice_status 2022-03-29 10:32:10 +02:00
Stéphane Bidoul (ACSONE)
385db5c722 [10.0] setup.py and addons versions (#35)
* [IMP] set 10.0 version prefix in all installable addons

* [FIX] 10.0 instead of 9.0 version prefix for sale_order_add_bom on 10.0 branch

* [ADD] setup.py for all installable addons
2022-03-29 10:32:10 +02:00
Alexis de Lattre
feb39edd22 Port sale_order_add_bom to v10 2022-03-29 10:32:10 +02:00
Alexis de Lattre
d331dee3ba Add modules sale_from_private_stock and sale_order_add_bom
Port base_company_extension to v10
Avoid blockage on l10n_fr_infogreffe_connector
2022-03-29 10:32:10 +02:00
18 changed files with 2 additions and 181 deletions

View File

@@ -242,17 +242,6 @@ class AccountMoveLine(models.Model):
compute='_compute_reconcile_string', string='Reconcile', store=True)
# for optional display in tree view
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
balance = fields.Monetary(
string='Balance',
default=0.0,
currency_field='company_currency_id',
compute="_compute_balance",
store=True)
@api.depends("credit", "debit")
def _compute_balance(self):
for line in self:
line.balance = line.debit - line.credit
def show_account_move_form(self):
self.ensure_one()

View File

@@ -70,9 +70,6 @@
<field name="matching_number" position="after">
<button title="View Journal Entry Form" type="object" name="show_account_move_form" icon="fa-arrow-right"/>
</field>
<field name="credit" position="after">
<field name="balance" sum="Balance" />
</field>
</field>
</record>

View File

@@ -29,15 +29,4 @@
</field>
</record>
<record id="mrp_production_tree_view" model="ir.ui.view">
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_tree_view"/>
<field name="arch" type="xml">
<field name="reservation_state" position="after">
<field name="location_src_id" optional="hide" groups="stock.group_stock_multi_locations"/>
<field name="location_dest_id" optional="hide" groups="stock.group_stock_multi_locations"/>
</field>
</field>
</record>
</odoo>

View File

@@ -15,20 +15,6 @@
<button name="show_journal_items" position="after">
<button name="%(point_of_sale.action_report_pos_order_all)d" type="action" class="oe_stat_button" icon="fa-table" string="Stats" context="{'search_default_session_id': active_id}"/>
</button>
<xpath
expr="//field[@name='cash_register_total_entry_encoding']/parent::group"
position="before"
>
<group>
<field
style="text-align:right;margin:0;padding:0;"
name="cash_register_balance_start"
widget="monetary"
options="{'currency_field': 'currency_id'}"
string="Starting Balance"
/>
</group>
</xpath>
</field>
</record>

View File

@@ -32,7 +32,6 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'views/product_pricelist_item.xml',
'views/product_template_view.xml',
'views/product_product.xml',
'views/uom_uom.xml',
'views/product_category_view.xml',
],
'installable': True,

View File

@@ -30,4 +30,3 @@ class ProductTemplate(models.Model):
sale_ok = fields.Boolean(tracking=80)
purchase_ok = fields.Boolean(tracking=90)
active = fields.Boolean(tracking=100)
company_id = fields.Many2one(tracking=110)

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2022 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>
<!-- When the module stock and sale are not installed,
there is no menu entry for UoM ! These menu entry fixes this -->
<menuitem id="uom_config_menu" parent="base.menu_custom"
name="Units of Measure" sequence="150"/>
<menuitem id="uom_categ_config_menu" parent="uom_config_menu"
action="uom.product_uom_categ_form_action" sequence="10" />
<menuitem id="uom_uom_config_menu" parent="uom_config_menu"
action="uom.product_uom_form_action" sequence="20" />
</odoo>

View File

@@ -18,25 +18,4 @@
</field>
</record>
<record id="view_quotation_tree" model="ir.ui.view">
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_stock.view_quotation_tree"/>
<field name="arch" type="xml">
<field name="warehouse_id" position="after">
<field name="route_id" optional="hide"/>
</field>
</field>
</record>
<record id="view_order_tree" model="ir.ui.view">
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_stock.view_order_tree"/>
<field name="arch" type="xml">
<field name="warehouse_id" position="after">
<field name="route_id" optional="hide"/>
</field>
</field>
</record>
</odoo>

View File

@@ -1,2 +1 @@
from . import models
from . import wizard

View File

@@ -22,7 +22,6 @@
'views/product_pricelist_item.xml',
'views/account_move.xml',
'views/res_company.xml',
"views/res_partner.xml",
],
'installable': True,
}

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="res_partner_view_team" model="ir.ui.view">
<field name="model">res.partner</field>
<field name="inherit_id" ref="sales_team.res_partner_view_team" />
<field name="arch" type="xml">
<!-- team_id should be visible in no developper mode -->
<field name="team_id" position="attributes">
<attribute name="groups"/>
</field>
</field>
</record>
</odoo>

View File

@@ -1 +0,0 @@
from . import sale_make_invoice_advance

View File

@@ -1,37 +0,0 @@
from odoo import models
from odoo.tools import float_is_zero
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
def _prepare_invoice_values(self, order, name, amount, so_line):
"""
Create as many invoice lines as order lines with their original
order line taxes. Lines quantities have the ratio of the advance payment.
"""
invoice_vals = super()._prepare_invoice_values(order, name, amount, so_line)
lines = []
uom_precision_digits = self.env["decimal.precision"].precision_get(
"Product Unit of Measure"
)
for line in order.order_line:
if (
not float_is_zero(
# avoids taking lines like previous advance payments
line.product_uom_qty, precision_digits=uom_precision_digits
)
):
lines.append((0, 0, {
"name": name,
"price_unit": line.price_unit,
"quantity": line.product_uom_qty * amount / order.amount_total,
"product_id": line.product_id.id,
"product_uom_id": line.product_uom.id,
"tax_ids": [(6, 0, line.tax_id.ids)],
"sale_line_ids": [(6, 0, [line.id])],
"analytic_tag_ids": [(6, 0, line.analytic_tag_ids.ids)],
"analytic_account_id": order.analytic_account_id.id or False,
}))
invoice_vals["invoice_line_ids"] = lines
return invoice_vals

View File

@@ -1,18 +0,0 @@
# Copyright 2021 Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Shopinvader Usability",
"description": """
Shopinvader Usability""",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"author": "Akretion",
"website": "https://github.com/OCA/odoo-usability",
"depends": [
"shopinvader",
"sale_usability",
],
"data": ["views/sale_views.xml"],
"auto_install": True,
}

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 Akretion
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="sale.action_quotations" model="ir.actions.act_window">
<field
name="domain"
>['&amp;', ('state', 'in', ('draft', 'sent', 'cancel')), ('typology', '=', 'sale')]</field>
</record>
<record id="sale.action_quotations_with_onboarding" model="ir.actions.act_window">
<field
name="domain"
>['&amp;', ('state', 'in', ('draft', 'sent', 'cancel')), ('typology', '=', 'sale')]</field>
</record>
<record id="sale.action_quotations_salesteams" model="ir.actions.act_window">
<field
name="domain"
>['&amp;', ('state', 'in', ('draft', 'sent', 'cancel')), ('typology', '=', 'sale')]</field>
</record>
</odoo>

View File

@@ -97,7 +97,7 @@ class StockValuationXlsx(models.TransientModel):
raise UserError(_(
"The selected inventory (%s) is not in done state.")
% self.inventory_id.display_name)
cost_method_real_count = self.env['ir.property'].sudo().search([
cost_method_real_count = self.env['ir.property'].search([
('company_id', '=', company_id),
('name', '=', 'property_cost_method'),
('value_text', '=', 'real'),

View File

@@ -79,7 +79,7 @@ class StockVariationXlsx(models.TransientModel):
else:
if self.start_date >= present:
raise UserError(_("The start date must be in the past."))
cost_method_real_count = self.env['ir.property'].sudo().search([
cost_method_real_count = self.env['ir.property'].search([
('company_id', '=', company_id),
('name', '=', 'property_cost_method'),
('value_text', '=', 'real'),