Skip to content

Commit

Permalink
Merge branch '17.0' into 17.0-16.0-H-67829-MAQ-5-8VC3-fw
Browse files Browse the repository at this point in the history
  • Loading branch information
maq-adhoc committed Mar 14, 2024
2 parents 926c7b4 + fc457a3 commit f14ed78
Show file tree
Hide file tree
Showing 58 changed files with 293 additions and 351 deletions.
2 changes: 1 addition & 1 deletion crm_teams_ux/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CRM Stage Teams
This module:

#. Allows to select multiple teams in one stage. Then each user is going to see the stages that the teams he belogns are allowed to see.
#. If the option "Allow any user as salesman" is enable, it would be possible to assign any user as salesperson in leads.
#. If the option "Allow any user as salesman" is enable, it would be possible to assign any user as salesperson in leads, opportunities and teams.

Installation
============
Expand Down
4 changes: 2 additions & 2 deletions crm_teams_ux/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'CRM Teams UX',
'version': "16.0.2.1.0",
'version': "17.0.1.0.0",
'sequence': 14,
'summary': '',
'author': 'ADHOC SA',
Expand All @@ -20,7 +20,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
1 change: 1 addition & 0 deletions crm_teams_ux/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

from . import crm_stage
from . import crm_lead
from . import crm_team
13 changes: 13 additions & 0 deletions crm_teams_ux/models/crm_team.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import models, fields


class CrmTeam(models.Model):
_inherit = 'crm.team'

def _domain_member_ids(self):
if self.env.user.has_group('sale_ux.group_allow_any_user_as_salesman'):
return []
else:
return "['&', ('share', '=', False), ('company_ids', 'in', member_company_ids)]"

member_ids = fields.Many2many(domain=lambda self: self._domain_member_ids())
13 changes: 12 additions & 1 deletion crm_teams_ux/views/crm_lead_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,18 @@
<field name="inherit_id" ref="crm.crm_lead_view_form"/>
<field name="arch" type="xml">
<field name="stage_id" position="replace">
<field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" domain="['|', ('team_ids', '=', team_id), ('team_ids', '=', False)]" attrs="{'invisible': [('active', '=', False)]}"/>
<field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" domain="['|', ('team_ids', '=', team_id), ('team_ids', '=', False)]" invisible="not active"/>
</field>
</field>
</record>

<record id="view_crm_allow_any_user_as_salesman" model="ir.ui.view">
<field name="name">sale.order.form.salesman</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_lead_view_form"/>
<field name="arch" type="xml">
<field name="user_id" position="replace">
<field name="user_id" widget="many2one_avatar_user" domain="[]" groups="sale_ux.group_allow_any_user_as_salesman"/>
</field>
</field>
</record>
Expand Down
1 change: 0 additions & 1 deletion crm_teams_ux/views/crm_stage_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@
</record>
</data>
</odoo>

2 changes: 1 addition & 1 deletion portal_sale_distributor/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Portal Distributor Sale',
'version': "16.0.1.3.0",
'version': "16.0.1.4.0",
'category': 'Tools',
'complexity': 'easy',
'author': 'ADHOC SA, Odoo Community Association (OCA)',
Expand Down
3 changes: 3 additions & 0 deletions portal_sale_distributor/views/product_template_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
<field name="uom_id" position="attributes">
<attribute name="groups">uom.group_uom,portal_sale_distributor.group_portal_backend_distributor</attribute>
</field>
<button name="action_open_label_layout" position="attributes">
<attribute name="groups">!portal_sale_distributor.group_portal_backend_distributor</attribute>
</button>
</field>
</record>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_sale_exception_rule_portal_distributor,sale.exception.portal.distributor,sale_exception.model_sale_exception_confirm,portal_sale_distributor.group_portal_backend_distributor,1,0,0,0
access_sale_exception_rule_portal_distributor,sale.exception.portal.distributor,sale_exception.model_sale_exception_confirm,portal_sale_distributor.group_portal_backend_distributor,1,0,1,0
4 changes: 2 additions & 2 deletions sale_barcode/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Barcode',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'category': 'Sales',
'sequence': 14,
'summary': '',
Expand All @@ -38,7 +38,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
9 changes: 5 additions & 4 deletions sale_exception_credit_limit/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ def _compute_user_credit_config(self):

@api.constrains('credit_limit', 'use_partner_credit_limit')
def check_credit_limit_group(self):
"""Si esta constraint trae dolores de cabeza la podemos sacar ya que este "bache" de seguridad esta en muchos lugares
aún mas criticos. es un problema del ORM donde mucho se protege a nivel vista"""
if not self.env.user.has_group('sale_exception_credit_limit.credit_config'):
"""Si esta constraint trae dolores de cabeza la podemos sacar ya que este "bache" de seguridad esta en muchos
lugares aún mas criticos. es un problema del ORM donde mucho se protege a nivel vista"""
if not self.env.user.has_group('sale_exception_credit_limit.credit_config') and any(
not x.parent_id or x.credit_limit != x.parent_id.credit_limit for x in self
):
raise ValidationError('People without Credit limit Configuration Rights cannot modify credit limit parameters')

@api.depends_context('company')
Expand Down Expand Up @@ -86,4 +88,3 @@ def _compute_credit_with_confirmed_orders(self):


self.credit_with_confirmed_orders = to_invoice_amount + draft_invoice_lines_amount + self.credit

2 changes: 1 addition & 1 deletion sale_exception_partner_state/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Installation

To install this module, you need to:

#. Just Install the module.
#. Just Install the module


Configuration
Expand Down
4 changes: 2 additions & 2 deletions sale_exception_partner_state/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Exception - Partner State Integration',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
Expand All @@ -34,6 +34,6 @@
'demo': [
'data/res_partner_demo.xml',
],
'installable': False,
'installable': True,
'auto_install': True,
}
30 changes: 10 additions & 20 deletions sale_exception_partner_state/wizards/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,19 @@
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.form.inherit</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="sale.res_config_settings_view_form"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@data-key='sale_management']/div[3]" position="inside">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane">
<label for="restrict_sales"/>
<div class="text-muted">
Restrict Sales to Unapproved Partners?
</div>
<div class="mt16">
<field name="restrict_sales" class="o_light_label" widget="radio"/>
</div>
<div attrs="{'invisible':[('restrict_sales','!=','amount_depends')],'required':[('restrict_sales','=','amount_depends')]}">
<label for="restrict_sales_amount"/>
<div class="mt16">
<field name="restrict_sales_amount"/>
</div>
</div>
<block name="quotation_order_setting_container" position="inside">
<setting id="sales_settings_restrict_sales" help="Restrict Sales to Unapproved Partners?">
<field name="restrict_sales" class="o_light_label" widget="radio"/>
<div invisible="restrict_sales != 'amount_depends'" required="restrict_sales == 'amount_depends'">
<label for="restrict_sales_amount"/>
<div class="mt16">
<field name="restrict_sales_amount"/>
</div>
</div>
</xpath>
</setting>
</block>
</field>
</record>
</odoo>
4 changes: 2 additions & 2 deletions sale_exception_price_security/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Exception - Price Security Integration',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
Expand All @@ -32,6 +32,6 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': True,
}
4 changes: 2 additions & 2 deletions sale_exception_print/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Exception Print',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
Expand All @@ -31,7 +31,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
4 changes: 2 additions & 2 deletions sale_exceptions_ignore_approve/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Exceptions Ingore Approve Directly',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'category': 'Sale',
'sequence': 14,
'author': 'ADHOC SA',
Expand All @@ -37,7 +37,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
2 changes: 1 addition & 1 deletion sale_margin_ux/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Sale Margin Ux
==============

#. This module adds to the "update prices" button the functionality of updating the cost prices in the SO lines.
#. Adds purchase_price and margin to sale_ux's sale_order_line view
#. Adds purchase_price and margins to sale_ux's sale_order_line view

Installation
============
Expand Down
4 changes: 2 additions & 2 deletions sale_margin_ux/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Margin Ux',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'category': 'Sales & Purchases',
'sequence': 14,
'summary': '',
Expand All @@ -37,7 +37,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': True,
'application': False,
}
5 changes: 3 additions & 2 deletions sale_margin_ux/views/sale_order_line_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
<field name="inherit_id" ref="sale_ux.sale_order_line_usability_tree"/>
<field name="arch" type="xml">
<field name="price_unit" position="after">
<field name="purchase_price" sum="Total" groups="base.group_user"/>
<field name="margin" sum="Total" groups="base.group_user"/>
<field name="purchase_price" sum="Total" optional="hide" groups="base.group_user"/>
<field name="margin" sum="Total" optional="hide" groups="base.group_user"/>
<field name="margin_percent" optional="hide" widget="percentage" groups="base.group_user"/>
</field>
</field>
</record>
Expand Down
2 changes: 1 addition & 1 deletion sale_order_type_invoice_policy/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'license': 'AGPL-3',
'depends': [
'account',
'sale_order_type',
'sale_order_type_ux',
# agregamos esta depenencia para permitir reembolsar las devoluciones
# y para no tener que hacer modulos puente
'sale_stock_ux',
Expand Down
4 changes: 4 additions & 0 deletions sale_order_type_invoice_policy/data/sale_order_type_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
<record id="prepaid_sale_type" model="sale.order.type">
<field name="name">Pre Paid</field>
<field name="invoice_policy">prepaid</field>
<field name="company_id" eval="False"/>
<field name="sequence" eval="15"/>
</record>

<record id="ordered_sale_type" model="sale.order.type">
<field name="name">Ordered quantities</field>
<field name="invoice_policy">order</field>
<field name="company_id" eval="False"/>
<field name="sequence" eval="15"/>
</record>
</odoo>
4 changes: 2 additions & 2 deletions sale_order_type_user_default/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
Sale Order Type User Default
============================

This module adds to the user a "type of sales order" field, when creating a sales order you get by default the "type of sales order" chosen in the user.
This module adds to the user a "type of sales order" field, when creating a sales order you get by default the "type of sales order" chosen in the user

Installation
============

To install this module, you need to:

#. Just install this module
#. Just install this module.

Configuration
=============
Expand Down
4 changes: 2 additions & 2 deletions sale_order_type_user_default/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Order Type User Default',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'category': 'Accounting',
'sequence': 14,
'author': 'ADHOC SA',
Expand All @@ -35,7 +35,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
14 changes: 4 additions & 10 deletions sale_order_type_user_default/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,18 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Project-Id-Version: Odoo Server 17.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-01-13 13:56+0000\n"
"PO-Revision-Date: 2023-01-13 13:56+0000\n"
"POT-Creation-Date: 2023-12-26 21:46+0000\n"
"PO-Revision-Date: 2023-12-26 21:46+0000\n"
"Last-Translator: Juan José Scarafía <scarafia.juanjose@gmail.com>, 2023\n"
"Language-Team: Spanish (https://www.transifex.com/adhoc/teams/46451/es/)\n"
"Language-Team: Spanish (https://app.transifex.com/adhoc/teams/46451/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"

#. module: sale_order_type_user_default
#: model:ir.model.fields,field_description:sale_order_type_user_default.field_res_users__algolia_search
#: model:ir.model.fields,field_description:sale_order_type_user_default.field_sale_order__algolia_search
msgid "Algolia Search"
msgstr ""

#. module: sale_order_type_user_default
#: model:ir.model.fields,field_description:sale_order_type_user_default.field_res_users__default_sale_order_type_id
msgid "Default Sale Order Type"
Expand Down
6 changes: 3 additions & 3 deletions sale_order_type_ux/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Sale Order Type Ux
* Also add tracking to same field.
* Add new behavior to the onchage sale type in invoice, to change the company.
* Set in Invoice view form the field "Sale Type" readonly to states different than "draft".
* Add fiscal position on sale types
* Allows select journal from another company
* Add fiscal position on sale types.
* Allows select journal from another company.
* Integration between Portal and Sale Order Type module:

- New access record to sale type model for portal users
Expand All @@ -31,7 +31,7 @@ Installation

To install this module, you need to:

#. Only need to install the module
#. Only need to install the module.

Configuration
=============
Expand Down

0 comments on commit f14ed78

Please sign in to comment.